mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-04 19:49:02 +08:00
Fix unit test build error
This commit is contained in:
parent
268d04ed3e
commit
b61e3f559b
@ -3,6 +3,7 @@ using nadena.dev.modular_avatar.animation;
|
||||
using nadena.dev.modular_avatar.core;
|
||||
using nadena.dev.modular_avatar.core.editor;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Animations;
|
||||
|
||||
public class WorldFixedObjectTest : TestBase
|
||||
@ -25,12 +26,10 @@ public class WorldFixedObjectTest : TestBase
|
||||
|
||||
// fixed root is created
|
||||
Assert.That(fixedRoot, Is.Not.Null);
|
||||
var avatarType = System.Type.GetType("VRC.SDKBase.VRC_AvatarDescriptor, VRCSDKBase");
|
||||
bool isVrcAvatar = false;
|
||||
if (avatarType != null)
|
||||
{
|
||||
isVrcAvatar = avatar.GetComponent(avatarType) != null;
|
||||
}
|
||||
#if MA_VRCSDK3_AVATARS_3_7_0_OR_NEWER
|
||||
isVrcAvatar = avatar.TryGetComponent(out VRC.SDKBase.VRC_AvatarDescriptor _);
|
||||
#endif
|
||||
Component constraint = isVrcAvatar ?
|
||||
fixedRoot.GetComponent(System.Type.GetType("VRC.SDK3.Dynamics.Constraint.Components.VRCParentConstraint, VRC.SDK3.Dynamics.Constraint")) :
|
||||
fixedRoot.GetComponent<ParentConstraint>();
|
||||
@ -61,12 +60,10 @@ public class WorldFixedObjectTest : TestBase
|
||||
|
||||
// fixed root is created
|
||||
Assert.That(fixedRoot, Is.Not.Null);
|
||||
var avatarType = System.Type.GetType("VRC.SDKBase.VRC_AvatarDescriptor, VRCSDKBase");
|
||||
bool isVrcAvatar = false;
|
||||
if (avatarType != null)
|
||||
{
|
||||
isVrcAvatar = avatar.GetComponent(avatarType) != null;
|
||||
}
|
||||
#if MA_VRCSDK3_AVATARS_3_7_0_OR_NEWER
|
||||
isVrcAvatar = avatar.TryGetComponent(out VRC.SDKBase.VRC_AvatarDescriptor _);
|
||||
#endif
|
||||
Component constraint = isVrcAvatar ?
|
||||
fixedRoot.GetComponent(System.Type.GetType("VRC.SDK3.Dynamics.Constraint.Components.VRCParentConstraint, VRC.SDK3.Dynamics.Constraint")) :
|
||||
fixedRoot.GetComponent<ParentConstraint>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user