View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002265||NoesisGUI||Unreal||public||2022-02-08 16:38||2022-02-15 13:25|
|Target Version||3.1.3||Fixed in Version||3.1.3|
|Summary||0002265: Importer unable to create references to assets|
|Description||Copy-paste of my mail to Jesús:|
I noticed a bug in the UE4 plugin, precisely in the importer routines.
While evaluating Noesis and did some packaging tests I noticed that the importer tries to create asset references in the NoesisXamlFactory.cpp. However, there are several issues that sit in the dlls so I can't give you a full patch to fix the issue, but I try to be as precise and helpful as possible explaining the bug(s).
The code I'm talking about is the UNoesisXamlFactory::FactoryCreateBinary function (in my code, NoesisXamlFactory.cpp:256). However, the issue can be narrowed down to the DependencyCallback lambda (:333).
The lambda (which is wrapped into another short lambda DependencyCallbackAdaptor, line 487) expects three parameters: UserData (which is unused), the URI to the resource, and the XamlDependencyType.
First of all (because it's short and easy to explain), if the dependency is a custom shader, the XamlDependencyType is mentioned as another xaml document. This triggers the IsUserControl condition (:385), however this is not relevant in the further evaluation (the .xaml suffix is dropped to find the asset and everything works as expected).
The real issue is the asset path:
It is possible to access assets in subdirectories using a proper namespace declaration in the xaml, for example: xmlns:k="clr-namespace:MySource.Shaders". However, the path I get in the lambda (from Noesis::GUI::GetXamlDependencies) is always in the same directory as the xaml itself. This happens because I only get the last path, e.g. if I use the brush <k:MyShader/> I only get "MyShader" as the URI, not the full relative URI "Shaders/MyShader" or an absolute path "/MySource/Shaders/MyShader".
This incomplete URI is then appended to the path of the xaml package, which results in a bad path and the asset registry can't find the asset, resulting in missing references between Unreal assets if the referenced material is in another directory than the imported xaml.
However, it should be mentioned that loading the referenced assets at runtime works perfectly fine, the materials show up in the UI.
Also since I'm new to Noesis it is possible I forgot some detail somewhere, and I hope my explanation can help you further polish your product. Let me know if you need more details and thank you in advance.
|Steps To Reproduce||Unreal material in Content/MySource/Shaders/MyMaterial|
Then, (re)import the xaml. The material will show up at runtime, however there is no asset reference in the Unreal sense. Therefore the referenced material will not automatically show up in a packaged build via references, developers have to assign referenced assets in the packaging system, eg using asset labels or by manually packaging the whole directory.
|2022-02-08 16:38||LightwordJoel||New Issue|
|2022-02-08 16:38||LightwordJoel||Tag Attached: C++|
|2022-02-08 16:38||LightwordJoel||Tag Attached: UE4|
|2022-02-08 19:38||jsantos||Assigned To||=> hcpizzi|
|2022-02-08 19:38||jsantos||Status||new => assigned|
|2022-02-08 19:38||jsantos||Product Version||=> 3.1|
|2022-02-08 19:38||jsantos||Target Version||=> 3.1.3|
|2022-02-14 17:20||jsantos||Assigned To||hcpizzi => sfernandez|
|2022-02-15 13:25||sfernandez||Status||assigned => resolved|
|2022-02-15 13:25||sfernandez||Resolution||open => fixed|
|2022-02-15 13:25||sfernandez||Fixed in Version||=> 3.1.3|