diff --git a/Assets/Scripts/OpenTS2/Engine/Tests/UILayoutTest.cs b/Assets/Scripts/OpenTS2/Engine/Tests/UILayoutTest.cs index c37cfb8..c90961f 100644 --- a/Assets/Scripts/OpenTS2/Engine/Tests/UILayoutTest.cs +++ b/Assets/Scripts/OpenTS2/Engine/Tests/UILayoutTest.cs @@ -35,24 +35,17 @@ namespace OpenTS2.Engine.Tests void CreateUI() { - try + var settings = Settings.Get(); + settings.Language = Language; + foreach (var instance in _instances) { - var settings = Settings.Get(); - settings.Language = Language; - foreach (var instance in _instances) - { - Destroy(instance.gameObject); - } - _instances.Clear(); - var contentProvider = ContentProvider.Get(); - var key = new ResourceKey(Convert.ToUInt32(Key, 16), 0xA99D8A11, TypeIDs.UI); - var uiLayout = contentProvider.GetAsset(key); - _instances.AddRange(uiLayout.Instantiate(UIManager.MainCanvas.transform)); - } - catch(Exception e) - { - Debug.LogError(e); + Destroy(instance.gameObject); } + _instances.Clear(); + var contentProvider = ContentProvider.Get(); + var key = new ResourceKey(Convert.ToUInt32(Key, 16), 0xA99D8A11, TypeIDs.UI); + var uiLayout = contentProvider.GetAsset(key); + _instances.AddRange(uiLayout.Instantiate(UIManager.MainCanvas.transform)); } private void Update() diff --git a/Notes/ui ids.txt b/Notes/ui ids.txt new file mode 100644 index 0000000..13ad308 --- /dev/null +++ b/Notes/ui ids.txt @@ -0,0 +1,2 @@ +settings: 0x49001028 +audio settings: 0x49060F01 \ No newline at end of file