U
U
UnityMakar2020-02-17 17:24:43
Unity
UnityMakar, 2020-02-17 17:24:43

How to find an object on the stage in Unity using a script?

Hello!
I need help. I need a function that will find an object on the stage by certain parameters (for example, the name).
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex Maximovich, 2020-02-17
@flexer1992

This is for you in the documentation)

T
TailsMiles54, 2020-02-20
@TailsMiles54

If by name then GameObject.Find();
There is also a search among child objects, or you can search by the GameObject.FindWithTag tag
In any case, as mentioned above, read the
docs https://docs.unity3d.com/ScriptReference/GameObjec...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question