c# - How to get array of child objects contained in a GameObject -


i have gameobject in unity supposed serve container definitions.

object explorer

i'd access object , retrieve def class instances (every object there instance of def general class).

so, if have gameobject instance, how can retrieve objects instances of specific class?

you can use gameobject.getcomponents<def>(); retrieve components of def type in gameobject.
more info in unity docs http://docs.unity3d.com/scriptreference/gameobject.getcomponents.html


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -