Your comments

OMG I am seriously frustrated now :D. I am getting these errors over and over again. Now I have removed the saved .asset files from the Project and even after restarting the Unity, I am getting this warning + error when I add a Cube and press Play:


null texture passed to GUI.DrawTexture
UnityEngine.GUI:DrawTexture(Rect, Texture)
GDUVEditor:DrawGUI(Int32)
GDUVEditor:OnGUI()
UnityEditor.DockArea:OnGUI()

MissingReferenceException: The object of type 'Material' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Material.SetColor (System.String propertyName, Color color)
GDUVEditor.DrawUV (Boolean uv2)
GDUVEditor.DrawGUI (Int32 id)
GDUVEditor.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)


Now I have to reinstall GameDraw again I think.


I had to remove GameDraw, restart Unity and import again. It's working again (for now :)).


Another bug I have found is this:

When I am saving the object to .asset it works. Then when I am saving it again using the same name and in the same place, then the object from the Hierarchy is not usable anymore (Missin Mesh in the inspector, after manually picking the mesh weird things are going on). I have to remove it and instead add the one I have just saved as an .asset, if I don't do this, I am getting this error all the time:


MissingReferenceException: The object of type 'Mesh' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Object.Instantiate (UnityEngine.Object original)
GameDraw.GDController.set_selectedMesh (Int32 value)
GameDrawEditor.GDEditor.DrawSceneGUI ()
MeshFilterEditor.OnSceneGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.SceneView.CallOnSceneGUI ()
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI ()
UnityEditor.SceneView.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)


I don't know if my explanation is entirely correct or maybe this error occur only sometimes, but something is not right one way or the other.

Is there a way to use these UV transform operations only on some faces and not on the whole object?



The other bug I have found is that I am getting really frequently these set of warning + error being spam in the console (and the game is paused, the only way to fix this is by removing the objects from the Hierarchy or by restarting Unity, without the restart I can't use GameDraw anymore, because I get this error all the time):


null texture passed to GUI.DrawTexture
UnityEngine.GUI:DrawTexture(Rect, Texture)
GDUVEditor:DrawGUI(Int32)
GDUVEditor:OnGUI()
UnityEditor.DockArea:OnGUI()

MissingReferenceException: The object of type 'Material' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Material.SetColor (System.String propertyName, Color color)
GDUVEditor.DrawUV (Boolean uv2)
GDUVEditor.DrawGUI (Int32 id)
GDUVEditor.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)


I am not sure when this occur. One time I have pressed CMD + Z to undo when I was in the infamous UV editor with the white grid, and this bug has been executed :)


Now after restarting the Unity I still can't use GameDraw. I am getting warning + error spam in the console even without pressing the Play Button:


null texture passed to GUI.DrawTexture
UnityEngine.GUI:DrawTexture(Rect, Texture)
GDUVEditor:DrawGUI(Int32)
GDUVEditor:OnGUI()
UnityEditor.DockArea:OnGUI()

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[GameDrawEditor.MaterialSettings].get_Item (Int32 index) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Collections.Generic/List.cs:633)
GDUVEditor.HighlightVertex (Boolean uv2)
GDUVEditor.DrawGUI (Int32 id)
GDUVEditor.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)



What should I do now? :D

Another bug (I think so):

Go to the Edit UVs, uncheck Instant Update and change the Scale UV X to 5. Then press Make Cubic. Then try to translate the uv by some value. Now you should see that the texture scale has been changed to the value from just before the "Make Cubic" option has been pressed.


To work around this I need to press "Make Cubic" when the Instant Update is checked. Then I can uncheck it and it works as it should.

Wow :) I am going to check every single option one by one so I would hopefully figure this out eventually :D Thank you.


Here is some other bug:

Create a cube shape, save it as an exampleShape.asset. Remove from the Hierarchy. Then add that exampleShape.asset from the Project to the Hierarchy. That shape will be pink and without any material. If you will then go to the UV Edit window (the one with the white grid), then you will get an error spam in the console:


NullReferenceException
UnityEngine.Material.get_mainTexture ()
GDUVEditor.DrawMaterialSettings ()
GDUVEditor.DrawGUI (Int32 id)
GDUVEditor.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)



Is there any documentation? I would for example want to know what are these options in the GameDrawManager. Max Object Count, Message Read and so on.