N
N
NickName73312018-02-19 22:18:38
C++ / C#
NickName7331, 2018-02-19 22:18:38

Unity(C#) - How to hide an object through code?

In the inspector, you can hide an object (by clicking on the checkmark), how can you do the same, but through the code? For example, stepping on a trigger turns on an object that was previously hidden.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
freeExec, 2018-02-20
@NickName7331

gameObject.SetActive(show);

X
xmoonlight, 2018-02-19
@xmoonlight

What does the documentation say about this?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question