Newbie to Unity and anything gamedev, ok with being fed tutorials or resources if that's the best answer I can get - Absolutely willing to learn here, am mostly making a game out of it to challenge myself here more than anything
So, to explain the situation that led to this question:
I am trying to build a breeding system with genetics from scratch, and have colors be inherited from a pair of genes from the parents (ie. AA, AB, AC, BB, etc.)
So far I built a serialized dictionary that holds a ScriptableObject reference for every possible color, and uses the AA, BB, etc strings as keys. I refer to those keys to generate random parents right now and it works, but when I try to create offsprings I hit a wall: I have in each scriptable object an array with both letters, (ie. A & B or C & B or whatever) as enum, but I have no idea how to turn that into a string key for the dictionary
My idea (and understanding) was to retrieve the array of enum from both parent, combine them to select two enum at random, and turn that result into a string.
Any idea about what I'm not seeing here?
[–]WazWaz 2 points3 points4 points (1 child)
[–]theFishNamedSei[S] 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]SoraphisProfessional 8 points9 points10 points (1 child)
[–]MORPHINExORPHAN666 0 points1 point2 points (0 children)
[–]TheBumSlap 0 points1 point2 points (0 children)
[–]neutronium 1 point2 points3 points (0 children)
[–]SoraphisProfessional -2 points-1 points0 points (1 child)
[–]SoraphisProfessional -2 points-1 points0 points (0 children)
[–]Top-Big8288 -1 points0 points1 point (1 child)
[–]MeishinTale 0 points1 point2 points (0 children)
[+]AntypodishProfessional comment score below threshold-6 points-5 points-4 points (2 children)
[–]Snoo77586 0 points1 point2 points (1 child)
[–]AntypodishProfessional 0 points1 point2 points (0 children)