class MAGES::SceneGraph::Editor::SelectOrCreatePrefab¶
Overview¶
An advanced property field with behavior for selecting a game object from the asset directory, or creating a new one via the Unity scene. More…
class SelectOrCreatePrefab: public VisualElement
{
public:
// properties
ObjectSelectedEventHandler SelectionChanged;
// methods
SelectOrCreatePrefab(string displayLabel, string prefabName);
delegate void ObjectSelectedEventHandler(GameObject newValue);
void SetValueWithoutNotify(GameObject newValue);
};
Detailed Documentation¶
An advanced property field with behavior for selecting a game object from the asset directory, or creating a new one via the Unity scene.
Properties¶
ObjectSelectedEventHandler SelectionChanged
Event for when the selected object changes.
Methods¶
SelectOrCreatePrefab(string displayLabel, string prefabName)
Initializes a new instance of the SelectOrCreatePrefab class.
Parameters:
displayLabel |
The label to use for the object field. |
prefabName |
The name of the prefab to create. |
delegate void ObjectSelectedEventHandler(GameObject newValue)
Event for when the selected object changes.
Parameters:
newValue |
The new value of the object. |
void SetValueWithoutNotify(GameObject newValue)
Sets the value of the object field without invoking the selection changed event.
Parameters:
newValue |
The new value. |