From 17f7a5c52385796117a71f8df6857c465661a66c Mon Sep 17 00:00:00 2001 From: Neil Sarkar Date: Sun, 26 Jul 2020 13:43:31 -0700 Subject: [PATCH] Move regenerate button to advanced section in navigator --- Runtime/Navigation/Navigator.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Runtime/Navigation/Navigator.cs b/Runtime/Navigation/Navigator.cs index 4dac341..89fb0b0 100644 --- a/Runtime/Navigation/Navigator.cs +++ b/Runtime/Navigation/Navigator.cs @@ -238,10 +238,22 @@ void Update() { RegenerateEnums(); } - [Button] + [NonSerialized, ShowInInspector] public bool Advanced; + [Title("Advanced")] + [ShowIf("Advanced"), Button, GUIColor(Violet.r, Violet.g, Violet.b)] + void Regenerate() { + Violet.Log($"Regenerating enums..."); + RegenerateEnums(); + Violet.Log($"Reloading screens..."); + LoadScreens(); + Violet.Log($"Done."); + } + void RegenerateEnums() { var screens = GetComponentsInChildren(true); ScreenIdGenerator.Generate(screens); + Violet.Log($"Reloading screens..."); + Violet.Log($"Done."); } #endif }