// Start is called before the first frame update void Start() { thisGameManager = GameObject.Find("Canvas").GetComponent <ThisGameManager>(); endPosition = new Vector3(transform.position.x, -6f, transform.position.z); transform.localScale = startScale; StartCoroutine(GenerateShot()); }
StreamingDataLoader loader;//资源复制 void Awake() { //1.给单例赋值 _instance = this; //2.StreamingDataLoader加载脚本 loader = gameObject.AddComponent <StreamingDataLoader>(); loader.LoadWithPath(new string[] { ConstData.dataBase }); }
private void Awake() { gm = GameObject.FindObjectOfType <ThisGameManager>(); }