Disable GUI layout on Unity key receiver to avoid GC.

This commit is contained in:
2022-11-21 14:06:57 +08:00
parent 77d6ac2caf
commit 784c3fc338

View File

@@ -49,6 +49,9 @@ namespace Cryville.Common.Unity.Input {
Callback = h;
}
public abstract string GetKeyName(int type);
void Awake() {
useGUILayout = false;
}
void Update() {
double time = Time.realtimeSinceStartupAsDouble;
foreach (var k in Keys) {