PUN Tutorial Section 5, moving but not animating

I'm working through the tutorials (excellent, so far, by the way) and the Animator isn't doing what I expect it to do.

I'm in Unity 2021.1.21f1, PUN 2 v 2.26

First, there isn't a "Robot KyleAvatar" as shown in the screenshot (I've tested with both no avatar and "HumanoidRunAvatar") - and that may be the root of my problem?

Running the "Kyle Test" scene, the avatar skates along the ground, but does not animate.

Hacking up the "My Robot Kyle -done-" prefab that comes with the package also just skates,doesn't animate.

Looking at the actual animations inside the animator, and they do animate!

Help?

Best Answer

  • Tobias
    Tobias admin
    edited October 2021 Answer ✓

    Took a while to look into this, sorry.

    there isn't a "Robot KyleAvatar" as shown in the screenshot

    I can find "Robot KyleAvatar" in the project panel but opening the location in explorer doesn't show the file. Unity shows this part of the Robot Kyle.fbx as separate item. I find this also in 2021.1.15. Odd it's been missing in your case!

    the "My Robot Kyle -done-" prefab that comes with the package also just skates,doesn't animate

    So far, I only found that this reproduces rarely in the editor (for me). I think the problem is related to PhotonTransformView.Update(), which is framerate dependent by accident. It means the character may still be on the way to the target position, while the animation already finished playing. This may happen, because both are individual components.

    I'll include a change for the PhotonTranformView in the next update. This should improve matters with the component. Alternatively, use the PhotonTranformViewClassic.

Answers

  • The complete results of the tutorial should be in the package. If Kyle "isn't there", then that will be a problem, yes.

    I would update and re-import PUN 2.37. It does not make sense to do tutorials on outdated PUN versions. Potentially, the import was incomplete anyways, as Kyle doesn't show up.

    Maybe this helps?

  • I typed it wrong, it shows it as version 2.36 (not 2.37)... Kyle shows up, he just doesn't walk (he slides).

    In my package manager, it says 2.36 is the current version.

  • So you checked out the tutorial results which are in the package?

    Did you click "Configure Demos (build setup)" in the Photon Unity Networking submenu?

    Not to dismiss this issue but it still sounds like a problem with the import and or Unity. I would re-download and import the package once more.

    I just tried once more in 2018.4 and it worked. So overall .. it should do.

  • At this point I'm done with the tutorial and I don't need the animation for what I'm actually doing, it just seemed anomalous that it didn't work given the overall excellent character of the tutorial to that point.

  • I'll try to have a look into this.

    Thanks for the input and hopefully everything else is working out.

  • Tobias
    Tobias admin
    edited October 2021 Answer ✓

    Took a while to look into this, sorry.

    there isn't a "Robot KyleAvatar" as shown in the screenshot

    I can find "Robot KyleAvatar" in the project panel but opening the location in explorer doesn't show the file. Unity shows this part of the Robot Kyle.fbx as separate item. I find this also in 2021.1.15. Odd it's been missing in your case!

    the "My Robot Kyle -done-" prefab that comes with the package also just skates,doesn't animate

    So far, I only found that this reproduces rarely in the editor (for me). I think the problem is related to PhotonTransformView.Update(), which is framerate dependent by accident. It means the character may still be on the way to the target position, while the animation already finished playing. This may happen, because both are individual components.

    I'll include a change for the PhotonTranformView in the next update. This should improve matters with the component. Alternatively, use the PhotonTranformViewClassic.