This commit is contained in:
niko
2026-06-04 11:42:34 +02:00
parent f39ba70a9f
commit e720b98cd1
7488 changed files with 2493818 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Security;
namespace UnityEngine
{
// Token: 0x02000430 RID: 1072
internal class GUIStateObjects
{
// Token: 0x06003835 RID: 14389 RVA: 0x0006091C File Offset: 0x0005EB1C
[SecuritySafeCritical]
internal static object GetStateObject(Type t, int controlID)
{
object obj;
if (!GUIStateObjects.s_StateCache.TryGetValue(controlID, out obj) || obj.GetType() != t)
{
obj = Activator.CreateInstance(t);
GUIStateObjects.s_StateCache[controlID] = obj;
}
return obj;
}
// Token: 0x06003836 RID: 14390 RVA: 0x00060968 File Offset: 0x0005EB68
internal static object QueryStateObject(Type t, int controlID)
{
object obj = GUIStateObjects.s_StateCache[controlID];
object obj2;
if (t.IsInstanceOfType(obj))
{
obj2 = obj;
}
else
{
obj2 = null;
}
return obj2;
}
// Token: 0x06003837 RID: 14391 RVA: 0x000609A0 File Offset: 0x0005EBA0
internal static void Tests_ClearObjects()
{
GUIStateObjects.s_StateCache.Clear();
}
// Token: 0x04000FB0 RID: 4016
private static Dictionary<int, object> s_StateCache = new Dictionary<int, object>();
}
}