Class PrefabCreatorBuildingBlock
This Building Block can be used in a Building Block Section to instantiate a prefab. The Building Block Section is in charge of setting the prefab to instantiate using that Building Block as well as setting a unique and recognizable name and icon for this Building Block.
Implements
Inherited Members
Namespace: Unity.XR.CoreUtils .Editor.BuildingBlocks
Assembly: Unity.XR.CoreUtils.Editor.dll
Syntax
public class PrefabCreatorBuildingBlock : IBuildingBlock
Constructors
PrefabCreatorBuildingBlock(string, string, string, bool, string)
Class constructor.
Declaration
public PrefabCreatorBuildingBlock(string prefabPath, string buildingBlockId = "Prefab Creator", string buildingBlockIconPath = null, bool isEnabled = true, string tooltip = "")
Parameters
Type | Name | Description |
---|---|---|
string | prefabPath | The path for the prefab to be created. |
string | buildingBlockId | The name of this Building Block. This id will be used to show this Building Block in the UI. |
string | buildingBlockIconPath | The path to the icon of this Building Block in the UI. This icon should be placed in a Resources folder. |
bool | isEnabled | Whether the user know if this Building Block is enabled or disabled. If disabled, the Building Block will be grayed out in the UI. |
string | tooltip | Description of the Building Block. This description will be displayed as a tooltip in the UI. |
Properties
IconPath
The path to the icon of this Building Block in the UI. This icon should be placed in a Resources folder.
Declaration
public string IconPath { get; }
Property Value
Type | Description |
---|---|
string |
Id
The name of this Building Block. This id will be used to show this Building Block in the UI.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
string |
IsEnabled
Whether the user know if this Building Block is enabled or disabled. If disabled, the Building Block will be grayed out in the UI.
Declaration
public bool IsEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
Tooltip
Description of the Building Block. This description will be displayed as a tooltip in the UI.
Declaration
public string Tooltip { get; }
Property Value
Type | Description |
---|---|
string |
Methods
ExecuteBuildingBlock()
Implement this method to execute the actions associated to this Building Block.
Declaration
public void ExecuteBuildingBlock()