private bool OpenWindow() { if (!prefabsValid && !CheckPrefabs()) { return(false); } if (canvas == null) { canvas = Instantiate(prefabCanvas).GetComponent <Canvas>(); canvas.name = "Canvas SkywardFileBrowser"; } if (window == null) { window = Instantiate(prefabWindow).GetComponent <SfbWindow>(); window.transform.SetParent(canvas.transform, false); window.name = "Window"; window.Init(this); } if (loadingAnimation == null) { loadingAnimation = Instantiate(prefabLoadingAnimation); loadingAnimation.transform.SetParent(window.transform, false); loadingAnimation.name = "LoadingAnimation"; loadingAnimation.SetActive(false); } canvas.gameObject.SetActive(true); window.gameObject.SetActive(true); SetSelectedExtension(); return(true); }
private bool OpenWindow() { if (!prefabsValid && !CheckPrefabs()) { return false; } if (canvas == null) { canvas = Instantiate(prefabCanvas).GetComponent<Canvas>(); canvas.name = "Canvas SkywardFileBrowser"; } if (window == null) { window = Instantiate(prefabWindow).GetComponent<SfbWindow>(); window.transform.SetParent(canvas.transform, false); window.name = "Window"; window.Init(this); } if (loadingAnimation == null) { loadingAnimation = Instantiate(prefabLoadingAnimation); loadingAnimation.transform.SetParent(window.transform, false); loadingAnimation.name = "LoadingAnimation"; loadingAnimation.SetActive(false); } canvas.gameObject.SetActive(true); window.gameObject.SetActive(true); SetSelectedExtension(); return true; }