When an Expression Menu control is changed from a Sub Menu to another type of control, the reference to the Sub Menu asset is still evaluated for the validity of the Expression Menu of the avatar, despite it not being used.
This was still true as of VRCSDK3-AVATAR-2021.07.12.18.52 and U2019-VRCSDK3-AVATAR-2021.07.15.13.44.
This can create confusing "VRCExpressionMenu uses a parameter that is not defined" messages pointing to menu assets and parameters that are not actively being used by the active avatar.
How to reproduce:
  • (In a new scene, create the minimum required for an avatar)
  • Create a new Expression Parameters asset
  • Create a new Expression Menu asset, and name it "Main"
  • In the Avatar Descriptor, in the Expressions, click customize.
  • Assign the Expression Parameters asset to the avatar
  • Assign the "Main" Expression Menu asset to the avatar
  • Open the VRChat SDK Control panel, and verify that the avatar is in an upload-able state (no grayed out buttons, and no error messages)
  • Create another Expression Menu asset, and name it "Inner"
  • In the "Inner" Expression Menu asset, click Add Control
  • In the newly added control, set the Parameter field on the right to the letters "Abc"
  • In the "Main" Expression Menu asset, click Add Control
  • In the newly added control, set the Type to Sub Menu
  • In the newly added control, set the Sub Menu to point to the "Inner" asset
  • Open the VRChat SDK Control panel, and verify that the avatar is in an NON upload-able state, with a message "VRCExpressionMenu uses a parameter that is not defined. Parameter: Abc"
  • In the "Main" Expression Menu asset, change the control Type to Button
  • Open the VRChat SDK Control panel
Observed:
  • The avatar is in an NON upload-able state (grayed out buttons), with a message "VRCExpressionMenu uses a parameter that is not defined. Parameter: Abc"
  • Clicking the "Select" button next to that message will select the "Inner" Expression Menu asset.
Expected:
  • The avatar should be in an upload-able state (no grayed out buttons, and no error messages)
  • There should NOT be a warning message saying that "VRCExpressionMenu uses a parameter that is not defined. Parameter: Abc"
  • The "Inner" Expression Menu asset should not be taken into consideration in the evaluation of the validity of the "Main" Expression Menu, as it is no longer visibly referenced.