nickgravelyn/UnityToolbag — pull request #3 by reydanro (2014-04-12 15:27:58+00:00)
Title: fixed bug with re-ordered sorting layers

The existing implementation assumes that `sortingLayerID` is equal to the index in the sortingLayerNames. This is not true if the user reorders the sorting layers.

This implementation uses the sorting layer names instead of IDs. It searches the current selected index based on the sorting layer name, and sets the `sortingLayerName` based on the newLayerIndex and the sortingLayerNames array.