docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    PrefabCreatorBuildingBlock
    Implements
    IBuildingBlock
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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()

    Implements

    IBuildingBlock
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)