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

Calling SendCustomEvent from AnimationEvent #58

Closed
ikuko opened this issue Oct 5, 2020 · 0 comments
Closed

Calling SendCustomEvent from AnimationEvent #58

ikuko opened this issue Oct 5, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ikuko
Copy link

ikuko commented Oct 5, 2020

Describe the bug in detail:
Call SendCustomEvent from AnimationEvent using Animator etc.
Some situations cause problems when running in the editor.

Provide steps/code to reproduce the bug:

  1. Prepare the following USharp code and set it in UdonBehaviour.
public class Test : UdonSharpBehaviour
{
    int num;

    private void Start()
    {
        num = 123;
    }

    public void Method()
    {
        Debug.Log($"num={num}");
    }
}
  1. Execute SendCustomEvent with "Method" argument in AnimationEvent.

  2. When executed in the editor, the following is output to the console.

num=123
num=0

The first output is the result of being run via Udon Behavior.
The second output is the result of a reflection run via UdonSharpBehaviour.

Expected behavior:
It should only be called once, but it has been called twice.
The second call should not be made.

Additional Information:
Provide any additional information here.

@ikuko ikuko added the bug Something isn't working label Oct 5, 2020
@MerlinVR MerlinVR self-assigned this Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants