"Invalid layer index 2" warning from Photon Animator View

Options

When I create a room, if anyone joins the editor starts spamming the "Invalid Layer Index 2" error cause by one of the Photon Animator View components.

The problem is that none of my animator views have 3 layers. All of them either have 1 layer or 2, so the max index is 1.

I can't trace the source of this warning and idk if it directly affects the gameplay in any way, but just the warnings in themselves that it spams generate a lot of garbage. This is an open-world mobile game so optimization needs to be tight.I have to solve the cause of these warnings. Any help is appreciated

Answers

  • Tobias
    Options

    Sorry for the late reply.

    A callstack could be interesting to know from where this log gets spammed.

    Are you using the PhotonAnimatorView? Maybe check each prefab's use of them. Possibly reset them to have them check the layers again?

  • I think I've solved the problem, it seems that although the error was coming from some Photon Animator View method that was trying to send layer data through the network, the problem was probably caused by the photon animator view game object being deparented and reparented to the photon view game object at runtime.

    Avoiding this reparenting seems to have solved it, but it's still a mystery for me why it was trying to sync the 3rd layer when no animator in my game has more than 2.