suriyun-turnbase-rpg / unity-tbrpg-pun-arena

Realtime multiplayer game mode for Turnbase RPG template
MIT License
1 stars 1 forks source link

[Bug] Arena #2

Closed PerangonLine closed 2 years ago

PerangonLine commented 2 years ago

When the battle in arena ends, this error will appear during the second and subsequent battles, not in the first battle.

MissingReferenceException: The object of type 'UILose' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. UnityEngine.Component.GetComponent[T] () (at <82c503977c5347cf82f44677f633fcf6>:0) UIBase.ValidateRoot () (at Assets/RPGGame/UIUtilities/Scripts/UIBase.cs:30) UIBase.Show () (at Assets/RPGGame/UIUtilities/Scripts/UIBase.cs:40) UILose.Show () (at Assets/RPGGame/Core/Scripts/UI/Gameplay/UILose.cs:22) PunArena.Battle.PunArenaGameplayManager.OnUpdateGameplayState (System.Int32 winnerActorNumber, System.Int32 loserActorNumber) (at Assets/unity-tbrpg-pun-arena/Scripts/Battle/PunArenaGameplayManager.cs:221) PunArena.PunArenaManager.SendUpdateGameplayState (System.Int32 winnerActorNumber, System.Int32 loserActorNumber) (at Assets/unity-tbrpg-pun-arena/Scripts/PunArenaManager.cs:431) PunArena.Battle.PunArenaGameplayManager.NotifyEndAction (CharacterEntity character) (at Assets/unity-tbrpg-pun-arena/Scripts/Battle/PunArenaGameplayManager.cs:275) CharacterEntity.NotifyEndAction () (at Assets/RPGGame/Turnbase/Scripts/GamePlay/CharacterEntity.cs:748) CharacterEntity+d__86.MoveNext () (at Assets/RPGGame/Turnbase/Scripts/GamePlay/CharacterEntity.cs:459) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <82c503977c5347cf82f44677f633fcf6>:0)

insthync commented 2 years ago

Fixed, try the latest update.