BattlehubCode / RTE_Docs

This is a repository for Runtime Editor documentation, discussion and tracking features and issues.
https://assetstore.unity.com/packages/tools/modeling/runtime-editor-64806
11 stars 0 forks source link

Example of how to pass arguments to window #81

Closed BattlehubCode closed 1 year ago

BattlehubCode commented 1 year ago

WindowManager has SetWindowArgs method:

IWindowManager wm = IOC.Resolve<IWindowManager>();
var wnd = wm.CreateWindow("MyDialog");
wm.SetWindowArgs(wnd, "MyArgs");

In the script attached to the window, these arguments can be obtained with the following code:

RuntimeWindow window = GetComponentInParent<RuntimeWindow>();
Debug.Log(window.Args);