How do I use a switch statement to load branching scenes based on a dropdown selection?,How do I use a switch statement to load scenes based on a dropdown selection?
I'm creating a system of menus for race selection for my RPG. In my game you can combine up to 3 different races for your character. I'm trying to use a switch statement with strings to branch out between two different tertiary race (TerRace) menus, because I only want the player to be able to select one half-race (Vampire, Lich, Werewolf, Werebear, etc.) for their character. I'm trying to make it so that if you choose a half-race in the secondary race (SecRace) menu, then you only have main races (Dwarf, Elf, Halfling, etc) in the first TerRace menu, and if you have selected a main race as a SecRace, you have all the main races plus the half-races to choose from in the second TerRace menu. The races are being stored as strings. So far, the only case that is working is the default case.,I'm trying to create a race selection system for my rpg where the player can combine up to three races into a single character. I'm trying to make is so that they can only choose one "half-race" (Lich, Vampire, Werewolf, Werebear, etc.) but up to three "main races" (Dwarf, Fire Elf, Halfing, etc.) I created two different tertiary race (TerRace) dropdowns, and I'm trying to branch it so that if I choose a half-race in the secondary race menu, the half races won't show up in the TerRace race menu, and if I choose a main race in the secondary race menu, they will show up in the TerRace menu. The races selected are being stored as strings and I'm trying to use a switch statement to control which TerRace menu the player gets. So far it only uses the default case.
So I typed this up once, then after I logged in it made everything disappear, and I typed everything in again, but now it posted both? I think the website is a little buggy
Your answer
![](https://koobas.hobune.stream/wayback/20220612161620im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Pick a random string from a string array C# 1 Answer
use the tag of a gameobject to assign a string variable 1 Answer
Convert UI Text into string? 1 Answer
checking numbers in strings 2 Answers