Hi everyone,
-
I have a game script with a serializable class called “Race” with name, strength etc.
-
I then have: “public List raceList = new List();” which allows me to add new races in the inspector
-
in the inspector I have created a few different races in the game script with their specific stats
-
I now have a creature script where in the inspector I would like a drop down box (RaceEnum) listing those inspector created races
-
on start the creature script Race will equal the raceEnum selected value (which should be a Race class)
I am having issues figuring out #4 I am assuming it should be something like this:
public enum RaceEnum{
//get{gameScript.raceList.name}
//OR
//if I could somehow get a foreach(Race race in gameScript.raceList){
add race to RaceEnum
``} that would be nice
}
could someone give me a hand???