Search - User list
Full Version: Asset Cooked Event example ?
Root » Houdini Engine for Unity » Asset Cooked Event example ?
GuillaumeJ
Hi Folks,

Does anyone know how asset cooked event works ? I added one on my HDA in Unity, and I selected the example script HEU_AssetEventReceiverTest.cs into the slot. Set it to “Runtime and Editor” but when I cook the asset, there is nothing printed out in the console ? And it seems that after a cook the slot is set to “CookedCallback” instead of HEU_AssetEventReceiverTest.

The documentation on that matter is not very helpful, anybody have idea on that ?

Unity 2018.2.14f1 and Houdini 17.0.352

Thanks !
seelan
Hi,

In the event field, you'll need to set the event callback to CookedCallback. See attached screenshot.

The GameObject field is the target object, and the dropdown is the actual event function, so that needs to be set.
anon_user_92751170
Hi Seelan,

Thanks for your reply, and sorry for the dumm question ( I'm quite new i nUnity world ) but, the GameObject field is filled with the C# script itself ? I tried to drag and drop it, that but with no luck …
seelan
The gameobject field is for the object that has the HEU_AssetEventReceiverTest script attached to it. You can create a new gameobject, attach the HEU_AssetEventReceiverTest script, then drag & drop the gameobject to that field. Then choose the CookedCallback in the dropdown.
seelan
The underlying mechanism is UnityEvents, so perhaps a tutorial on that might help you out:
https://docs.unity3d.com/Manual/UnityEvents.html [docs.unity3d.com]
https://www.youtube.com/watch?v=pjWqsFDozSo [www.youtube.com]
anon_user_92751170
Awesome ! That's what I was looking for to be able to run my small tests Thanks a lot seelan.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB