UE4 loading XAML resources from DLL
Hi,
I try to use several resource libraries
But as I already understood, there is no implementation of loading XAML resources from a DLL
Can you advise please, how to make a XAML resource provider for this task in UE4?
I try to use several resource libraries
Code: Select all
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
</ResourceDictionary.MergedDictionaries>
Code: Select all
UE_LOG - LogNoesis: Warning ... Xaml not found 'Themes/MaterialDesignTheme.Light.xaml
Re: UE4 loading XAML resources from DLL
Hi ToxaDev,
The UE4 plugin has built in Providers that work along Unreal's asset system. In order to use any XAMLs, you must first import them from the Unreal Editor. You can take a look at our Menu3D sample. It uses several UserControl XAMLs. You can see the imported XAML assets on the first screenshot on the readme.
The UE4 plugin has built in Providers that work along Unreal's asset system. In order to use any XAMLs, you must first import them from the Unreal Editor. You can take a look at our Menu3D sample. It uses several UserControl XAMLs. You can see the imported XAML assets on the first screenshot on the readme.
Re: UE4 loading XAML resources from DLL
Hi hcpizzi
Thanks for the answer, but I still have an question.
In my first post, I show this action:
This file "MaterialDesignTheme.Defaults.xaml" also has such actions for loading other resources:
There is some kind of nesting.
noesisGUI v2.2.5 by default cannot load resources as WPF does
Is it possible to somehow modify the code so that we can load resources through "pack://application:,,," and check the nesting too?
Can this be implemented using a custom XAML resource provider?
Are you planning to implement this in the near future?
Thanks!
Thanks for the answer, but I still have an question.
In my first post, I show this action:
Code: Select all
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
</ResourceDictionary.MergedDictionaries>
Code: Select all
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/Materialdesigntheme.Button.xaml" />
<ResourceDictionary
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Calendar.xaml" />
<ResourceDictionary
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/Materialdesigntheme.CheckBox.xaml" />
...
noesisGUI v2.2.5 by default cannot load resources as WPF does
Is it possible to somehow modify the code so that we can load resources through "pack://application:,,," and check the nesting too?
Can this be implemented using a custom XAML resource provider?
Are you planning to implement this in the near future?
Thanks!
Re: UE4 loading XAML resources from DLL
Hi,
Here's a link to the documentation related to how Noesis handles resource URIs: https://noesisengine.com/docs/Gui.Core.URIs.html
Basically, all the "pack://application,,," part is discarded, and the provider only gets "Themes/MaterialDesignTheme.Defaults.xaml". The UE4 plugin then looks for an Unreal asset with that same path. You could implement your own Provider and load files from disk directly, but then you would have to make sure those files are added to the final package of the game. In any case, you wouldn't get the assembly part of the URI.
There have been requests to change this. You can find some info in this forum thread: viewtopic.php?f=3&t=1830, and the associated ticket: #1569
Here's a link to the documentation related to how Noesis handles resource URIs: https://noesisengine.com/docs/Gui.Core.URIs.html
Basically, all the "pack://application,,," part is discarded, and the provider only gets "Themes/MaterialDesignTheme.Defaults.xaml". The UE4 plugin then looks for an Unreal asset with that same path. You could implement your own Provider and load files from disk directly, but then you would have to make sure those files are added to the final package of the game. In any case, you wouldn't get the assembly part of the URI.
There have been requests to change this. You can find some info in this forum thread: viewtopic.php?f=3&t=1830, and the associated ticket: #1569
Who is online
Users browsing this forum: Ahrefs [Bot], DHSven and 24 guests