docs.unity.cn
    Show / Hide Table of Contents

    Class SpriteNameFileIdPair

    Data structure to hold Name ID pair.

    Inheritance
    Object
    SpriteNameFileIdPair
    Namespace: UnityEditor
    Syntax
    [Serializable]
    public class SpriteNameFileIdPair : IEquatable<SpriteNameFileIdPair>

    Constructors

    SpriteNameFileIdPair()

    Default constructor.

    Declaration
    public SpriteNameFileIdPair()

    SpriteNameFileIdPair(String, GUID)

    Constructor to initialize name and fileID.

    Declaration
    public SpriteNameFileIdPair(string name, GUID fileId)
    Parameters
    Type Name Description
    String name
    UnityEditor.GUID fileId

    Properties

    fileId

    FileId property. This property is obsolete. Please use GetFileGUID and SetFileGUID instead.

    Declaration
    [Obsolete("Property obsolete. Please use GetFileGUID and SetFileGUID instead.")]
    public long fileId { get; set; }
    Property Value
    Type Description
    Int64

    name

    Name property.

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

    Methods

    Equals(Object)

    Override Equal operator.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    Object to compare.

    Returns
    Type Description
    Boolean

    True if the same. False otherwise.

    Overrides
    Object.Equals(Object)

    Equals(SpriteNameFileIdPair)

    Override Equal operator.

    Declaration
    public bool Equals(SpriteNameFileIdPair pair)
    Parameters
    Type Name Description
    SpriteNameFileIdPair pair

    Object to compare.

    Returns
    Type Description
    Boolean

    True if the same. False otherwise.

    GetFileGUID()

    Returns the ID used for the name.

    Declaration
    public GUID GetFileGUID()
    Returns
    Type Description
    UnityEditor.GUID

    GUID value.

    GetHashCode()

    Custom hashcode generation.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    Int value representing the hash value.

    Overrides
    Object.GetHashCode()

    SetFileGUID(GUID)

    Sets the ID used for the name.

    Declaration
    public void SetFileGUID(GUID value)
    Parameters
    Type Name Description
    UnityEditor.GUID value

    GUID value to set.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on 09 May 2022
    Terms of use