Z
Z
zipnik2019-12-01 18:16:07
C++ / C#
zipnik, 2019-12-01 18:16:07

How to refer to an object hidden in the scene?

It is required to refer to an object that is hidden on the stage, tell me how to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RomQua, 2019-12-03
@zipnik

I had it so that with a trigger it was necessary to include an object in the hierarchy . I
used this method
//Your object
public GameObject zipnik ;
private void YourEventName(){
// If (your object is not active in the Hierarchy)
if ( ! zipnik.activeInHierarchy ){
//Make your object active(true)
zipnik.SetActive(true);
}
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question