mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-02-07 06:12:47 +08:00
fix: MA Move Independently is not listed in the MA group in Add Components (#1007)
Closes: #1002
This commit is contained in:
parent
1b3b9194c0
commit
d83c3351d7
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using nadena.dev.modular_avatar.core.armature_lock;
|
using nadena.dev.modular_avatar.core.armature_lock;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
#if MA_VRCSDK3_AVATARS
|
#if MA_VRCSDK3_AVATARS
|
||||||
using VRC.SDKBase;
|
using VRC.SDKBase;
|
||||||
@ -9,7 +10,7 @@ using VRC.SDKBase;
|
|||||||
namespace nadena.dev.modular_avatar.core.ArmatureAwase
|
namespace nadena.dev.modular_avatar.core.ArmatureAwase
|
||||||
{
|
{
|
||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
//[AddComponentMenu("")]
|
[AddComponentMenu("Modular Avatar/MA Move Independently")]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
[HelpURL("https://modular-avatar.nadena.dev/docs/reference/move-independently?lang=auto")]
|
[HelpURL("https://modular-avatar.nadena.dev/docs/reference/move-independently?lang=auto")]
|
||||||
class MAMoveIndependently : MonoBehaviour, IEditorOnly
|
class MAMoveIndependently : MonoBehaviour, IEditorOnly
|
||||||
@ -165,7 +166,7 @@ namespace nadena.dev.modular_avatar.core.ArmatureAwase
|
|||||||
var newRotation = childNewLocal.rotation;
|
var newRotation = childNewLocal.rotation;
|
||||||
var newScale = childNewLocal.lossyScale;
|
var newScale = childNewLocal.lossyScale;
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
UnityEditor.Undo.RecordObject(child, UnityEditor.Undo.GetCurrentGroupName());
|
Undo.RecordObject(child, Undo.GetCurrentGroupName());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
child.localPosition = newPosition;
|
child.localPosition = newPosition;
|
||||||
|
Loading…
Reference in New Issue
Block a user