mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-02-02 19:52:51 +08:00
Fixing bugs
This commit is contained in:
parent
13a5bb5d50
commit
0209a40749
@ -1,7 +1,7 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.unity.collab-proxy": "1.10.2",
|
||||
"com.unity.ide.rider": "3.0.15",
|
||||
"com.unity.ide.rider": "3.0.16",
|
||||
"com.unity.ide.visualstudio": "2.0.11",
|
||||
"com.unity.ide.vscode": "1.2.4",
|
||||
"com.unity.test-framework": "1.1.29",
|
||||
|
@ -9,21 +9,20 @@ namespace net.fushizen.modular_avatar.core.editor
|
||||
{
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
if (!CustomGUI(position, property, label))
|
||||
if (CustomGUI(position, property, label)) return;
|
||||
|
||||
var xButtonSize = EditorStyles.miniButtonRight.CalcSize(new GUIContent("x"));
|
||||
var xButtonRect = new Rect(position.xMax - xButtonSize.x, position.y, xButtonSize.x, position.height);
|
||||
position = new Rect(position.x, position.y, position.width - xButtonSize.x, position.height);
|
||||
|
||||
property = property.FindPropertyRelative(nameof(AvatarObjectReference.referencePath));
|
||||
|
||||
position = EditorGUI.PrefixLabel(position, label);
|
||||
|
||||
using (var scope = new ZeroIndentScope())
|
||||
{
|
||||
var xButtonSize = EditorStyles.miniButtonRight.CalcSize(new GUIContent("x"));
|
||||
var xButtonRect = new Rect(position.xMax - xButtonSize.x, position.y, xButtonSize.x, position.height);
|
||||
position = new Rect(position.x, position.y, position.width - xButtonSize.x, position.height);
|
||||
|
||||
property = property.FindPropertyRelative(nameof(AvatarObjectReference.referencePath));
|
||||
|
||||
position = EditorGUI.PrefixLabel(position, label);
|
||||
|
||||
using (var scope = new ZeroIndentScope())
|
||||
{
|
||||
EditorGUI.LabelField(position,
|
||||
string.IsNullOrEmpty(property.stringValue) ? "(null)" : property.stringValue);
|
||||
}
|
||||
EditorGUI.LabelField(position,
|
||||
string.IsNullOrEmpty(property.stringValue) ? "(null)" : property.stringValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,19 +54,19 @@ namespace net.fushizen.modular_avatar.core.editor
|
||||
{
|
||||
var virtObj = new SerializedObject(objRefs);
|
||||
var virtProp = virtObj.FindProperty(nameof(TempObjRef.target));
|
||||
}
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
EditorGUILayout.PropertyField(virtProp, G("boneproxy.target"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
virtObj.ApplyModifiedPropertiesWithoutUndo();
|
||||
for (int i = 0; i < targets.Length; i++)
|
||||
EditorGUILayout.PropertyField(virtProp, G("boneproxy.target"));
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
var t = (ModularAvatarBoneProxy) targets[i];
|
||||
Undo.RecordObjects(targets, "Set targets");
|
||||
t.target = ((TempObjRef) objRefs[i]).target;
|
||||
virtObj.ApplyModifiedPropertiesWithoutUndo();
|
||||
for (int i = 0; i < targets.Length; i++)
|
||||
{
|
||||
var t = (ModularAvatarBoneProxy) targets[i];
|
||||
Undo.RecordObjects(targets, "Set targets");
|
||||
t.target = ((TempObjRef) objRefs[i]).target;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
"version": "3.0.15",
|
||||
"version": "3.0.16",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
Loading…
Reference in New Issue
Block a user