void Init() { if (sourceStorage == null || destinationStorage == null) { sourceStorage = SceneGraphSearch.Find(sourceStoragePath).GetComponentInChildren <StorageInventory>(); destinationStorage = SceneGraphSearch.Find(destinationStoragePath).GetComponentInChildren <StorageInventory>(); } }
private void Start() { playableDirector = GetComponent <PlayableDirector>(); startOptions = FindObjectOfType <StartOptions>(); playableDirector.played += OnPlayableDirectorPlayed; playableDirector.stopped += OnPlayableDirectorStopped; hiddenCanvases = new Canvas[hiddenCanvasPaths.Length]; for (int i = 0; i < hiddenCanvasPaths.Length; i++) { hiddenCanvases[i] = SceneGraphSearch.Find(hiddenCanvasPaths[i]).GetComponent <Canvas>(); } }