using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//Author: SkyAllen Email: 894982165@qq.com Website: www.ytn0.com
namespace MPStudio
{

    
[DisallowMultipleComponent]
[DefaultExecutionOrder(-2)]
public class Root : MonoBehaviour
{
    public static Root Inst;
    
    
    private void Awake()
    {
        Debug.Log("root awake");
        DontDestroyOnLoad(this.gameObject);
        if (Inst == null)
        {
            Inst = this;
        }
        else if (Inst != this)
        {
            throw new System.Exception("Duplicate instances");
            Destroy(gameObject);
        }
    }

    public void LoadScene(int id)
    {
        SceneryManager.Inst.LoadScene(id);
    }
}
}