Search Unity

Animations play in editor but not in build, REAAALLY need some help

Discussion in 'Animation' started by Steve_Taylor, Jun 14, 2018.

  1. Steve_Taylor

    Steve_Taylor

    Joined:
    Jun 14, 2018
    Posts:
    2
    I've got a deadline coming up, so any feedback on this would be really appreciated, but the animations on my player model just aren't working in builds of the game, though they play fine in editor.

    It does give an error: "Could not produce class with ID 1108"

    Would anyone be able to point me in the right direction with any of this?
    I'd have something to work with if the error had some documentation to go with, or if the editor and build were consistent with one another.
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Steve_Taylor likes this.
  3. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Hi, i'm wondering how you managed to do this.

    class id 1108 is our internal animation clip that we create for all the previewer, so somehow your animation clip are instantiated as an internal animation clip which doesn't exist in the player, it an editor class only. :confused:

    We already do have an issue logged like this
    https://issuetracker.unity3d.com/is...180-error-pops-up-and-player-is-not-animating

    the user managed to fix his issue like this:
    I figured it out- all of the animations had the same name which was :
    nothing at all. (Null name)

    Could you confirm if it the same issue for you?
     
    Steve_Taylor and theANMATOR2b like this.
  4. Steve_Taylor

    Steve_Taylor

    Joined:
    Jun 14, 2018
    Posts:
    2
    Dude I could kiss you right now. It was straight up that, yeah. I was using exported animations, which all had no name. Renaming them all sorted the problem.

    Seriously thank you so much for taking the time to respond, you've made my week. :D
     
  5. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    We are wondering how it did happen.

    @Steve_Taylor Could you give us some repro steps on how you managed to have an exported animation with no name?
    Are you using our internal model importer to import your animation?
     
  6. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    438
    I have the same error, but I don't know of any animations that are not playing.
    (Maybe QA hasn't noticed yet)

    Since the corresponding bug is closed with "Won't fix", please post the appropriate workaround steps.

    Thanks in advance.
     
  7. FKInno

    FKInno

    Joined:
    Dec 13, 2017
    Posts:
    7
    I have the same issue after switching from 2019.1.13 to 2019.2.3. I checked and none of the models have animations without a name. the error does not seem to affect the game and i cant find any animations that are missing or not playing. Engine stripping is disabled.
    Any hint on finding the issue is appreciated.
     
  8. faolad

    faolad

    Joined:
    Jan 27, 2013
    Posts:
    118
    same
     
  9. miquelgiru

    miquelgiru

    Joined:
    Oct 26, 2017
    Posts:
    1
    same here
     
  10. DebaJr

    DebaJr

    Joined:
    May 11, 2020
    Posts:
    1
    I had the same problem. The animations from the .fbx exported from Blender I was using were named, but marked as "Read Only".
    "Solved" it by creating new animations, clicking the "Show Read Only Properties" from the animation window and copy>>pasting the key frames. Not optimal, but it is a workaround if you have just a few animations. :)
    A robust solution is required though... did anyone make progress on this topic?
     
  11. C-Gabriel

    C-Gabriel

    Joined:
    Jan 27, 2016
    Posts:
    119
    Hello,

    @Mecanim-Dev I ran into the same problem. Animations are fine in the editor but not in the game. The problem is that the anim controller seems to be using the preview animation clip instead of the original one (like in the image). That's most likely happening because I create the anim controller programmatically like so:

    Code (CSharp):
    1. var controller = AnimatorController.CreateAnimatorControllerAtPath(controllerPath);
    2. var baseLayer = controller.layers[0];
    3. var rootStateMachine = baseLayer.stateMachine;
    4. var pose = rootStateMachine.AddState(fileName);
    5. pose.motion = AssetDatabase.LoadAllAssetsAtPath(assetPath).FirstOrDefault(x => x is Motion) as Motion;
    6. baseLayer.stateMachine.defaultState = pose;
    Hope it helps

    animations error.jpg
     
  12. Davex6

    Davex6

    Joined:
    Mar 29, 2023
    Posts:
    49