02.05 Adding the ScriptableObject

Now we will add something called a ScriptableObject - something that stores the data about our modded firework.

Press right click in the mod folder, Create->Scriptable_Objects->SpawnMenuFirework and name it Ball Settings or whatever you want.

Click on it, and look at the inspector. You can see several values you can set.

Set the Name value to the name you want the firework to have in the Spawn Menu. I changed it to Ball. Next, set the Firework Type. As this is a prop, I set it to Prop of course. Next, drag in the Prefab. Make sure it has an icon with 3 blue sides, instead of an icon with 1 side blue and 2 gray - that means you dragged in the model, not the prefab. Change the Sub Category to whatever you need for your fireworks - it's the top bar in the spawn menu. For Prop i'll set it to "All". If you enter one that isn't in the Spawn Menu, a new one will be created ingame. Next, and it's very important, we need to create a UUID for the Settings ScriptableObject. The easiest way to generate a UUID is to press the Generate UUID button. It'll automatically fill it in. Remember that two settings CANNOT have the same UUID as it is a UNIQUE identifier. By generating it there's almost an impossible chance a conflict will happen, but just for information I'm telling you that it can happen.

Thumbnail

Next, you can press the Generate thumbnail button or create your own from scratch in your editor of choice. The thumbnail can be transparent as well, but then it needs to be saved in PNG format.

That's all. Now we're moving towards the final step - exporting the mod.

Last updated