Search Issue Tracker

Fixed in 5.6.0

Votes

0

Found in

Issue ID

856669

Regression

Yes

Error when exiting play mode for 2D Scrolling Shooter (Unity A$ 2D Pack 2.0)

Physics2D

-

Error when exiting play mode for 2D Scrolling Shooter (Unity A$ 2D Pack 2.0)

Steps to Repro:

1. import the Unity 2D Pack 2.0 from the A$
2. open the Main scene for 2D Scrolling Shooter and click on Play to start
3. press X to start the gameplay and wait for an enemy ship to appear
4. click on Play again to stop the game

The following error occurs:

MissingReferenceException: The object of type 'GameObject' 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.
ObjectPool.PoolObject (UnityEngine.GameObject obj) (at Assets/Example Games/2D Scrolling Shooter/Scripts/ObjectPool.cs:111)
DestroyArea.OnTriggerExit2D (UnityEngine.Collider2D c) (at Assets/Example Games/2D Scrolling Shooter/Scripts/DestroyArea.cs:18)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.