Unity prefab instancing

   1753   1   0
User Avatar
Member
7 posts
Joined: Feb. 2017
Offline
Hello everyone,

I'm trying to use an .hda to send transforms to unity on which prefabs would be duplicated in Unity (with components & scripts attached, just ).

I tried to refer to the attribute instancer section of this page : https://www.sidefx.com/docs/unity/_instancing.html [www.sidefx.com]
But this section is not very verbose and sadly, I can't get it to work.

I attached a simple .hda I made for a test, and I can't get what's missing in there.
As is, the .hda outputs nothing in Unity, not even the “empty mesh” error. If we remove the instance sop node, the .hda outputs the grid as a mesh.

Thank you very much for any help you could provide me.
Edited by VBesson - April 1, 2019 14:40:47

Attachments:
lg_unityinstancer.hdanc (27.0 KB)

User Avatar
Member
571 posts
Joined: May 2017
Offline
Attached a fixed version for you. You don't need an instancer node in this case, but simply adding the “unity_instance” to each point should suffice. Note that I converted the grid to produce points instead of polygons, as otherwise the output would be a grid instead of point instances. To use this in Unity, just copy a prefab path and paste into the input field.

You should spend some time going over some tutorials on building HDAs, especially with instancing. That will clear up the confusion around using them.

Attachments:
lg_unityinstancer_fixed.hdanc (25.4 KB)

  • Quick Links