Setting up your development environment for the plugin using .env file (using assets from outside the Unity project)

   3512   4   0
User Avatar
Member
571 posts
Joined: May 2017
Offline
As of Houdini 17.0.360, and 16.5.614, support for environment mapping for asset paths outside the project (Assets/) folder has been added.

A list of key-value pairs can be set in unity_houdini.env starting with HEU_ENVPATH_ prefix. (e.g. HEU_ENVPATH_PROJECT=C:\project\hdas)

These are then checked on every asset file load and the stored path for asset file is remapped to the key part of the pair. (e.g. assetPath=$HEU_ENVPATH_PROJECT\tree.hda)

The environment mapped paths are displayed in Plugin Settings. The path to unity_houdini.env file is now set relative to Assets/ folder.

More information in the docs here: https://www.sidefx.com/docs/unity/_environment.html [www.sidefx.com]
User Avatar
Member
9 posts
Joined: Feb. 2018
Offline
seelan
As of Houdini 17.0.360, and 16.5.614, support for environment mapping for asset paths outside the project (Assets/) folder has been added.

A list of key-value pairs can be set in unity_houdini.env starting with HEU_ENVPATH_ prefix. (e.g. HEU_ENVPATH_PROJECT=C:\project\hdas)

These are then checked on every asset file load and the stored path for asset file is remapped to the key part of the pair. (e.g. assetPath=$HEU_ENVPATH_PROJECT\tree.hda)

The environment mapped paths are displayed in Plugin Settings. The path to unity_houdini.env file is now set relative to Assets/ folder.

More information in the docs here: https://www.sidefx.com/docs/unity/_environment.html [www.sidefx.com]

Is it possible to use this for relative paths? IE, a folder that exists within the same folder as unity_houdini.env ? (For version control across multiple users)
User Avatar
Member
100 posts
Joined: Dec. 2020
Offline
From my experience, simply using $HIP is equivalent to the project folder. (e.g. $HIP/Assets/Textures/grass.png) Let me know if this works with your workflow.
User Avatar
Member
16 posts
Joined: Aug. 2015
Offline
Does this apply to when you open your hda via HoudiniEngine/debug/OpenSceneInHoudini?
I can't seem to debug my HDAs because the HEU_ENVPATH_ prefixed env vars are not being passed to the spawned houdini session. Is that an expected behaviour?
Thanks!
User Avatar
Member
100 posts
Joined: Dec. 2020
Offline
You can add your environment variables to the houdini.env file: https://www.sidefx.com/docs/houdini/basics/config_env.html [www.sidefx.com]
  • Quick Links