Added WindowComponents class
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user