HoudiniEngineForUnity
HoudiniEngineForUnity copied to clipboard
"Generate Mesh Using Points" always has wrong uv sets
Hi,
I just find and fix a problem when "Generate Mesh Using Points", it will not copy the correct uv since the code miss checking the _uvsAttr.Length.
Here is the bug line:
https://github.com/sideeffects/HoudiniEngineForUnity/blob/d795c19e8f2888115c9dcf5eb59ffe4cf8a7912a/Plugins/HoudiniEngineUnity/Scripts/Utility/HEU_GenerateGeoCache.cs#L1852
just change the code from:
for (int u = 0; u < HEU_Defines.HAPI_MAX_UVS; ++u)
{
if (... && positionIndex < geoCache._uvsAttr.Length)
to
for (int u = 0; u < HEU_Defines.HAPI_MAX_UVS; ++u)
{
if (... && positionIndex < geoCache._uvsAttr[u].Length)
will fix the problem.