How to bake an asset at runtime?

   1104   2   0
User Avatar
Member
35 posts
Joined: Jan. 2016
Offline
I'm trying to do the most basic thing with an HDA and I can't figure it out.

During runtime in UE5, I want to pass some values into the HDA as parameters, then cook it. I don't know the parameters until runtime, so it can't be done in the editor.

There's hardly any BP nodes you can use with a Houdini Asset BP Component, which I don't understand. There's a 'Set Float Parameter' node, which doesn't seem to do anything. If I set a value in the constructor for example, it does nothing - it still just cooks the HDA using the values in the details panel. What about other types of parameters - int/string etc.? How are you supposed to set those?

There also doesn't seem to be any way to trigger the asset to cook, at least that I can find in the editor, nor any mention of how to do that in the docs (again, that I can find).

Does Houdini Engine really require that all values for an HDA are set in the editor? It seems rather mad that you can't do stuff at runtime... but presumably I'm just missing something obvious here?
User Avatar
Member
31 posts
Joined: Dec. 2012
Offline
You can set these as detail attribs and it should work.

i@unreal_uproperty_bBakeAfterNextCook = 1;
i@unreal_uproperty_bReplacePreviousBake = 1;
User Avatar
Member
3 posts
Joined: Sept. 2021
Offline
Has anyone tested this succesfully? It seems to be a bit random if these bake options are enabled/disabled on spawning the hda
  • Quick Links