Skip to content

Instantly share code, notes, and snippets.

@Hexodus
Last active June 15, 2017 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hexodus/0cbc69eab7b24224da67dffad4852502 to your computer and use it in GitHub Desktop.
Save Hexodus/0cbc69eab7b24224da67dffad4852502 to your computer and use it in GitHub Desktop.
Find inactive Game Objects in Unity 3D. The right method to go is to search over the parents transform for a script on the child like this.
var theParentGO = GameObject.Find("ParentName");
theParentGO.transform.GetComponentInChildren<ScriptOnTheChild>(true).gameObject;
@DRIVER1ksa
Copy link

error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment