gamedev-pro / dmotion

DMotion - A high level Animation Framework for Unity DOTS
Other
491 stars 47 forks source link

About Cilp Asset Error #27

Closed ub3132003 closed 1 year ago

ub3132003 commented 1 year ago

I ctreat a new Cilp Asset ,then fill the Ainmation and Object in . then Editor Reprote Error. I'm guessing it's due to Object or animation settings. But can't help it.

[Exception] NullReferenceException: Object reference not set to an instance of an object
PlayableGraphPreview.TryInstantiateSkinnedMesh() at E:/github/dmotion/Editor/EditorPreview/PlayableGraphPreview.cs:105
104:   //Make sure mesh is alined to view
-->105:   skinnedMeshRenderer.transform.up = Vector3.up;
106:   skinnedMeshRenderer.transform.forward = Vector3.forward;

PlayableGraphPreview.set_GameObject() at E:/github/dmotion/Editor/EditorPreview/PlayableGraphPreview.cs:23
21:   {
22:       get => gameObject;
-->23:       set => SetGameObjectPreview(value);
24:   }

AnimationClipAssetEditor.OnInspectorGUI() at E:/github/dmotion/Editor/CustomEditors/AnimationClipAssetEditor.cs:37
35:   {
36:       EditorGUILayout.LabelField("Preview Object");
-->37:       preview.GameObject = (GameObject)EditorGUILayout.ObjectField(preview.GameObject, typeof(GameObject), false);
38:   }
39:   using (var c = new EditorGUI.ChangeCheckScope())

InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0() at <e81fd0dbcaf744fea01e9bb4f87abc3a>:0

GUIUtility.ProcessEvent()
`[Exception] NullReferenceException: Object reference not set to an instance of an object
AnimationClipAssetEditor.OnInspectorGUI() at E:/github/dmotion/Editor/CustomEditors/AnimationClipAssetEditor.cs:37
35:   {
36:       EditorGUILayout.LabelField("Preview Object");
-->37:       preview.GameObject = (GameObject)EditorGUILayout.ObjectField(preview.GameObject, typeof(GameObject), false);
38:   }
39:   using (var c = new EditorGUI.ChangeCheckScope())

InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0() at <e81fd0dbcaf744fea01e9bb4f87abc3a>:0

GUIUtility.ProcessEvent()

`

gabrieldechichi commented 1 year ago

Thanks for the report. Will be looking to fix this for version v0.4

gabrieldechichi commented 1 year ago

Bug fixed on v0.4.0