docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SpriteNameFileIdPair

    Data structure to hold Name ID pair.

    Inheritance
    object
    SpriteNameFileIdPair
    Implements
    IEquatable<SpriteNameFileIdPair>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor
    Assembly: Unity.2D.Sprite.Editor.dll
    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
    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
    long

    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
    bool

    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
    bool

    True if the same. False otherwise.

    GetFileGUID()

    Returns the ID used for the name.

    Declaration
    public GUID GetFileGUID()
    Returns
    Type Description
    GUID

    GUID value.

    GetHashCode()

    Custom hashcode generation.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    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
    GUID value

    GUID value to set.

    Implements

    IEquatable<T>
    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)