refactor: Update Unity to 2022.3.62
This commit is contained in:
@@ -2,26 +2,26 @@ using System;
|
||||
|
||||
namespace Cryville.Common {
|
||||
public struct Identifier : IEquatable<Identifier> {
|
||||
public static Identifier Empty = new Identifier(0);
|
||||
public static Identifier Empty = new(0);
|
||||
public int Key { get; private set; }
|
||||
public object Name { get { return IdentifierManager.Shared.Retrieve(Key); } }
|
||||
public readonly object Name => IdentifierManager.Shared.Retrieve(Key);
|
||||
public Identifier(int key) {
|
||||
Key = key;
|
||||
}
|
||||
public Identifier(object name) {
|
||||
Key = IdentifierManager.Shared.Request(name);
|
||||
}
|
||||
public override bool Equals(object obj) {
|
||||
if (obj == null || !(obj is Identifier)) return false;
|
||||
return Equals((Identifier)obj);
|
||||
public override readonly bool Equals(object obj) {
|
||||
if (obj == null || obj is not Identifier other) return false;
|
||||
return Equals(other);
|
||||
}
|
||||
public bool Equals(Identifier other) {
|
||||
public readonly bool Equals(Identifier other) {
|
||||
return Key == other.Key;
|
||||
}
|
||||
public override int GetHashCode() {
|
||||
public override readonly int GetHashCode() {
|
||||
return Key;
|
||||
}
|
||||
public override string ToString() {
|
||||
public override readonly string ToString() {
|
||||
if (Key == 0) return "";
|
||||
return Name.ToString();
|
||||
}
|
||||
|
Reference in New Issue
Block a user