0
Under review

optimize mesh bug

luyask lolo 11 years ago updated by GameDraw 11 years ago 1

hi, whenever I try to optimize mesh by pressing Initialize then I got the bug like this:

NullReferenceException: Object reference not set to an instance of an object

GameDrawEditor.DecimateEditor.UnCollapse (GameDrawEditor.DecimateHistory his)

GameDrawEditor.DecimateEditor.DoProgressiveMesh (Single ratio)

GameDrawEditor.DecimateEditor.Calculate (UnityEngine.Mesh tmpMesh)

GameDrawEditor.GDDecimator.DrawGUI ()

GameDrawEditor.GDEditor.DrawOptimizeGUI ()

GameDrawEditor.GDEditor.DrawOptimizeGUIWindow (Int32 id)

UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)

UnityEngine.GUI+_Window.Do ()

UnityEngine.GUI.BeginWindows (Int32 skinMode, UnityEngine.IDList idlist, Int32 editorWindowInstanceID)

UnityEditor.EditorGUIInternal.BeginWindowsForward (UnityEngine.Event e, Int32 skinMode, UnityEngine.IDList idlist, Int32 editorWindowInstanceID)

UnityEditor.EditorWindow.BeginWindows ()

UnityEditor.SceneViewOverlay.Begin ()

UnityEditor.SceneView.OnGUI ()

System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)


and this:


MissingReferenceException: The object of type 'GameObject' 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.GameObject.GetComponent[MeshFilter] ()

GameDrawEditor.GDDecimator.checkSharedMeshIsSet ()

GameDrawEditor.GDDecimator.DrawGUI ()

GameDrawEditor.GDEditor.DrawOptimizeGUI ()

GameDrawEditor.GDEditor.DrawOptimizeGUIWindow (Int32 id)

UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)

UnityEngine.GUI+_Window.Do ()

UnityEngine.GUI.BeginWindows (Int32 skinMode, UnityEngine.IDList idlist, Int32 editorWindowInstanceID)

UnityEditor.EditorGUIInternal.BeginWindowsForward (UnityEngine.Event e, Int32 skinMode, UnityEngine.IDList idlist, Int32 editorWindowInstanceID)

UnityEditor.EditorWindow.BeginWindows ()

UnityEditor.SceneViewOverlay.Begin ()

UnityEditor.SceneView.OnGUI ()

System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)



In Create new models section: when I choose Primitives, there is nothing to choose, but when I try this with unity4 then it works. When I choose Utilities, I try to assign 2 textures that are imported, then press Execute , no mesh get generated, just an empty gameobject get created, and sometime there is a bug thrown


I use unity free 3.5.7f with plugin iOS and android basic and gamedraw pro

What did I do wrong?

Answer

Answer
Under review

Hi,


Regarding the decimation, can you send me the file you are trying to optimize if possible! if not is it a skinned mesh? what is the vertex and triangle count on the mesh?


for inst3D, make sure that the areas you want to ignore are with an alpha channel equal to zero and make sure that the textures import settings are readable and the texture format is ARGB32.





Answer
Under review

Hi,


Regarding the decimation, can you send me the file you are trying to optimize if possible! if not is it a skinned mesh? what is the vertex and triangle count on the mesh?


for inst3D, make sure that the areas you want to ignore are with an alpha channel equal to zero and make sure that the textures import settings are readable and the texture format is ARGB32.





Hi, I've managed to optimize the mesh, not sure why there was a bug like that, the vertexes, triangles are about 20k. It is not a skinned mesh by the way.

About inst3d, I've figured out that the texture size input should be <= 256 x 256, otherwise it won't work