Interface IPrefabBuilder | Asset Graph | 1.6.0-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Interface IPrefabBuilder

    IPrefabBuilder is an interface to create Prefab AssetReference from incoming asset group. Subclass of IPrefabBuilder must have CUstomPrefabBuilder attribute.

    Namespace: UnityEngine.AssetGraph
    Syntax
    public interface IPrefabBuilder

    Methods

    CanCreatePrefab(String, List<Object>, ref PrefabCreateDescription)

    Determines whether this instance can create prefab with the specified groupKey objects.

    Declaration
    bool CanCreatePrefab(string groupKey, List<object> objects, ref PrefabCreateDescription description)
    Parameters
    Type Name Description
    String groupKey

    Group key.

    List<Object> objects

    list of Objects passed from node to create a prefab.

    PrefabCreateDescription description

    Prefab descriptions to create with this IPrefabBuilder. if the method is returning true, valid descriptions should be set.

    Returns
    Type Description
    Boolean

    true if this instance can create prefab the specified groupKey objects; otherwise, false.

    CreatePrefab(String, List<Object>, GameObject)

    Creates the prefab.

    Declaration
    GameObject CreatePrefab(string groupKey, List<object> objects, GameObject previous)
    Parameters
    Type Name Description
    String groupKey

    Group key.

    List<Object> objects

    Objects.

    GameObject previous

    Previous prefab.

    Returns
    Type Description
    GameObject

    The prefab.

    OnInspectorGUI(Action)

    Draw Inspector GUI for this PrefabBuilder.

    Declaration
    void OnInspectorGUI(Action onValueChanged)
    Parameters
    Type Name Description
    Action onValueChanged

    On value changed.

    OnValidate()

    Called when validating this prefabBuilder. NodeException should be thrown if this modifier is not ready to be used for building.

    Declaration
    void OnValidate()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023