Hello I am making a strategy game I have different units/bases/UI’s etc… and I was wondering how to set all that in the game scene I have all the assets in prefabs stuff like different UI’s and the main base that different units will spawn from different environments as well but how to make them different depending what the player chooses from the skirmish menu how to connect both of those things up?
How to put different units and different UIs depending on what the player choose inthe skirmish menu
GameObject playersSelection;
GameObject[] playersChoices;
void PlayerSelected(int value)
{
playersSelection = playersChoices[value];
}
Should do it.
Apologies was confused by the question, so you want to set sides based on the players choice…
Just populate the playerChoices based on the side they select.
Have all the UI’s in separate ‘side’ root elements/canvases and only show/enable the relevant one.
You could even have the side UI logic and UI in separate scenes and only load the relevant one. As Unity allows multiple scenes to be combined now.
1 Like