Logic cleanup for file dialog.
This commit is contained in:
@@ -20,6 +20,8 @@ namespace Cryville.Crtr.Browsing {
|
||||
|
||||
_dialog = GameObject.Instantiate(Resources.Load<GameObject>("Common/FileDialog")).GetComponent<FileDialog>();
|
||||
_dialog.gameObject.SetActive(false);
|
||||
_dialog.Filter = ResourceManager.GetSupportedFormats();
|
||||
_dialog.OnClose += OnAddDialogClosed;
|
||||
}
|
||||
|
||||
private bool LoadPathPart(int id, GameObject obj) {
|
||||
@@ -57,8 +59,6 @@ namespace Cryville.Crtr.Browsing {
|
||||
}
|
||||
|
||||
public void OnAddButtonClicked() {
|
||||
_dialog.Callback = OnAddDialogClosed;
|
||||
_dialog.Filter = ResourceManager.GetSupportedFormats();
|
||||
_dialog.Show();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user