How can hide game object in unity?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
NitinRank #140 · 16.1K reputationPosted Nov 10, 2022, 11:24 PM EST
Hide button unity Code
GameObject button;
void Start() {
button = GameObject.Find("Button");
}
void ButtonClicked() {
button.SetActive(false);
}
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Nov 11, 2022, 1:09 AM EST
https://www.c-sharpcorner.com/forums/in-unity-3d-how-can-you-hide-gameobject
Uday DodiyaRank #239 · 10.3K reputationPosted Nov 11, 2022, 1:25 AM EST
To make a gameobject invisible you can disable its renderer component. If you dont need the object in the scene right now (including script functionality) you may also just disable the entire gameobject.
public GameObject OBJECT1; void Update(); { // Collision/Way to Trigger. OBJECT1. SetActive(false); } }