mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-29 09:42:51 +08:00
fix: high load caused by ObjectReferenceFixer when paths collide
Closes: #1411
This commit is contained in:
parent
909d7e66c4
commit
129ad4dc35
@ -141,7 +141,14 @@ namespace nadena.dev.modular_avatar.core
|
||||
internal bool IsConsistent(GameObject avatarRoot)
|
||||
{
|
||||
if (referencePath == AVATAR_ROOT) return targetObject == avatarRoot;
|
||||
return avatarRoot.transform.Find(referencePath)?.gameObject == targetObject;
|
||||
if (avatarRoot.transform.Find(referencePath)?.gameObject == targetObject)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// If multiple objects match the same path, then we accept that the reference is consistent.
|
||||
var targetObjectPath = RuntimeUtil.AvatarRootPath(targetObject);
|
||||
return targetObjectPath == referencePath;
|
||||
}
|
||||
|
||||
protected bool Equals(AvatarObjectReference other)
|
||||
|
Loading…
Reference in New Issue
Block a user