docs.unity3d.com
    Show / Hide Table of Contents

    Class Model

    Inheritance
    Object
    Object
    ScriptableObject
    Model
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    UnityEngine.Object.FindFirstObjectByType<T>()
    UnityEngine.Object.FindAnyObjectByType<T>()
    UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
    UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Muse.Common
    Syntax
    [Serializable]
    [Icon("Packages/com.unity.muse.common/Editor/Resources/Icons/MuseAssetIcon.png")]
    public class Model : ScriptableObject, IContext

    Properties

    ActiveTool

    Declaration
    public ICanvasTool ActiveTool { get; }
    Property Value
    Type Description
    ICanvasTool

    AssetsData

    Declaration
    public List<Artifact> AssetsData { get; }
    Property Value
    Type Description
    List<Artifact>

    CurrentMode

    Declaration
    public string CurrentMode { get; }
    Property Value
    Type Description
    String

    CurrentOperators

    Get the list of operators currently being used

    Declaration
    public List<IOperator> CurrentOperators { get; }
    Property Value
    Type Description
    List<IOperator>

    DraggedArtifacts

    Declaration
    public List<Artifact> DraggedArtifacts { get; }
    Property Value
    Type Description
    List<Artifact>

    isRefineMode

    Declaration
    public bool isRefineMode { get; }
    Property Value
    Type Description
    Boolean

    RefinedArtifact

    The artifact currently being refined.

    Declaration
    public Artifact RefinedArtifact { get; }
    Property Value
    Type Description
    Artifact

    SelectedArtifact

    Declaration
    public Artifact SelectedArtifact { get; }
    Property Value
    Type Description
    Artifact

    Methods

    AddAsset(Artifact)

    Declaration
    public void AddAsset(Artifact artifact)
    Parameters
    Type Name Description
    Artifact artifact

    ArtifactSelected(Artifact, Boolean)

    Sets the selected artifact.

    Declaration
    public void ArtifactSelected(Artifact artifact, bool force = false)
    Parameters
    Type Name Description
    Artifact artifact

    The artifact to select.

    Boolean force

    Force the selection change even if the artifact is the same as current selection.

    Branch(Artifact)

    Branch off the given artifact and add it to the generations list as a new generations.

    Declaration
    public void Branch(Artifact artifact)
    Parameters
    Type Name Description
    Artifact artifact

    The artifact to branch off.

    CanvasRefineArtifact(Artifact)

    Declaration
    public void CanvasRefineArtifact(Artifact artifact)
    Parameters
    Type Name Description
    Artifact artifact

    DeleteData<T>()

    Declaration
    public void DeleteData<T>()
    Type Parameters
    Name Description
    T

    DeselectAll()

    Declaration
    public void DeselectAll()

    Dispose()

    Declaration
    public void Dispose()

    DragEnd()

    Declaration
    public void DragEnd()

    DragEnd(IEnumerable<Artifact>)

    Declaration
    public void DragEnd(IEnumerable<Artifact> artifacts)
    Parameters
    Type Name Description
    IEnumerable<Artifact> artifacts

    DragStart(IEnumerable<Artifact>)

    Declaration
    public void DragStart(IEnumerable<Artifact> artifacts)
    Parameters
    Type Name Description
    IEnumerable<Artifact> artifacts

    DropItems(IEnumerable<Artifact>, Vector3)

    Declaration
    public void DropItems(IEnumerable<Artifact> artifacts, Vector3 position)
    Parameters
    Type Name Description
    IEnumerable<Artifact> artifacts
    Vector3 position

    EditorStartDrag(String, IList<Artifact>)

    Declaration
    public void EditorStartDrag(string type, IList<Artifact> artifact)
    Parameters
    Type Name Description
    String type
    IList<Artifact> artifact

    EditorStartMultiDrag(IList<(String name, IList<Artifact> artifacts)>)

    Declaration
    public void EditorStartMultiDrag(IList<(string name, IList<Artifact> artifacts)> artifactsList)
    Parameters
    Type Name Description
    IList<(T1, T2)<String, IList<Artifact>>> artifactsList

    ExportArtifact(Artifact)

    Declaration
    public void ExportArtifact(Artifact artifact)
    Parameters
    Type Name Description
    Artifact artifact

    FinishRefineArtifact()

    Declaration
    public void FinishRefineArtifact()

    GenerateButtonClicked()

    Declaration
    public void GenerateButtonClicked()

    GetData<T>()

    Declaration
    public T GetData<T>()
        where T : IModelData, new()
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    LoggedInStateChanged(Boolean)

    Declaration
    public void LoggedInStateChanged(bool loggedIn)
    Parameters
    Type Name Description
    Boolean loggedIn

    MaskPaintDone(Texture2D)

    Declaration
    public void MaskPaintDone(Texture2D texture)
    Parameters
    Type Name Description
    Texture2D texture

    ModeChanged(Int32)

    Declaration
    public void ModeChanged(int mode)
    Parameters
    Type Name Description
    Int32 mode

    MultiExport(IList<ArtifactView>)

    Declaration
    public void MultiExport(IList<ArtifactView> artifactViews)
    Parameters
    Type Name Description
    IList<ArtifactView> artifactViews

    RefineArtifact(Artifact)

    Declaration
    public void RefineArtifact(Artifact artifact)
    Parameters
    Type Name Description
    Artifact artifact

    RemoveAssets(Artifact[])

    Remove give artifacts from this model.

    Declaration
    public void RemoveAssets(params Artifact[] artifacts)
    Parameters
    Type Name Description
    Artifact[] artifacts

    Artifacts to remove from model.

    RemoveOperators(IOperator[])

    Remove operators in the nodes list.

    Declaration
    public void RemoveOperators(params IOperator[] operators)
    Parameters
    Type Name Description
    IOperator[] operators

    Operators to remove.

    RequestFrameArtifact(Artifact)

    Declaration
    public void RequestFrameArtifact(Artifact artifact)
    Parameters
    Type Name Description
    Artifact artifact

    SetActiveTool(ICanvasTool)

    Declaration
    public void SetActiveTool(ICanvasTool tool)
    Parameters
    Type Name Description
    ICanvasTool tool

    SetAsThumbnail(Artifact, Nullable<Int32>)

    Set the thumbnail of the generations list to the given artifact.

    Declaration
    public void SetAsThumbnail(Artifact artifact, int? indexToReplace = null)
    Parameters
    Type Name Description
    Artifact artifact

    Artifact to set.

    Nullable<Int32> indexToReplace

    The index in the generations list to replace. (optional)

    SetCurrentPrompt(String)

    Declaration
    public void SetCurrentPrompt(string prompt)
    Parameters
    Type Name Description
    String prompt

    SetMaskSeamless(Boolean)

    Declaration
    public void SetMaskSeamless(bool seamless)
    Parameters
    Type Name Description
    Boolean seamless

    SetReferenceOperator(Artifact)

    Declaration
    public void SetReferenceOperator(Artifact artifact)
    Parameters
    Type Name Description
    Artifact artifact

    UpdateOperators(IEnumerable<IOperator>, Boolean)

    Set or replace operators in the nodes list.

    Declaration
    public void UpdateOperators(IEnumerable<IOperator> operators, bool set)
    Parameters
    Type Name Description
    IEnumerable<IOperator> operators

    Operators to update.

    Boolean set

    Set or update the operators

    UpdateOperators(IOperator[])

    Set or replace operators in the nodes list.

    Declaration
    public void UpdateOperators(params IOperator[] operators)
    Parameters
    Type Name Description
    IOperator[] operators

    Operators to update.

    UpdateToolState()

    Force updating the available tools state

    Declaration
    public void UpdateToolState()

    Events

    OnActiveToolChanged

    Declaration
    public event Action<ICanvasTool> OnActiveToolChanged
    Event Type
    Type Description
    Action<ICanvasTool>

    OnArtifactAdded

    Declaration
    public event Action<Artifact> OnArtifactAdded
    Event Type
    Type Description
    Action<Artifact>

    OnArtifactRemoved

    Declaration
    public event Action<Artifact[]> OnArtifactRemoved
    Event Type
    Type Description
    Action<Artifact[]>

    OnArtifactSelected

    Declaration
    public event Action<Artifact> OnArtifactSelected
    Event Type
    Type Description
    Action<Artifact>

    OnCanvasRefineArtifact

    Declaration
    public event Action<Artifact> OnCanvasRefineArtifact
    Event Type
    Type Description
    Action<Artifact>

    OnCurrentPromptChanged

    Declaration
    public event Action<string> OnCurrentPromptChanged
    Event Type
    Type Description
    Action<String>

    OnDeselectAll

    Declaration
    public event Action OnDeselectAll
    Event Type
    Type Description
    Action

    OnDispose

    Declaration
    public event Action OnDispose
    Event Type
    Type Description
    Action

    OnEditorDragStart

    Declaration
    public event Action<string, IList<Artifact>> OnEditorDragStart
    Event Type
    Type Description
    Action<String, IList<Artifact>>

    OnEditorMultiDragStart

    Declaration
    public event Action<IList<(string name, IList<Artifact> artifacts)>> OnEditorMultiDragStart
    Event Type
    Type Description
    Action<IList<(T1, T2)<String, IList<Artifact>>>>

    OnExportArtifact

    Declaration
    public event Action<Artifact> OnExportArtifact
    Event Type
    Type Description
    Action<Artifact>

    OnFinishRefineArtifact

    Declaration
    public event Action<Artifact> OnFinishRefineArtifact
    Event Type
    Type Description
    Action<Artifact>

    OnFrameArtifactRequested

    Declaration
    public event Action<Artifact> OnFrameArtifactRequested
    Event Type
    Type Description
    Action<Artifact>

    OnGenerateButtonClicked

    Declaration
    public event Action OnGenerateButtonClicked
    Event Type
    Type Description
    Action

    OnItemsDropped

    Declaration
    public event Action<IEnumerable<Artifact>, Vector3> OnItemsDropped
    Event Type
    Type Description
    Action<IEnumerable<Artifact>, Vector3>

    OnLoggedInStateChanged

    Declaration
    public event Action<bool> OnLoggedInStateChanged
    Event Type
    Type Description
    Action<Boolean>

    OnMaskPaintDone

    Declaration
    public event Action<Texture2D> OnMaskPaintDone
    Event Type
    Type Description
    Action<Texture2D>

    OnModeChanged

    Declaration
    public event Action<int> OnModeChanged
    Event Type
    Type Description
    Action<Int32>

    OnModified

    Event raised when the model was modified.

    Declaration
    public event Action OnModified
    Event Type
    Type Description
    Action

    OnMultiExport

    Declaration
    public event Action<IList<ArtifactView>> OnMultiExport
    Event Type
    Type Description
    Action<IList<ArtifactView>>

    OnOperatorRemoved

    Called when removing an operator

    Declaration
    public event Action<IEnumerable<IOperator>> OnOperatorRemoved
    Event Type
    Type Description
    Action<IEnumerable<IOperator>>

    OnOperatorUpdated

    Declaration
    public event Action<IEnumerable<IOperator>, bool> OnOperatorUpdated
    Event Type
    Type Description
    Action<IEnumerable<IOperator>, Boolean>

    OnRefineArtifact

    Declaration
    public event Action<Artifact> OnRefineArtifact
    Event Type
    Type Description
    Action<Artifact>

    OnSetMaskSeamless

    Declaration
    public event Action<bool> OnSetMaskSeamless
    Event Type
    Type Description
    Action<Boolean>

    OnSetReferenceOperator

    Declaration
    public event Action<Artifact> OnSetReferenceOperator
    Event Type
    Type Description
    Action<Artifact>

    OnUpdateToolState

    Declaration
    public event Action OnUpdateToolState
    Event Type
    Type Description
    Action

    Extension Methods

    ObjectHelper.SafeDestroy(Object)
    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