Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

How to make namespaces appear in the AddComponent List automatically?

$
0
0
Let's say I have a component called Platform within the namespace Hardware. Then let's say I have another component Platform within the namespace GameEntity. Both inherit from monobehaviour. So when I go to add a component to a gameobject from the add component menu I'll see two items named 'Platform'. Is there a way to tell which is which without adding them and checking the file. Ideally the component list would read Hardware.Platform and GameEntity.Platform. And for the sake of this question, let's pretend that I can't just rename my scripts. The best I can find right now is -> AddComponentMenu("Hardware.Platform")] <- at the top of each class but that doesn't actually remove the original 'Platform' from the component menu and I'd rather unity just use the namespaces automatically rather than having to do it manually each time.

Viewing all articles
Browse latest Browse all 398

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>