Changing the Stats of Different Racers[edit | edit source]
- If the Racer Avatar is not already present in the scene, delete any children in the “Avatar” folder in the Project Hierarchy. Using the Library Panel, click on the Filters tab and select "Avatar". Find the "Racer Avatar" object and drag it into the Project Hierarchy under “Avatar”.
- Select the “Racer Avatar” object in the Project Hierarchy and view its children. Select the “UI” child object and view its Components tab.
- On the Script “UI Avatar Racer Selection”, scroll down to the fields for “Light Stats”, “Medium Stats”, and “Heavy Stats”. These fields are where the objects containing the stats are stored.
- To customize the stats for a particular Racer, we need to replace the default Stats object in its corresponding field with a new Stats object. For this example, we will change the stats of the Medium Racer. In the Library, search “Racer Stats Medium”. Drag “Racer Stats Medium” into your Project Hierarchy as a child of “Racer Avatar”.
- Rename that “Racer Stats Medium” as something else to designate it as a custom stats object. For this example, we will call it “New Racer Stats Medium”.
- Select “New Racer Stats Medium” and view its Components tab. You can edit the fields for each property of the Racer Medium here. In this example, I will set the value for “Max Speed MPS” to 50 and the value for “Acceleration” to 12.
- Select the “UI” child object under “Racer Avatar” again. Drag the “New Racer Stats Medium” object from the Project Hierarchy into the field for “Medium Stats”.
- Now, the stats for the Medium Racer will be the same as those in “New Racer Stats Medium”. You can play test to see how these new stats change the behavior of Racer Medium.
- To change the stats of the other racers, simply follow these same steps with the corresponding Racer Stats objects.