This commit is contained in:
Nahuel Rocchetti 2024-06-24 19:48:42 -03:00
parent 5dc979ff8f
commit 8e8ed7365e
2 changed files with 11 additions and 16 deletions

View file

@ -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<UILayout>(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<UILayout>(key);
_instances.AddRange(uiLayout.Instantiate(UIManager.MainCanvas.transform));
}
private void Update()

2
Notes/ui ids.txt Normal file
View file

@ -0,0 +1,2 @@
settings: 0x49001028
audio settings: 0x49060F01