In the previous chapter, you saw a glimpse of the trouble a Unity3D developer has to go through. We had to make sure our code still worked and even compiled by using statements such as #if WINDOWS_UWP
or #if UNITY_EDITOR
.
I promised you that we would fix this, and we will do that right now. However, it will not be easy or pretty. The code will be much more readable, but you will have a lot more work than you might want to do. As usual, programming is always a trade-off between clean code and quick code. There is no such thing as clean and quick.