This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
Console spams exceptions while interacting with StateViz while an Animation type effect is attached.
DrawIf operates on the object being serialized. In this case, we have a StateVisualizer that is being serialized, which contains a simple serializable class: AnimationEffect. AnimationEffect makes use of 'drawif' referencing one of its members, but AnimationEffect is not a monobehavior and will only ever be serialized in the context of another object. In this case, StateVisualizer. When the DrawIf attribute code is invoked, it looks for the specified property name (weightMode) on the object being serialized (a StateVisualizer) and throws an error because that doesn't exist.
To reproduce
Add PressableButton to a GameObject
Add StateViz to the same GameObject
Add Animation effect type to any StateViz outlet
Observed behavior
Console spams exception:
DrawIfAttribute couldn't find the SerializedProperty to compare against! (property name: weightMode)
Expected behavior
No exception spam.
Screenshots
If applicable, add screenshots to help explain your problem.
Your setup (please complete the following information)
This issue has been migrated a new MRTK repository, and the status of this issue will now be tracked at the following location:
Describe the bug
PR: https://github.com/microsoft/MixedRealityToolkit-Unity/pull/11438
Console spams exceptions while interacting with StateViz while an Animation type effect is attached.
DrawIf operates on the object being serialized. In this case, we have a StateVisualizer that is being serialized, which contains a simple serializable class: AnimationEffect. AnimationEffect makes use of 'drawif' referencing one of its members, but AnimationEffect is not a monobehavior and will only ever be serialized in the context of another object. In this case, StateVisualizer. When the DrawIf attribute code is invoked, it looks for the specified property name (weightMode) on the object being serialized (a StateVisualizer) and throws an error because that doesn't exist.
To reproduce
Observed behavior
Console spams exception:
DrawIfAttribute couldn't find the SerializedProperty to compare against! (property name: weightMode)
Expected behavior
No exception spam.
Screenshots
If applicable, add screenshots to help explain your problem.
Your setup (please complete the following information)