chore: make it build on older VRCSDKs

This commit is contained in:
bd_ 2024-08-18 21:54:34 -07:00
parent 5c3a39836c
commit ab43e53231

View File

@ -107,11 +107,15 @@ namespace nadena.dev.modular_avatar.core.editor
if (c.rootTransform == null) c.rootTransform = c.transform;
RetainBoneReferences(c);
}
foreach (var c in avatarGameObject.transform.GetComponentsInChildren<VRCConstraintBase>(true))
RetainBoneReferences(c);
#endif
#if MA_VRCSDK3_AVATARS_3_7_0_OR_NEWER
foreach (var c in avatarGameObject.transform.GetComponentsInChildren<VRCConstraintBase>(true))
{
RetainBoneReferences(c);
}
#endif // MA_VRCSDK3_AVATARS_3_7_0_OR_NEWER
foreach (var c in avatarGameObject.transform.GetComponentsInChildren<IConstraint>(true))
{
RetainBoneReferences(c as Component);