Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

StateMachineBehavior doesn't work in Unity5.3 WebGL

Discussion in 'WebGL' started by QingtaoPeng, Dec 15, 2015.

  1. QingtaoPeng

    QingtaoPeng

    Joined:
    Dec 10, 2015
    Posts:
    1
    Hi Unity team,

    My game exported with Unity5.3 WebL failed running and following errors were shown in Javascript console:

    Script error (CreateBoard): OnStateEnter() can not take parameters.
    Script error (CreateBoard): OnStateExit() can not take parameters.
    Script error (CreateBoard): OnStateUpdate() can not take parameters.

    However, it runs well when exported with Unity5.2.

    My class "CreateBoard" extends the class "StateMachineBehavior". So it seems that the method signature in StateMachineBehavior has been changed in Unity5.3.

    Can you take a look at this issue?

    Thanks,
    Peter
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    I just created a simple test with a StateMachineBehavior in 5.3f4. I don't get any error and the callbacks are executed correctly. If you have a simple repro project, feel free to submit it in a bug report and post the bug number here.
     
  3. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    It turns out, this is actually a bug but it's only reproducible if Stripping is enabled. Fix is coming in 5.3 patch 1.
     
    p87 likes this.
  4. a3dline

    a3dline

    Joined:
    Dec 28, 2013
    Posts:
    17
    itself and also in Xcode

    Script error (FadeAnimatorF): OnStateUpdate() can not take parameters.
    (Filename: /Users/builduser/buildslave/unity/build/Runtime/Mono/MonoScriptCache.cpp Line: 411)
    Script error (FadeAnimatorF): OnStateMove() can not take parameters.
    (Filename: /Users/builduser/buildslave/unity/build/Runtime/Mono/MonoScriptCache.cpp Line: 411)
    Script error (FadeAnimatorF): OnStateIK() can not take parameters......

    it worked on Unity 5.2 correctly
    when will the patch ?
     
  5. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    quick update to let you know that the next release will be 5.3.1 (not the patch) and the fix will not be included.
     
  6. a3dline

    a3dline

    Joined:
    Dec 28, 2013
    Posts:
    17
    ok. when are you fix this bug? we can't release update.
     
  7. a3dline

    a3dline

    Joined:
    Dec 28, 2013
    Posts:
    17
    give me please a link to bug tracker of this issue, so I can keep track of it
     
  8. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    753610