#Mini-game Menu?
1 messages · Page 1 of 1 (latest)
I mean... you don't need to. But I probably would 'cos it sounds easier.
You could also have some system that keeps references to a ton of objects and uses .setActive(false) to just hide ones not used in the current game.
Or depending on what kind of games they are, move the camera to show the diff games.
I see. Hadn't considered that (assumed Unity would do it automatically). Thanks for the tip.
Well, it's an educational app I'm developing for my niece, so mostly just basic stuff like colours/shapes/sizes/counting, etc.
I don't think it'd be that resource-intensive but it's my first time with Unity so I want to do it right.
Oh I see!
I took a 9 month game course and my teacher had a system where he added all the gameobjects relating to a game level into an array.
When the player got to lv2 iterated through the array with a for (or maybe a foreach?) loopto use .SetActive(false) to all of the lv 1 objects.
He'd have all the lv 2 things in a different array and called .SetActive(true) to activate all lv 2 things.
That way it switched levels without needing 2 scenes.
I've never done it myself, but maybe it would work for you.
That way you could keep everything in one scene.
But yea scenes are nice since everything in the last one is jsut destroyed and don't need to think about it as much.
Curious, would I have to select every single object, or is there some convenient way to disable every game object that's not in the current scene?
Thanks for the detailed response, this makes a ton of sense.
I think I'll just go with the scene approach then.
The fact that everything BUT the active scene is automatically deleted makes it convenient.
Yeah, with scene changing the challenge is if you need to bring something over to other scenes. You'd need a singleton or some static fields.
But if you don't save anything then it's super easy.
Yeah, nothing to save accross scenes, if that's what you mean.
I'm going to have variables for objectives inside each scene.
But I don't think that should be an issue.
And all the assets in each different minigame are irrespective of each other.
Yep. In lots of games you need to bring like player score to other scenes or w/e.
Yeah and you can just use the same prefabs if you need menu buttons on many scenes.
What do you mean by menu buttons on many scenes?
This is essentially what my core UI will be like.
red = minigame icons
blue = settings
Is it advisable to create a different scene for the settings too?
What I mean is, I often make my menu system carry between scenes.
So that I can have the same buttons to go back to other scenes etc.
But you can just put copies of the same thing in many scenes and it's pretty much the same thing.
I see.
For settings, I often jsut have it be an UI panel that I activate to show and deactivate to hide
That makes more sense.
Thanks for all the help brother.