Rob - Tool Building - Senior Production Blog Post #2

This week, we accomplished a lot as a team. Most members have stepped into the build to at least play around with what we have, and we ended up making some minor changes already! I made some quick changes to the SoundManager to make it more accessible for the designers (specifically Amos, since he's specializing in sound). 

The main accomplishments this week that will help us immensely in the future are the Level Building tool (which is Robbie's task), and the NPC/Event tool (which is mine!). Both of these require some basic tool functionality before they can work, and setting that up is also going to fall on me. I enjoy building tools, and while I've built quite a few into Unity before, I'm still trying to experiment with more reliable and powerful components.

Before either of our tools can fully work, we need some way for our tool to save its work. If someone is editing a level, it's not useful if they can't save and come back to it later! This process of serialization is generally pretty simple, but if we don't handle it correctly we'll run into a lot of issues. We want this to be as visual as possible, so I've decided to run with ScriptableObjects. These let us save the LevelChunks or NPCs as Assets, so anyone can open up the folder and actually see the object they're editing. This is a tangible object they can select, copy, delete, and more. In doing this, it removes that layer of invisibility that serializing it all into the script's data would normally exist.

Getting SOs working the way I wanted required a lot of research, but I was finally able to work in 2D arrays, and EditorWindows that edit a GameObject that then edit an SO. With this, I just need a way to save and load data on scene change, and the level building tool should be able to save its data perfectly.

For the NPC/Event tool, I took what I had last semester and reworked it into a less complex beast. Now, it's lacking in events, but has serialization working with # of events and the contents of these events. Soon, I'll have it working with the game itself (making NPCs talk, for example), and adding back in the complexity of conditional branches.

This tool is going to get its own blog post because of how much goes into it, which will either end up on this site or on my other blog site.