Class SpriteNameFileIdPair
Data structure to hold Name ID pair.
Implements
Inherited Members
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
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
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. |