Answer by cregox
There are at very least 4 options: [`GetChild`](http://answers.unity3d.com/questions/30296/question-regarding-transformgetchild.html),...
View ArticleAnswer by Stalli
Here I need to find an child inactive object named "CheckPicture" of parent "objectParam". objectParam.GetComponentsInChildren().FirstOrDefault(component => component.gameObject.name ==...
View ArticleAnswer by Noob_Vulcan
Things that can find inactive gameObjects : transform.Find() or transform.FindChild() transform.GetComponentsInChildren(true) Resources.FindObjectsOfTypeAll() For more detail you can refer to...
View ArticleAnswer by RLAWLSGH
public static T[] FindObjectOfTypeIncludeInactivated() where T : Component{ List result = new List(); foreach( GameObject rootObj in...
View ArticleAnswer by CarterG81
> Does GameObject.Find() work on> inactive objects? If not, how do you> find and reference inactive objects. GameObject.Find() is only useful (good) in small scenes. Best practice is to avoid...
View ArticleAnswer by bburtson09
You Are looking for Resources.FindObjectsOfTypeAll(), as Noob_vulcan said. I wrote some test code and found many solutions, I will share 2 of my solutions the first being a broad implementation that is...
View ArticleAnswer by Neonalig
Probably a bit late (6 years late), but for any people viewing this now, You can do: UnityEngine.Resources.FindAllObjectsOfType<"object type here">(); Just replace "object type here" with your...
View ArticleAnswer by peterthepeter140
I was looking for a way to use "FindGameObjectWithTag(tag)" with an inactive GameObject and didn't find any easy alternatives but i came up with this solution: public GameObject Item; public float...
View ArticleAnswer by Neonalig
GameObject.Find() only returns active objects. for unactive objects, use this: Resources.FindObjectsOfTypeAll(typeof(YOURTYPEHERE)); so, lets say you want to find all of a certain tag, that aren't...
View ArticleAnswer by Eric5h5
GameObject.Find "This function only returns active gameobjects." You can reference inactive objects by using drag'n'drop in the inspector, or by finding active gameobjects and then deactivating them.
View ArticleAnswer by Antony-Blackett
The solution only works if you don't rely on transform.root anywhere in your game. It also doesn't work if you need to find objects that are children of objects that don't get destroyed on load. Add a...
View ArticleAnswer by Bampf
Tranquility's [link he posted in the comments][1] contains an easy solution. Just keep an array of the disabled objects that you might want to find again. In the given code the author was bringing back...
View ArticleAnswer by Antony-Blackett
Here's how you do it. Resources.FindObjectsOfTypeAll(typeof(GameObject)) as GameObject[]; Note this can also return prefabs not just object instances in the scene so be careful when using it at edit time.
View ArticleAnswer by tavoevoe
Make sure you save a reference to the object before you set it to inactive.
View ArticleAnswer by bdawson
This is kind of gross, but it works well: public static List GetAllObjectsInScene(bool bOnlyRoot) { GameObject[] pAllObjects = (GameObject[])Resources.FindObjectsOfTypeAll(typeof(GameObject)); List...
View ArticleAnswer by akasurreal
FYI I wrote this and it worked for my purposes, I know it may not work for all. Look up the Unity docs on Resources.FindObjectsOfTypeAll to see some potential pitfalls. public class Helpers :...
View ArticleAnswer by cregox
There are at very least 4 options: [`GetChild`](http://answers.unity3d.com/questions/30296/question-regarding-transformgetchild.html),...
View ArticleAnswer by Stalli
Here I need to find an child inactive object named "CheckPicture" of parent "objectParam". objectParam.GetComponentsInChildren().FirstOrDefault(component => component.gameObject.name ==...
View ArticleAnswer by Noob_Vulcan
Things that can find inactive gameObjects : transform.Find() or transform.FindChild() transform.GetComponentsInChildren(true) Resources.FindObjectsOfTypeAll() For more detail you can refer to...
View ArticleAnswer by RLAWLSGH
public static T[] FindObjectOfTypeIncludeInactivated() where T : Component{ List result = new List(); foreach( GameObject rootObj in...
View Article