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