sschmid / Entitas

Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
MIT License
7.13k stars 1.11k forks source link

Code Generate throw NullReferenceException #693

Closed dreamfairy closed 6 years ago

dreamfairy commented 6 years ago

Hi,

I have have a question Here's some code

My Entitas version is 1.5.2. When I click the Generate Butoon in the Preferences Windows, I got an Exception below: nityEngine.GUIContent label, UnityEngine.GUIContent label2, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6187) UnityEditor.EditorGUILayout.LabelField (System.String label, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6143) DesperateDevs.Unity.Editor.PreferencesWindow.drawException (System.Exception exception) DesperateDevs.Unity.Editor.PreferencesWindow.drawContent () DesperateDevs.Unity.Editor.PreferencesWindow.OnGUI () System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/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 /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288) UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:107) UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:179)

but every component I writed is genertted successfully, I just canot tolerate the error. how can i fix it?

sschmid commented 6 years ago

Hi,

see Unity GUI bugs on Windows #583

This error doesn't affect the functionality of Entitas and can be ignored. Afaik, Unity has to fix this. They are currently using UnityEngine.Experimental.UIElements