docs: document menu item autocreation of parameters (#1068)

Closes: #947
This commit is contained in:
bd_ 2024-08-30 19:19:56 -07:00 committed by GitHub
parent 802fea09d9
commit 13b9bf72e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 29 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -34,4 +34,19 @@ In order to define where a menu item will go in the menu, another component will
* The menu item can be on the same game object as a [Menu Installer](menu-installer) component.
* The menu item can be the child of a [Menu Group](menu-group) object (which would typically be on a game object with a Menu Installer component)
Unbound menu items have no effect.
Unbound menu items have no effect.
### Automatic Parameter Creation
When you specify a parameter name that is not declared in a [MA Parameters](parameters.md) component or VRC Expressions
Parameter asset, the Menu Item will create a parameter for you automatically. When this happens, you'll see some
checkboxes
to control whether the value is saved/synced.
![Automatic Parameter Creation](menu-item-auto-params.png)
If you click "Is Default", this menu item will be set as the default for this parameter. If multiple menu items are set
to "Is Default", the results are undefined. Don't do that!
If your menu item has no parameter name set, you'll still see these options; a parameter will be created if you have
any [Reactive Objects](./reaction/index.md) controlled by this menu item.

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -39,3 +39,16 @@ MA Menu Itemコンポーネントは、Unityのヒエラルキー内でExpressio
* メニュー項目を[Menu Group](menu-group)オブジェクトの子に配置するMenu Installerコンポーネントがあるゲームオブジェクトに配置される場合が多い
配置されないメニュー項目は効果がありません。
### パラメーターの自動生成
[MA Parameters](parameters.md)コンポーネントやVRC Expressions Parameterアセットで宣言されていないパラメーター名を指定すると、
Menu Itemはパラメーターを自動的に作成します。この場合、保存/同期されるかどうかを制御するためのチェックボックスが表示されます。
![パラメーターの自動生成](menu-item-auto-params.png)
「初期設定にする」をクリックすると、このメニュー項目がこのパラメーターのデフォルトに設定されます。
複数のメニュー項目が「初期設定にする」に設定されている場合、結果は不定になるのでやめましょう。
メニュー項目にパラメーター名が設定されていない場合でも、これらのオプションが表示されます。
その場合、ここのメニュー項目によって制御される[Reactive Objects](./reaction/index.md)がある場合、パラメーターが自動作成されます。