mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-03-09 23:34:56 +08:00
ui: implement replace object UI and add screenshots to docs
This commit is contained in:
parent
3f5a52859f
commit
9609328cf0
@ -0,0 +1,23 @@
|
|||||||
|
using UnityEditor;
|
||||||
|
using static nadena.dev.modular_avatar.core.editor.Localization;
|
||||||
|
|
||||||
|
namespace nadena.dev.modular_avatar.core.editor
|
||||||
|
{
|
||||||
|
[CustomEditor(typeof(ModularAvatarReplaceObject))]
|
||||||
|
internal class ReplaceObjectEditor : MAEditorBase
|
||||||
|
{
|
||||||
|
private SerializedProperty _targetObject;
|
||||||
|
|
||||||
|
protected void OnEnable()
|
||||||
|
{
|
||||||
|
_targetObject = serializedObject.FindProperty("targetObject");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnInnerInspectorGUI()
|
||||||
|
{
|
||||||
|
EditorGUILayout.PropertyField(_targetObject, G("replace_object.target_object"));
|
||||||
|
|
||||||
|
Localization.ShowLanguageUI();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 721b66e4ba3e401585052315355a47e4
|
||||||
|
timeCreated: 1690650283
|
@ -150,5 +150,6 @@
|
|||||||
"menuitem.prop.is_default": "Is Group Default",
|
"menuitem.prop.is_default": "Is Group Default",
|
||||||
"animation_gen.duplicate_binding": "Controls from different control groups are trying to animate the same parameter. Parameter: {0}",
|
"animation_gen.duplicate_binding": "Controls from different control groups are trying to animate the same parameter. Parameter: {0}",
|
||||||
"animation_gen.multiple_defaults": "Multiple default menu items were found in the same control group.",
|
"animation_gen.multiple_defaults": "Multiple default menu items were found in the same control group.",
|
||||||
"menuitem.misc.add_item": "Add menu item"
|
"menuitem.misc.add_item": "Add menu item",
|
||||||
|
"replace_object.target_object": "Object to replace"
|
||||||
}
|
}
|
@ -148,5 +148,6 @@
|
|||||||
"menuitem.prop.is_default": "グループの初期設定にする",
|
"menuitem.prop.is_default": "グループの初期設定にする",
|
||||||
"animation_gen.duplicate_binding": "別々のコントロールグループから、同じパラメーターが操作されています。パラメーター:{0}",
|
"animation_gen.duplicate_binding": "別々のコントロールグループから、同じパラメーターが操作されています。パラメーター:{0}",
|
||||||
"animation_gen.multiple_defaults": "同じコントロールグループに初期設定に指定されたメニューアイテムが複数あります。",
|
"animation_gen.multiple_defaults": "同じコントロールグループに初期設定に指定されたメニューアイテムが複数あります。",
|
||||||
"menuitem.misc.add_item": "メニューアイテムを追加"
|
"menuitem.misc.add_item": "メニューアイテムを追加",
|
||||||
|
"replace_object.target_object": "上書き先"
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,5 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
public class ModularAvatarReplaceObject : AvatarTagComponent
|
public class ModularAvatarReplaceObject : AvatarTagComponent
|
||||||
{
|
{
|
||||||
public AvatarObjectReference targetObject = new AvatarObjectReference();
|
public AvatarObjectReference targetObject = new AvatarObjectReference();
|
||||||
// public bool deleteChildren;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,7 @@
|
|||||||
# Replace Object
|
# Replace Object
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
The Replace Object component allows you to completely replace the contents of a GameObject on the parent avatar.
|
The Replace Object component allows you to completely replace the contents of a GameObject on the parent avatar.
|
||||||
|
|
||||||
## When should I use it?
|
## When should I use it?
|
||||||
|
BIN
docs/docs/reference/replace-object.png
Normal file
BIN
docs/docs/reference/replace-object.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
@ -1,5 +1,7 @@
|
|||||||
# Replace Object
|
# Replace Object
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
Replace Objectコンポーネントを使うことで、任意のGameObjectの内容を完全に置き換えることができます。
|
Replace Objectコンポーネントを使うことで、任意のGameObjectの内容を完全に置き換えることができます。
|
||||||
|
|
||||||
## どんな時に使うべきか?
|
## どんな時に使うべきか?
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
Loading…
Reference in New Issue
Block a user