refactor: Update Unity to 2022.3.62

This commit is contained in:
2025-06-21 01:22:02 +08:00
parent d71bf7d4a5
commit 283783954f
112 changed files with 778 additions and 907 deletions

View File

@@ -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();
}