Skip to content

Instantly share code, notes, and snippets.

@openroomxyz
Created April 21, 2020 14:10
Show Gist options
  • Select an option

  • Save openroomxyz/649c7308577ee8fb24a41104cd3e8b5e to your computer and use it in GitHub Desktop.

Select an option

Save openroomxyz/649c7308577ee8fb24a41104cd3e8b5e to your computer and use it in GitHub Desktop.
Unity : How to find a children by name of current gameObject and change it’s color?
MeshRenderer topMeshRenerer = transform.Find("Top").GetComponent<MeshRenderer>();
topMeshRenerer.material.color = color;
//Note : Children children, not children of children’s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment