Create preliminary GameObject inspector for testing, cleanup some UI

This commit is contained in:
Sinai
2021-04-16 21:07:32 +10:00
parent 40d32e1919
commit 085c79441b
13 changed files with 322 additions and 22 deletions

View File

@ -136,11 +136,6 @@ namespace UnityExplorer.UI.Panels
RuntimeProvider.Instance.StartCoroutine(DelayedRefresh(panel));
}
public override void SaveToConfigManager()
{
ConfigManager.SceneExplorerData.Value = this.ToSaveData();
}
private IEnumerator DelayedRefresh(RectTransform obj)
{
yield return null;
@ -152,13 +147,16 @@ namespace UnityExplorer.UI.Panels
Tree.Scroller.ReloadData();
}
Tree.Scroller.Refresh();
}
public override void SaveToConfigManager()
{
ConfigManager.SceneExplorerData.Value = this.ToSaveData();
}
public override void LoadSaveData()
{
var data = ConfigManager.SceneExplorerData.Value;
ApplySaveData(data);
ApplySaveData(ConfigManager.SceneExplorerData.Value);
}
public override void SetDefaultPosAndAnchors()
@ -242,7 +240,6 @@ namespace UnityExplorer.UI.Panels
infiniteScroll.PrototypeCell = prototype.GetComponent<RectTransform>();
// some references
Tree.Scroller = infiniteScroll;
previousRectHeight = mainPanelRect.rect.height;
// Scene Loader
@ -257,7 +254,7 @@ namespace UnityExplorer.UI.Panels
UIFactory.SetLayoutElement(allSceneDropObj, minHeight: 25, minWidth: 150, flexibleWidth: 0, flexibleHeight: 0);
foreach (var scene in SceneHandler.AllSceneNames)
allSceneDrop.options.Add(new Dropdown.OptionData(scene));
allSceneDrop.options.Add(new Dropdown.OptionData(Path.GetFileNameWithoutExtension(scene)));
allSceneDrop.value = 1;
allSceneDrop.value = 0;