Input Problems

Hello all, This seems like the best place to put this.

So I was following this but a bit different (Editor window with OnSceneGUI & Handles instead) How to Add Your Own Tools to Unity’s Editor | Envato Tuts+ and ran into a quite annoying problem, mainly in step 3, which is if the number in the public variable for each when 0 or nothing is in the input box because of back spacing it will freeze unity to where I have to taskbar it dead. Is there a way to prevent this? I’ve tried clamping and various ways of setting but it will still crash when no input is present.

If width or height are 0, you are getting an infinite loop. Before you enter the loop, you can check whether width is e.g. smaller than one and if it is, just set it to one. The same holds for height.

got it thanks.