mirror of
https://github.com/AnnulusGames/Alchemy.git
synced 2025-01-22 08:18:51 -05:00
Add: new attribute docs
This commit is contained in:
parent
85fa328495
commit
e675aae194
15
docs/articles/ja/attributes/disable-alchemy-editor.md
Normal file
15
docs/articles/ja/attributes/disable-alchemy-editor.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Disable Alchemy Editor Attribute
|
||||
|
||||
対象のクラスのAlchemyEditorを無効化し、デフォルトのInspectorを使用して描画します。フィールドにこの属性を追加した場合、そのフィールドのみをデフォルトのPropertyFieldを用いて描画するように変更します。
|
||||
|
||||
![img](../../../images/img-attribute-disable-alchemy-editor.png)
|
||||
|
||||
```cs
|
||||
[DisableAlchemyEditor]
|
||||
public class DisableAlchemyEditorExample : MonoBehaviour
|
||||
{
|
||||
public float foo;
|
||||
public Vector3 bar;
|
||||
public GameObject baz;
|
||||
}
|
||||
```
|
28
docs/articles/ja/attributes/list-view-settings.md
Normal file
28
docs/articles/ja/attributes/list-view-settings.md
Normal file
@ -0,0 +1,28 @@
|
||||
# List View Settings Attribute
|
||||
|
||||
コレクションの表示に関する設定を変更します。この属性を用いることで行を見やすくしたり、要素数/要素順をInspectorから変更不可能な配列を作成したりすることが可能になります。
|
||||
|
||||
![img](../../../images/img-attribute-list-view-settings.png)
|
||||
|
||||
```cs
|
||||
[ListViewSettings(ShowAlternatingRowBackgrounds = AlternatingRowBackground.All, ShowFoldoutHeader = false)]
|
||||
public int[] array1;
|
||||
|
||||
[ListViewSettings(Reorderable = false, ShowAddRemoveFooter = false, ShowBorder = false, ShowBoundCollectionSize = false)]
|
||||
public Vector3[] array2 = new Vector3[]
|
||||
{
|
||||
Vector3.zero,
|
||||
Vector3.one
|
||||
};
|
||||
```
|
||||
|
||||
| パラメータ | 説明 |
|
||||
| - | - |
|
||||
| ShowAddRemoveFooter | 要素の追加/削除を行うフッターを表示するか |
|
||||
| ShowAlternatingRowBackgrounds | 一行ごとに背景色を変更するかどうか |
|
||||
| ShowBorder | 境界線を表示するか |
|
||||
| ShowBoundCollectionSize | 要素数を変更するフィールドを表示するか |
|
||||
| ShowFoldoutHeader | 折りたたみ可能なヘッダーを表示するか |
|
||||
| SelectionType | 要素の選択に関する設定 |
|
||||
| Reorderable | 要素を並び替え可能か |
|
||||
| ReorderMode | 並び替えの表示に関する設定 |
|
11
docs/articles/ja/attributes/on-inspector-destroy.md
Normal file
11
docs/articles/ja/attributes/on-inspector-destroy.md
Normal file
@ -0,0 +1,11 @@
|
||||
# On Inspector Destroy Attribute
|
||||
|
||||
Inspectorが破棄された際にメソッドを実行します。
|
||||
|
||||
```cs
|
||||
[OnInspectorDestroy]
|
||||
void OnInspectorDestroy()
|
||||
{
|
||||
Debug.Log("Destroy");
|
||||
}
|
||||
```
|
11
docs/articles/ja/attributes/on-inspector-disable.md
Normal file
11
docs/articles/ja/attributes/on-inspector-disable.md
Normal file
@ -0,0 +1,11 @@
|
||||
# On Inspector Disable Attribute
|
||||
|
||||
Inspectorが無効化された際にメソッドを実行します。
|
||||
|
||||
```cs
|
||||
[OnInspectorDisable]
|
||||
void OnInspectorDisable()
|
||||
{
|
||||
Debug.Log("Disable");
|
||||
}
|
||||
```
|
11
docs/articles/ja/attributes/on-inspector-enable.md
Normal file
11
docs/articles/ja/attributes/on-inspector-enable.md
Normal file
@ -0,0 +1,11 @@
|
||||
# On Inspector Enable Attribute
|
||||
|
||||
Inspectorが有効化された際にメソッドを実行します。
|
||||
|
||||
```cs
|
||||
[OnInspectorEnable]
|
||||
void OnInspectorEnable()
|
||||
{
|
||||
Debug.Log("Enable");
|
||||
}
|
||||
```
|
17
docs/articles/ja/attributes/on-value-changed.md
Normal file
17
docs/articles/ja/attributes/on-value-changed.md
Normal file
@ -0,0 +1,17 @@
|
||||
# On Value Changed Attribute
|
||||
|
||||
フィールドの値が変更された際に、指定された名前のメソッドを実行します。
|
||||
|
||||
```cs
|
||||
[OnValueChanged("OnValueChanged")]
|
||||
public int foo;
|
||||
|
||||
void OnValueChanged(int value)
|
||||
{
|
||||
Debug.Log(value);
|
||||
}
|
||||
```
|
||||
|
||||
| パラメータ | 説明 |
|
||||
| - | - |
|
||||
| MethodName | 値の変更時に呼ばれるメソッドの名前 |
|
@ -20,12 +20,16 @@
|
||||
href: attributes/assets-only.md
|
||||
- name: Button
|
||||
href: attributes/button.md
|
||||
- name: Disable Alchemy Editor
|
||||
href: attributes/disable-alchemy-editor.md
|
||||
- name: Hide Script Field
|
||||
href: attributes/hide-script-field.md
|
||||
- name: Indent
|
||||
href: attributes/indent.md
|
||||
- name: Inline Editor
|
||||
href: attributes/inline-editor.md
|
||||
- name: List View Settings
|
||||
href: attributes/list-view-settings.md
|
||||
- name: Order
|
||||
href: attributes/order.md
|
||||
- name: Read Only
|
||||
@ -70,6 +74,16 @@
|
||||
href: attributes/required.md
|
||||
- name: Validate Input
|
||||
href: attributes/validate-input.md
|
||||
|
||||
- name: Events
|
||||
- name: On Inspector Enable
|
||||
href: attributes/on-inspector-enable.md
|
||||
- name: On Inspector Destroy
|
||||
href: attributes/on-inspector-destroy.md
|
||||
- name: On Inspector Disable
|
||||
href: attributes/on-inspector-disable.md
|
||||
- name: On Value Changed
|
||||
href: attributes/on-value-changed.md
|
||||
|
||||
- name: Groups
|
||||
- name: Box Group
|
||||
|
BIN
docs/images/img-attribute-disable-alchemy-editor.png
Normal file
BIN
docs/images/img-attribute-disable-alchemy-editor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
docs/images/img-attribute-list-view-settings.png
Normal file
BIN
docs/images/img-attribute-list-view-settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Loading…
Reference in New Issue
Block a user