Hi @sfjohnston were you able to figure this one out? I’ve also seen your other posts about the project.target.cs, and like you was able to compile the the game successfully. I’ve tried playing around with the the different USD setter-nodes, but I haven’t been successful in getting any data in.
Thanks for your reply @UE_FlavienP . I think I’ve been travelling the same path as sfjohnston. Based on sparse comments on this topic, my only choice to try now is to build the engine from source.
Just for future notes:
Modifying Project.Target.cs with FORCE_ANSI_ALLOCATOR=1 yields a log error like this:
[2023.11.18-19.42.14:974][474]LogPlayLevel: UAT: CPP_001 modifies the value of GlobalDefinitions. This is not allowed, as CPP_001 has build products in common with UnrealGame.
[2023.11.18-19.42.14:985][475]LogPlayLevel: UAT: Remove the modified setting, change CPP_001 to use a unique build environment by setting 'BuildEnvironment = TargetBuildEnvironment.Unique;' in the CPP_001Target constructor, or set bOverrideBuildEnvironment = true to force this setting on.
When the instructions in the log are followed (adding the vars into Project.Target.cs), I get this error:
LogPlayLevel: UAT: Targets with a unique build environment cannot be built with an installed engine.
Which has led me to understand that I need to build the UE from scratch and I’m in fact currently doing this.
However, I don’t know if this is the only thing that I need to do? Or do I need to edit UnrealGame.Target.cs to add the FORC_ANSI_ALLOCATOR var? At any rate, I will try both the engine’s target and the project.
Following the instructions in this doc, I download the source, and executed the ‘setup’ and ‘generate’ scripts.
I opened the UE5.sln in VS, and built UE5. The docs say it might take an hour at most, but for me it lasted for 18 hours. Not sure why.
From VS, I ran UE5 editor (without debugger).
Added USD Importer plugin. Shut down editor. Ran editor again from VS.
In the editor, I created a C++ project, which generated the target.cs files from the get-go.
Added FORCE_ANSI_ALLOCATOR=1 to Project.Target.cs only.
Added UsdStageActor.
Used Level Blueprint: added UsdStageActor’s Set Root Layer node and inputted a USD file.
Compiled the game and saw the USD displayed.
I would like to suggest that the UE docs to mention need to build the engine from source. Without this warning, the current instruction in docs is only half true.
Following these steps , did you manage to import USD at runtime in the editor or in a build/package?
For me it works in the editor but not in the build.
Explore alternative solutions like Alembic for runtime asset import, which might have better standalone support.
Investigate if there are any unofficial workarounds or community patches for USD runtime import in Unreal Engine.
Same. I can only load a USD file in editor, and not at runtime in shipping build. I’m only using “SetRootLayer” on USD Stage Actor. Maybe something is missing because I got this error in a pop-up window (in the packaged shipping build app) :
The stage actor must always have an asset cache while a stage is loaded, so a new cache will be created.
I got the logs and here they are :
LogUsd: Resetting /Engine/Transient.UsdAssetCache3_2147482458’s AssetDirectory to ‘/Engine/Transient’, as ‘’ is not a valid content folder path for this asset cache
LogUsd: Warning: Discarding StaticMesh generated for prim ‘/Kitchen_set/Props_grp/North_grp/NorthWall_grp/NailA_1’ as it didn’t produce any valid RenderData (likely all triangles were degenerate)
LogUsd: Stage loaded Kitchen_set_instanced in [0 min 0.604 s]
The problem is that it is not showing anything in the app. I can’t see the kitchen set (asset from pixar available on their website for USD).
Anyone who got this working for unreal 5.6.0 ? or any other version that HAS MetaHumans (I need them) ?