Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (29 sloc) 3.03 KB
title thumbnail permalink frontpage description order
TypeSafe
/assets/images/thumbnails/typesafe.png
/projects/typesafe/
false
Editor Utility for the Unity engine. Generates code to eliminate naked-strings.
6

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][asset-store-batch-mode] 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.

Links

  • [Product Page][product_page]
  • [Asset Store Page][asset_store_page]

[banner]: {{"/assets/images/project_srdebugger/banner.png" | relative_url }} [srdebugger]: {{ site.baseurl }}{% link _posts/projects/2017-06-01-srdebugger.md %} [product_page]: https://www.stompyrobot.uk/tools/typesafe/ [asset_store_page]: https://www.assetstore.unity3d.com/#!/content/35903 [asset-store-batch-mode]: https://github.com/thinksquirrel/asset-store-batch-mode