Added WindowComponents class

This commit is contained in:
Pasha Bibko
2026-01-13 10:33:34 +00:00
parent fcbbed1db8
commit e700523706
5 changed files with 74 additions and 2 deletions

View File

@@ -36,15 +36,18 @@ namespace InterfaceOff
if (Input.GetKeyDown(KeyCode.Space))
{
GameObject go = Instantiate(SampleChild, GameCanvas.transform);
Type type = WindowTypes.GetRandom();
go.SetActive(true);
Type type = WindowTypes.GetRandom();
WindowBase windowBase = go.AddComponent(type) as WindowBase;
if (DebugUtils.IsNull(windowBase))
{
Debug.LogError("How did this happen");
return;
}
windowBase.Components = go.GetComponent<WindowComponents>();
windowBase.InstantiateWindowBase();
}
}