- Home /
Question by
iamrenzon · Jul 30, 2017 at 02:52 AM ·
startupgame objectappear
How to make a game object ONLY to appear in game startup?
I want my game object to appear only in game startup in my menu. But what happens is, during game play, when you go back to the menu, the game object appears again (which is not what I want). Could you guys help me how to fix this.
Comment
Answer by MOKTADA · Jul 30, 2017 at 06:15 AM
You can just do
bool IsStartup; public GameObject yourGameObject;
if (//you can put here when the button is clicked or key is down) {IsStartup = true} if (IsStartup == true) {Destroy(yourGameObject)}
Your answer
Follow this Question
Related Questions
Unity Editor Crashes Upon Startup 0 Answers
Call a fuction only once on startup 1 Answer
open Unity and waiting because it's slow 1 Answer
Gui text script - help 1 Answer
How to make an object appear when another is collected? 2 Answers