string MenuPath { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The MenuPath property of the PrefabFile class specifies the path in the menu where this prefab will appear if the ShowInMenu property is set to true. This allows users to easily locate and create the prefab from the menu interface.

Usage

To use the MenuPath property, ensure that the ShowInMenu property is set to true. Then, assign a string value to MenuPath that represents the desired menu path for the prefab. This path will be used to display the prefab in the menu, allowing users to create it from the specified location.

Example

// Example of setting the MenuPath property
PrefabFile myPrefab = new PrefabFile();
myPrefab.ShowInMenu = true;
myPrefab.MenuPath = "Custom/Prefabs/MyPrefab";

// This will make the prefab appear under the "Custom/Prefabs" menu path if ShowInMenu is true.