Skip to content
Yang's Tech Notes
  • Home
  • Home
  • Code Snipplets
  • Find Component in child Gameobject
Posted inCode Snipplets

Find Component in child Gameobject

Posted by By admin September 11, 2020

![-w1680](media/15998105420013/15998106683994.jpg)

If Text component is placed under the DisplayIdTxt and we need to retrieve it from Item GameObject

“`csharp
Text DisplayIdTxt = newItem.transform.Find(“DisplayIDTxt”).GetComponent();
“`

Tags:
Snippletsunity3d
admin
View All Posts

Post navigation

Previous Post
Using TextMeshPro in script
Next Post
foreach C#
Copyright 2025 — Yang's Tech Notes. All rights reserved.
Scroll to Top