Error and warning occur in the Animator View (SceneObjects)
Hello.
I create monsters as scene objects.
Sometimes error and warning occur in the Animator View. (but working well..)
[Warning]
PhotonAnimatorView: When using triggers, make sure this component is last in the stack.
If you still experience issues, implement triggers as a regular RPC
or in custom IPunObservable component instead
[Error]
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
(I think these warning and error are related to when the master is changed.)
Below is my animator and animator view.
("When using triggers, make sure this component is last in the stack." means that last component on the game object, right?)
I haven't figured out the exact cause of these yet.
If you know any information about these warning and error, please let me know...
Answers
-
Triggers in Animations are a known issue.
I can't help with that exception, as you don't post a callstack or anything. You should debug that and analyze if it's an error in our code or in yours. Why it's caused, etc.
1 -
I haven't been able to find the exact cause, but it was probably an issue in the link you commented on.
I changed the trigger variable to a boolean variable and modified functions related to animation.
And I confirmed that warnings and errors no longer occur.
Next time a new problem appears, I'll attach the callstack.
Thank you for reply.🌝
0 -
I too am getting an error due to PhotonAnimator and there is no traceback to what is causing it. I can say that it happens when there is more than one player. Unity says:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <31c0f51ac5a24a22ba784db24f4ba023>:0)
Photon.Pun.PhotonStreamQueue.ReceiveNext () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs:139)
Photon.Pun.PhotonAnimatorView.DeserializeDataContinuously () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs:363)
Photon.Pun.PhotonAnimatorView.Update () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs:148)
I'll post back when I get more info
0 -
I too am getting an error due to PhotonAnimator and there is no traceback to what is causing it. I can say that it happens when there is more than one player. Unity says:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <31c0f51ac5a24a22ba784db24f4ba023>:0)
Photon.Pun.PhotonStreamQueue.ReceiveNext () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs:139)
Photon.Pun.PhotonAnimatorView.DeserializeDataContinuously () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs:363)
Photon.Pun.PhotonAnimatorView.Update () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs:148)
I'll post back when I get more info
0 -
I too am getting an error due to PhotonAnimator and there is no traceback to what is causing it. I can say that it happens when there is more than one player. Unity Debug Console says:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <31c0f51ac5a24a22ba784db24f4ba023>:0)
Photon.Pun.PhotonStreamQueue.ReceiveNext () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs:139)
Photon.Pun.PhotonAnimatorView.DeserializeDataContinuously () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs:363)
Photon.Pun.PhotonAnimatorView.Update () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs:148)
and my build says:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <31c0f51ac5a24a22ba784db24f4ba023>:0
at Photon.Pun.PhotonStreamQueue.ReceiveNext () [0x00042] in F:\SDSDInk\Video Games\Unity\Games\D\Dungeon Tormentia\The Dungeon Tormentia\Assets\_Imports\Tools\Photon\PhotonUnityNetworking\Code\PhotonStreamQueue.cs:139
at Photon.Pun.PhotonAnimatorView.DeserializeDataContinuously () [0x00037] in F:\SDSDInk\Video Games\Unity\Games\D\Dungeon Tormentia\The Dungeon Tormentia\Assets\_Imports\Tools\Photon\PhotonUnityNetworking\Code\Views\PhotonAnimatorView.cs:363
at Photon.Pun.PhotonAnimatorView.Update () [0x00085] in F:\SDSDInk\Video Games\Unity\Games\D\Dungeon Tormentia\The Dungeon Tormentia\Assets\_Imports\Tools\Photon\PhotonUnityNetworking\Code\Views\PhotonAnimatorView.cs:148
(Filename: F:/SDSDInk/Video Games/Unity/Games/D/Dungeon Tormentia/The Dungeon Tormentia/Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs Line: 139)
I'll post back when I get more info on this.
0 -
I too am getting an error due to PhotonAnimator and there is no traceback to what is causing it. I can say that it happens when there is more than one player. Unity Debug Console says:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <31c0f51ac5a24a22ba784db24f4ba023>:0)
Photon.Pun.PhotonStreamQueue.ReceiveNext () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs:139)
Photon.Pun.PhotonAnimatorView.DeserializeDataContinuously () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs:363)
Photon.Pun.PhotonAnimatorView.Update () (at Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs:148)
and my build says:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <31c0f51ac5a24a22ba784db24f4ba023>:0
at Photon.Pun.PhotonStreamQueue.ReceiveNext () [0x00042] in F:\SDSDInk\Video Games\Unity\Games\D\Dungeon Tormentia\The Dungeon Tormentia\Assets\_Imports\Tools\Photon\PhotonUnityNetworking\Code\PhotonStreamQueue.cs:139
at Photon.Pun.PhotonAnimatorView.DeserializeDataContinuously () [0x00037] in F:\SDSDInk\Video Games\Unity\Games\D\Dungeon Tormentia\The Dungeon Tormentia\Assets\_Imports\Tools\Photon\PhotonUnityNetworking\Code\Views\PhotonAnimatorView.cs:363
at Photon.Pun.PhotonAnimatorView.Update () [0x00085] in F:\SDSDInk\Video Games\Unity\Games\D\Dungeon Tormentia\The Dungeon Tormentia\Assets\_Imports\Tools\Photon\PhotonUnityNetworking\Code\Views\PhotonAnimatorView.cs:148
(Filename: F:/SDSDInk/Video Games/Unity/Games/D/Dungeon Tormentia/The Dungeon Tormentia/Assets/_Imports/Tools/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs Line: 139)
I'll post back when I get more info on this.
0 -
This occurred to me consistently following a reconnection-and-rejoin of a client after they had been disconnected for inactivity. The following two changes were sufficient to detect a bad state and prevent the error.
0 -
Follow up, I needed these null checks. I think what's happening is bad data is in the stream queue and it's not checking if the read failed so it crashes when it tries to cast null to a non nullable type.
0 -
Sorry for the lack of input.
Could it be that the component is writing more or less values, depending on some state? Or was some "Observable" component added or removed on a remote client?
Then the length for the update stream is variable and needs checking.
0