Skip to content

Commit c8420bd

Browse files
feat: improve error message for incorrect use of DestroyInstance, so it explains that the ArgumentException can be caused by calling that method on the same object more than once
1 parent 99aa16e commit c8420bd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Runtime/Behaviour/Factory/ElympicsFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ internal void DestroyInstance(GameObject go)
5858
if (!_playersObjects.TryGetValue(go, out var player))
5959
{
6060
const string message = "Trying to destroy an object not instantiated by Elympics. "
61-
+ "This may also be a result of using an incorrectly cached reference after reconciliation.";
61+
+ "This may also be a result of using an incorrectly cached reference after reconciliation or trying to destroy the same object more than once.";
6262
ElympicsLogger.LogError(message, go);
6363
throw new ArgumentException(message, nameof(go));
6464
}

0 commit comments

Comments
 (0)