- changed status to open
UnityActions causing NRE
- Created a class with the following:
[Tooltip("Called when an object enters the trigger.")]
public UnityAction<Collider> onTriggerEnter;
The component inspector doesn't render and I get the following error:
The following exception was thrown when drawing property onTriggerExit with the following chain of property value drawers:
PropertyContextMenuDrawer<UnityAction<Collider>>, ReferenceDrawer<UnityAction<Collider>>, FixUnityNullDrawer<UnityAction<Collider>>, TooltipAttributeDrawer, DelegateDrawer<UnityAction<Collider>>, ReferencePathConflictDrawer<UnityAction<Collider>>, ReferenceValueConflictDrawer<UnityAction<Collider>>, NullableReferenceDrawer<UnityAction<Collider>>.
UnityEngine.Debug:LogError(Object)
Sirenix.OdinInspector.Editor.InspectorUtilities:DrawProperty(InspectorProperty, GUIContent) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/InspectorUtilities.cs:453)
Sirenix.OdinInspector.Editor.InspectorUtilities:DrawProperty(InspectorProperty) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/InspectorUtilities.cs:360)
Sirenix.OdinInspector.Editor.InspectorUtilities:DrawPropertiesInTree(PropertyTree) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Misc/InspectorUtilities.cs:338)
Sirenix.OdinInspector.Editor.PropertyTree:Draw(Boolean) (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/PropertyTree.cs:158)
Sirenix.OdinInspector.Editor.OdinEditor:OnInspectorGUI() (at C:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/OdinEditor.cs:195)
UnityEditor.DockArea:OnGUI()
-
Add the same code to any class. Open unity.
-
Wouldn't help.
-
Version 5.6.2f1.
-
1.0.5.0 (Instruction on the issue reporting is wrong. Odin is in tools menu)
-
Windows 7 64 bit
Comments (4)
-
-
Sorry, accidentally reported anonymously. I'm having the problem. (posting just to get notifications).
-
- changed status to resolved
Alright, I've fixed this issue. Do note that you will have to use Odin's serialization (IE, derive from SerializedMonoBehaviour, etc) in order to see it in the inspector and have it be persisted, since Unity will not serialize it on its own.
If you'd like a build with the hotfix included, please send me a mail with your Odin invoice id at tor@sirenix.net, and I will send you a build immediately :)
-
No problem! I'll wait for the next release. I've already added a patch here.
- Log in to comment
Thanks for reporting this - just replicated it, and I'll take a look at it promptly :)