Attribute "unity_input_mesh_name" returns the the unity scene name is this correct?

   1848   2   0
User Avatar
Member
19 posts
Joined: March 2017
Offline
I've tried to extract all the static meshes and then do a forloop over each one in houdini. I thought I would use the “unity_input_mesh_name” to sort by “piece attribute”. However instead of returning the name of the GameObject in the scene, the “unity_input_mesh_name” contains the “unity scene name”. Is this correct behaviour and if so is there another way for me to get the gameobject name from unity?.

I provided pictures regarding the problem.
I would like to get out the string: EN_P_Alter_01_17G1
Instead I get: Assets/Spite/Scenes/Spite_AssetShowroom.unity

I'm using unity version 2017.4.18f1 and houdini version 17.0.459
Edited by Erik_Ostsjo - Jan. 18, 2019 07:14:08

Attachments:
Unity_view_gameobject.PNG (189.0 KB)
HDA_input.png (35.0 KB)
houdini_hda.png (270.4 KB)

User Avatar
Member
571 posts
Joined: May 2017
Offline
The name is coming from the Unity API call GetAssetOrScenePath, which returns the scene name if the asset was saved in the scene, but gives the proper project path if saved in project (as a prefab). I would have expected a scene path rather than a name though, in the former case (e.g. Assets/Scene/SceneName.scene::ObjectName).

Anyway, I fixed it so that it now returns the project path if its a project asset, but if its saved in scene (regardless of whether prefab instance or just regular gameobject) it will use the gameobject name.

Should be in next daily build.
User Avatar
Member
19 posts
Joined: March 2017
Offline
Got it. Awesome with such a quick tweak. Thanks so much for the reply!
  • Quick Links