



For our simulator, we have a lot of props and npc’s we can drag in during a scenario. For this drag and drop system, we make use of scriptable objects that hold all of the data of the prefab.
To create this asset, you need a lot of information, like the object’s prefab and a screenshot. The artists in our team asked us to create a tool that handles most of the setting of the data, to minimize the chance of mistakes, and to speed up the creation of usable props and characters.
This tool takes in an FBX as a base. Because of the naming conventions we have in the project, I could then take the name of the object and fill it in automatically. Just in case the name is wrong, the user can still change it.
It then takes a variation number. This is for the case when there are a couple of similar objects, like a cabinet, and have some identification for the object.
Then comes the sprite. All of our objects need a sprite, this is shown in the simulator so the user has a visual representation of what they are dragging in. This tool creates a preview scene, inside of the tool’s window. The object is then moved to that scene and made visible on an image. The user can then move the scene’s camera to get a good shot of the object.
When they then finish the prefab, the tool automatically creates a prefab, a screenshot, and an asset scriptable object. All of these files are then turned into addressable and sorted into the correct group. The moment these files are created, they can be used in the simulator. This allows for a fast turnover from FBX import to usage in the simulator.
After creating this tools for props, I then created a variation on it for characters. Characters need different components than props. They need a ragdoll, a rig, and a mugshot. For the mugshot, I added a second screenshot creation option, specifically for the mugshot.
The controls for manipulating the preview scene's camera are a custom visual element. The position and rotation input fields, the slider, and the buttons all have an event exposed that notify when they have changed. This allows me to update the scene's camera.
This tool was created in Unity 6 with UI toolkit. With this tool, we decided that all of our editor tools would be made using UI toolkit.