// Use this for initialization void Start() { this.degree = 0f; this.sceneDirSC = GameObject.Find("SceneDirector").GetComponent <SceneDir> (); this.player = GameObject.Find("front01"); this.black = new Color(0.0f, 0.0f, 0.0f, 1.0f); }
// Use this for initialization void Start() { this.speed = 0.1f; this.theta = 0f; this.timer = 0f; this.sceneDirSC = GameObject.Find("SceneDirector").GetComponent <SceneDir> (); this.player = GameObject.Find("front01"); this.rabbitPos = Instantiate(rabbitPosPrefab); this.material = transform.GetChild(1).gameObject.GetComponent <Renderer> ().material; }
private void GetSceneList() { sceneList = new Dictionary <string, SceneInfo>(); string _progressTitle = "获取场景"; EditorUtility.DisplayProgressBar(_progressTitle, "", 0); for (int i = 0; i < scenes.Count; ++i) { SceneDir dir = scenes[i]; GetSceneFromPath(dir); EditorUtility.DisplayProgressBar(_progressTitle, dir.path, (float)(i + 1) / scenes.Count); } EditorUtility.ClearProgressBar(); }
private void GetSceneFromPath(SceneDir dir) { if (dir.ignore) { return; } List <string> files = FileUtils.GetFiles(dir.path, ".unity"); foreach (var file in files) { if (sceneList.ContainsKey(file)) { continue; } sceneList.Add(file, new SceneInfo() { res = file, dir = dir, refBy = null, refCount = 0, depends = null, }); } }