mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 18:55:06 +08:00
fix: null reference errors when apply on play triggers late (#490)
When an avatar is enabled after the scene is initially loaded, Merge Armature would result in a lot of NullReferenceExceptions being logged.
This commit is contained in:
parent
68bc7ece54
commit
491cb97fb1
@ -131,6 +131,8 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
|
|
||||||
private List<(Transform, Transform)> GetBonesForLock()
|
private List<(Transform, Transform)> GetBonesForLock()
|
||||||
{
|
{
|
||||||
|
if (this == null) return null;
|
||||||
|
|
||||||
var mergeRoot = this.transform;
|
var mergeRoot = this.transform;
|
||||||
var baseRoot = mergeTarget.Get(this);
|
var baseRoot = mergeTarget.Get(this);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user