TypeSafe
Editor Utility for the Unity Engine
When developing in Unity you will inevitably end up having to hard-code various strings into your source files, for example when using resources, layers, or input. TypeSafe is a tool for automatically generating C# code with constants for the strings you would usually have as naked strings throughout your project.
A simple example, Resources.Load("SomeResource/WithALongPath/Name")
would become SRResources.SomeResources.WithALongPath.Name.Load()
. If the resource is moved or deleted, your code will fail to compile and you will be immediately aware of the error. Without TypeSafe you will not detect the error until the code is executed at runtime, which may happen so rarely that you don’t catch the bug before releasing to users.
Development
After releasing SRDebugger I realised a large portion of support requests involved conflicts with existing user code or problems with importing. I therefore decided to attempt to avoid this with TypeSafe by distributing only a compiled .DLL with all non-public methods and classes inaccessible to the end user. As a result I have rarely had to deal with any of the issues that SRDebugger suffered from. This also allowed me to use C# 6, which was unsupported by Unity at the time, as it can compile to a CIL 2.0 compatible form that Unity accepts.
Another major difference to the development of SRDebugger is the focus on automation during the build and submission phase. A big obstacle to patching and releasing updates for SRDebugger was the lengthy process of packaging the product for shipping. This time I decided I wanted to be able to run a batch file and have a package created and uploaded in an identical way each time. Luckily, I found an existing wrapper for the Unity Asset Store Tools that allowed for it to be invoked from the command line. Once set up this has been an incredible time saver. I copied this system back to SRDebugger as soon as I could.
Reception
People who have used the product have responded positively. It hasn’t been as successful as SRDebugger, possibly due to the more niche appeal. Nethertheless it has sold over 300 copies and has been featured a number of times in Unity promotions, including a “Sane and Sensible” sale that promoted assets to clean up your project and improve stability.