[Bug] Fix issue with singleton providers when reloading levels
This commit is contained in:
@@ -33,11 +33,6 @@ public class InputManager : MonoBehaviour
|
|||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
if (_instance != null && _instance != this)
|
|
||||||
{
|
|
||||||
Destroy(gameObject);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_instance = this;
|
_instance = this;
|
||||||
DontDestroyOnLoad(gameObject);
|
DontDestroyOnLoad(gameObject);
|
||||||
playerInput = GetComponent<PlayerInput>();
|
playerInput = GetComponent<PlayerInput>();
|
||||||
|
|||||||
@@ -33,11 +33,6 @@ public class PuzzleManager : MonoBehaviour
|
|||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
if (_instance != null && _instance != this)
|
|
||||||
{
|
|
||||||
Destroy(gameObject);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_instance = this;
|
_instance = this;
|
||||||
DontDestroyOnLoad(gameObject);
|
DontDestroyOnLoad(gameObject);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user