Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StateViz AnimationEffect - DrawIf property exception spam #324

Closed
IssueSyncBot opened this issue Aug 21, 2023 · 1 comment
Closed

StateViz AnimationEffect - DrawIf property exception spam #324

IssueSyncBot opened this issue Aug 21, 2023 · 1 comment
Labels
Type: Bug A problem with an existing feature that can be fixed with the next patched release.

Comments

@IssueSyncBot
Copy link

IssueSyncBot commented Aug 21, 2023

Original issue opened by:

@holomatt holomatt


Describe the bug

PR: microsoft/MixedRealityToolkit-Unity#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

  1. Add PressableButton to a GameObject
  2. Add StateViz to the same GameObject
  3. 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)

  • Unity Version [e.g. 2018.3.11f1]
  • MRTK Version [e.g. 3.0.0-preview.14

ISSUE MIGRATION

Issue migrated from: microsoft/MixedRealityToolkit-Unity#11436

@IssueSyncBot IssueSyncBot added MRTK3 Type: Bug A problem with an existing feature that can be fixed with the next patched release. labels Aug 21, 2023
@IssueSyncBot
Copy link
Author

Original comment by:

@AMollis AMollis


Fixed with this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug A problem with an existing feature that can be fixed with the next patched release.
Projects
None yet
Development

No branches or pull requests

1 participant