![]() ![]() Unity offers several approaches for resolving a reference to a GameObject in the scene. If a scene contains multiple active GameObjects with the specified tag, there is no guarantee this method will return a specific GameObject. Note: This method returns the first GameObject it finds with the specified tag. A UnityException is thrown if the tag does not exist or an empty string or null is passed as the tag. Tags must be declared in the tag manager before using them. Or you could find an object that has a varaible reference to the gameobject you really want to find, but otherwise, you can't find inactive objects with GameObject.Find. You could have an active parent that is an empty gameobject and find that gameobject, then use FindChild or GetChild. ![]() solutions exist however to access inactive gameobjects: 1 - Store inactive game objects in an array if you need to reactivate them afterwards (only applies to game objects inactivated at runtime). solutions exist however to access inactive gameobjects: 1 - Store inactive game objects in an array if you need to reactivate them afterwards (only applies to game objects inactivated at runtime).Īfter some research it seems that there is no way to find an inactive gameobject by tag. After some research it seems that there is no way to find an inactive gameobject by tag. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |