Can Houdini engine recognize its current platform?

   5327   6   1
User Avatar
Member
453 posts
Joined: 2月 2013
Offline
So lets assume I want to make a Houdini Engine procedure that works with both Unreal Engine and Unity.
As fas as I understand, I have to mark collision geometry for both engines in different ways (though I could be wrong about this). Therefore I would like to add a switch that will create different collision based on what game engine I'm running in. Obviously I could just make a manual parameter for this, but I guess there is a bit of script that will do it for the user. Any idea what such a script might look like?
User Avatar
Member
402 posts
Joined: 3月 2013
Offline
Both engines should expect the same collision mesh group names so there's no need for a special switch to distinguish between them.

Both Unreal and Unity expect “collision_group” or “rendered_collision_group” primitive group name prefixes as collision meshes.
User Avatar
Member
453 posts
Joined: 2月 2013
Offline
Thanks! Well, there goes my example.^^
- Still curious whether it's possible. For no practical reason right now.
User Avatar
Member
402 posts
Joined: 3月 2013
Offline
It's not possible yet to tell between plugins inside your asset but we are looking at adding some kind of check in future releases.

It is still recommended that asset be made to run the same on all plugins and we do strive to achieve some level of consistency across our plugins.

But…we also know there will always be some differences.
User Avatar
Member
453 posts
Joined: 2月 2013
Offline
Thanks! - Always awesome to hear from the devs!
User Avatar
Member
453 posts
Joined: 2月 2013
Offline
Out of curiosity, are there any news on this?
User Avatar
Member
402 posts
Joined: 3月 2013
Offline
Actually, yes! You can check the HAPI_ENV_CLIENT_NAME env var for “unity”, “unreal”, “maya”, or “c4d”. Here's an example asset.
Edited by damian - 2017年2月24日 16:34:37

Attachments:
HAPI_Test_Fundamentals_EnvVar.otl (15.3 KB)

  • Quick Links