fix: NRE when AnimatorControllerLayer.stateMachine is null (#1283)

Closes: #1056
This commit is contained in:
bd_ 2024-10-12 17:29:27 -07:00 committed by GitHub
parent 7ae98d63b0
commit f40d02ceb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -573,6 +573,8 @@ namespace nadena.dev.modular_avatar.animation
private AnimatorStateMachine mapStateMachine(string basePath, AnimatorStateMachine layerStateMachine)
{
if (layerStateMachine == null) return null;
var cacheKey = new KeyValuePair<string, AnimatorStateMachine>(basePath, layerStateMachine);
if (_stateMachines.TryGetValue(cacheKey, out var asm))