mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-02-08 06:42:47 +08:00
fix: compile error in build
This commit is contained in:
parent
8a770de016
commit
93adbfd85d
@ -74,7 +74,9 @@ namespace nadena.dev.modular_avatar.core.armature_lock
|
|||||||
|
|
||||||
public ArmatureLockController(ModularAvatarMergeArmature mama, GetTransformsDelegate getTransforms)
|
public ArmatureLockController(ModularAvatarMergeArmature mama, GetTransformsDelegate getTransforms)
|
||||||
{
|
{
|
||||||
|
#if UNITY_EDITOR
|
||||||
AssemblyReloadEvents.beforeAssemblyReload += Dispose;
|
AssemblyReloadEvents.beforeAssemblyReload += Dispose;
|
||||||
|
#endif
|
||||||
|
|
||||||
this._mama = mama;
|
this._mama = mama;
|
||||||
this._getTransforms = getTransforms;
|
this._getTransforms = getTransforms;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using Unity.Burst;
|
using Unity.Burst;
|
||||||
|
#if UNITY_EDITOR
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
#endif
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace nadena.dev.modular_avatar.core.armature_lock
|
namespace nadena.dev.modular_avatar.core.armature_lock
|
||||||
@ -27,7 +29,9 @@ namespace nadena.dev.modular_avatar.core.armature_lock
|
|||||||
|
|
||||||
public void ToTransform(Transform bone)
|
public void ToTransform(Transform bone)
|
||||||
{
|
{
|
||||||
|
#if UNITY_EDITOR
|
||||||
Undo.RecordObject(bone, Undo.GetCurrentGroupName());
|
Undo.RecordObject(bone, Undo.GetCurrentGroupName());
|
||||||
|
#endif
|
||||||
bone.localPosition = localPosition;
|
bone.localPosition = localPosition;
|
||||||
bone.localRotation = localRotation;
|
bone.localRotation = localRotation;
|
||||||
bone.localScale = localScale;
|
bone.localScale = localScale;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
#if UNITY_EDITOR
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
#endif
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using VRC.SDKBase;
|
using VRC.SDKBase;
|
||||||
|
|
||||||
@ -121,9 +123,9 @@ namespace nadena.dev.modular_avatar.core.ArmatureAwase
|
|||||||
if (deltaPos.sqrMagnitude < EPSILON && deltaRot < EPSILON && deltaScale < EPSILON)
|
if (deltaPos.sqrMagnitude < EPSILON && deltaRot < EPSILON && deltaScale < EPSILON)
|
||||||
{
|
{
|
||||||
Matrix4x4 childNewLocal = parent.worldToLocalMatrix * state.childWorld;
|
Matrix4x4 childNewLocal = parent.worldToLocalMatrix * state.childWorld;
|
||||||
|
#if UNITY_EDITOR
|
||||||
Undo.RecordObject(child, Undo.GetCurrentGroupName());
|
Undo.RecordObject(child, Undo.GetCurrentGroupName());
|
||||||
|
#endif
|
||||||
child.localPosition = childNewLocal.MultiplyPoint(Vector3.zero);
|
child.localPosition = childNewLocal.MultiplyPoint(Vector3.zero);
|
||||||
child.localRotation = childNewLocal.rotation;
|
child.localRotation = childNewLocal.rotation;
|
||||||
child.localScale = childNewLocal.lossyScale;
|
child.localScale = childNewLocal.lossyScale;
|
||||||
|
Loading…
Reference in New Issue
Block a user