//public List<Dictionary<string, object>> colliderDataSet;

    #endregion

    #region MONOBEHVAVIOUR CALLBACKS

    private void Awake()
    {
        // Check if instance doesn't exist
        if (instance == null)
        {
            instance = this;
        }

        // If instance already exists and it's not this
        else if (instance != this)
        {
            // then destroy this. This enforces our singleton pattern, meaning there caan only one instance.
            Destroy(this);
        }

        // Sets this to not be destroyed when reloading scene
        DontDestroyOnLoad(gameObject);

        ReadDataFromFile();
    }
Example #2
0
 void Awake()
 {
     m_instance = this;
     Load();
 }