Unity-Technologies / com.unity.demoteam.hair

An integrated solution for authoring / importing / simulating / rendering strand-based hair in Unity.
Other
730 stars 99 forks source link

Changing values in Play mode sometimes breaks Hair instance #93

Open qlee01 opened 4 months ago

qlee01 commented 4 months ago

This is a long standing issue, but I forgot to report it so far: When changing parameter in play mode (including hair asset), at some point the Hair Instance stops working, and the following error is being spammed in console (happens in all versions, the log is from 0.13.0exp1):

NullReferenceException: Object reference not set to an instance of an object Unity.DemoTeam.Hair.HairInstance+GroupAssetReference.GetSortKey () (at Library/PackageCache/com.unity.demoteam.hair@7fe8b81797/Runtime/HairInstance.cs:41) Unity.DemoTeam.Hair.HairInstance.UpdateStrandGroupSettings () (at Library/PackageCache/com.unity.demoteam.hair@7fe8b81797/Runtime/HairInstance.cs:396) Unity.DemoTeam.Hair.HairInstance.Update () (at Library/PackageCache/com.unity.demoteam.hair@7fe8b81797/Runtime/HairInstance.cs:221)