gamedev-pro / dmotion

DMotion - A high level Animation Framework for Unity DOTS
Other
491 stars 47 forks source link

fix: check for return value of -1 when calling IdToIndex #20

Closed ashwin911 closed 1 year ago

ashwin911 commented 2 years ago

check if IdToIndex doesn't return -1 in SingleClipStateUtils.UpdateSamplers and LinearBlendStateUtils.UpdateSamplers

ashwin911 commented 2 years ago

Did some additional testing, this fix causes unwanted behavior like animations stopping completely or weird mesh deformations. But it does prevent crashes caused by the -1 index

gabrieldechichi commented 2 years ago

Hey @ashwin911, thanks for the PR. Just rebased it to branchfeature/v0.3.4.

Can you let me know what scenario created the -1 bug or you? I think the change makes sense, but I'm curious to what is creating the scenario in the first place.

gabrieldechichi commented 1 year ago

Closing due to lack of response. Feel free to open another PR if you think this is still an issue.