Hi guys !
I have 5 gameobjects in the hierarchy representing arcade cabinets.
Each cabinet has an id number, a filename of the rom (Romfile), a child gameobject board for 1 or 2 players ( 1pl and 2pl) and a child gameobject bezel for the screen that changes horizontally and vertically (hor or ver).
I created an XML file called ArcadeList.xml structured as follows:
<Arcades>
<Arcade id="01" romfile="gberet" cpo="1pl" bezel="hor" ></Arcade>
<Arcade id="02" romfile="ffight" cpo="2pl" bezel="hor" ></Arcade>
<Arcade id="03" romfile="19xx" cpo="2pl" bezel="ver" ></Arcade>
<Arcade id="04" romfile="ghouls" cpo="1pl" bezel="hor" ></Arcade>
<Arcade id="05" romfile="contra" cpo="2pl" bezel="ver" ></Arcade>
</Arcades>
Then i created an object in the hierarchy called XML within which I created an FSM and through the actions of datamaker I created 3 different hash tables:
1 - hashtable for bezels (hor and Ver)
2 - Hashtable for control panel (1pl and pl2)
3 - hashtable for romfiles
I would like that by inserting the romfile in a gameobject, the relative variants would be activated automatically, thus choosing 1pl or 2pl and bezel hor or ver extracting the relative data from the XML file , so for "gberet" activate "1pl" child, and activate "Hor" child, for "19xx" 2pl child and ver bezel and so on ...
Is it possible to do this? And how ??
Maybe i don't need the hash table ??
Thank you for your help !!