Unity-Technologies / guid-based-reference

A component for giving Game Objects a GUID and a class to create references to objects in any Scene by GUID
Other
625 stars 71 forks source link

Suggestion: Hold a ref to the component instead of the game object #13

Open rmenapace opened 5 years ago

rmenapace commented 5 years ago

The GuidManager currently holds referenced to the gameobject the component lives in. If you hold a reference to the GuidComponent instead, its easy to get the gameobject from the component, and things that inherit from GuidComponent don't have to be located with GetComponent if the application requires a ref to the GuidComponent.