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

@@ -8,15 +8,15 @@ namespace Cryville.Crtr.Browsing.Actions {
public abstract bool CanInvoke(Uri uri, T resource);
public bool CanInvoke(Uri uri, IResourceMeta resource) {
if (resource == null) throw new ArgumentNullException("resource");
if (!(resource is T)) throw new ArgumentException("Mismatched resource type.");
return CanInvoke(uri, (T)resource);
if (resource is not T res) throw new ArgumentException("Mismatched resource type.");
return CanInvoke(uri, res);
}
public abstract void Invoke(Uri uri, T resource);
public void Invoke(Uri uri, IResourceMeta resource) {
if (resource == null) throw new ArgumentNullException("resource");
if (!(resource is T)) throw new ArgumentException("Mismatched resource type.");
Invoke(uri, (T)resource);
if (resource is not T res) throw new ArgumentException("Mismatched resource type.");
Invoke(uri, res);
}
}
}