Submissions from 2017-10-17 to 2017-10-18 (1 total)

Worked on the custom editor for my TileMask object. As promised, I made it much easier to modify the 'mask' to allow more interesting shapes:

As you can see, updating the inspector buttons updates the valid tiles in real time. Neat!

This looks pretty trivial, and it is, but it took me a while to shake the rust off of my Editor scripting skills. Initially, I ran into the age-old issue that Unity can't serialize 2D arrays, so my changes were never persisting through a Play session. Cue converting a 2D array to a flattened 1D array. Next, I had issues with the width/height changing causing the Editor to spew OutOfRange exceptions because the underlying array was not changed. Cue "BeginChangeCheck" in the custom editor code, and I finally have a working solution. Mostly.

I still haven't tackled the main design issue I mentioned in the last post, but that will have to wait till another day