Browse Source

Singleton.cs edited online with Bitbucket changed Destroy(this gameobject) to Destroy(this)

master
Joshua Reason 5 years ago
parent
commit
2f5c25366e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      Assets/Scipts/Utility/Singleton.cs

+ 1
- 1
Assets/Scipts/Utility/Singleton.cs View File

@ -20,7 +20,7 @@ public class MonoSingleton : MonoBehaviour where T : MonoSingleton
private void SetAsSingleton()
{
if (Instance != null && Instance != this)
Destroy(this.gameObject);
Destroy(this);
else
Instance = (T)this;

Loading…
Cancel
Save