Load components from disk at runtime #2233
|
Hi! Thank you for your awesome job. Can you please help me with loading components. I'm trying to load *.sduipage at runtime via code only aproach, and it looks like Content.Load("UI/Main") loads only compiled components. |
Replies: 1 comment
|
Hello, sorry for the late response, I just stumbled upon this question. If you're looking to load a UIPage at runtime, the way to go about it is:
If the issue is more specific or you need more help with this, feel free to let me know with additional info and I'll do my best to look into it. |
0 replies
Answer selected by
euroUK
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, sorry for the late response, I just stumbled upon this question.
If you're looking to load a UIPage at runtime, the way to go about it is:
UIComponent MyUI = new();MyUI.Page = Content.Load<UIPage>("UI/Main");Entity.Components.Add(MyUI);If the issue is more specific or you need more help with this, feel free to let me know with additional info and I'll do my best to look into it.
I hope this helps!