sericaer
Topic Author
Posts: 13
Joined: 09 Oct 2021, 09:29

How to change NoesisView.Xaml in Runtime?

06 Feb 2023, 07:54

Hi, I'm try to change the NoesisView.Xaml in runtime.

I create a script and attach to the obj which has the NoesisView component. But the 'test.xaml' gui not show when project run.
public class DynamicXmal : MonoBehaviour
{
    void Awake()
    {
        var xaml = ScriptableObject.CreateInstance<NoesisXaml>();
        xaml.content = File.ReadAllBytes(Path.Combine(Application.streamingAssetsPath, "test.xaml"));
        xaml.Load();

        var view = GetComponent<NoesisView>();
        view.Xaml = xaml;
    }
}
NoesisGUI version is 3.1.6. Unity version is 2022.1.6f1c1
Thanks a lot!

Who is online

Users browsing this forum: Google [Bot] and 1 guest