66 lines
1.9 KiB
C#
66 lines
1.9 KiB
C#
using System;
|
|
using System.Reflection;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine
|
|
{
|
|
// Token: 0x02000279 RID: 633
|
|
[AttributeUsage(AttributeTargets.Method)]
|
|
public class GUITargetAttribute : Attribute
|
|
{
|
|
// Token: 0x06002B6E RID: 11118 RVA: 0x000398E0 File Offset: 0x00037AE0
|
|
public GUITargetAttribute()
|
|
{
|
|
this.displayMask = -1;
|
|
}
|
|
|
|
// Token: 0x06002B6F RID: 11119 RVA: 0x000398F0 File Offset: 0x00037AF0
|
|
public GUITargetAttribute(int displayIndex)
|
|
{
|
|
this.displayMask = 1 << displayIndex;
|
|
}
|
|
|
|
// Token: 0x06002B70 RID: 11120 RVA: 0x00039908 File Offset: 0x00037B08
|
|
public GUITargetAttribute(int displayIndex, int displayIndex1)
|
|
{
|
|
this.displayMask = (1 << displayIndex) | (1 << displayIndex1);
|
|
}
|
|
|
|
// Token: 0x06002B71 RID: 11121 RVA: 0x00039924 File Offset: 0x00037B24
|
|
public GUITargetAttribute(int displayIndex, int displayIndex1, params int[] displayIndexList)
|
|
{
|
|
this.displayMask = (1 << displayIndex) | (1 << displayIndex1);
|
|
for (int i = 0; i < displayIndexList.Length; i++)
|
|
{
|
|
this.displayMask |= 1 << displayIndexList[i];
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002B72 RID: 11122 RVA: 0x00039974 File Offset: 0x00037B74
|
|
[RequiredByNativeCode]
|
|
private static int GetGUITargetAttrValue(Type klass, string methodName)
|
|
{
|
|
MethodInfo method = klass.GetMethod(methodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
|
if (method != null)
|
|
{
|
|
object[] customAttributes = method.GetCustomAttributes(true);
|
|
if (customAttributes != null)
|
|
{
|
|
for (int i = 0; i < customAttributes.Length; i++)
|
|
{
|
|
if (customAttributes[i].GetType() == typeof(GUITargetAttribute))
|
|
{
|
|
GUITargetAttribute guitargetAttribute = customAttributes[i] as GUITargetAttribute;
|
|
return guitargetAttribute.displayMask;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
// Token: 0x040007DB RID: 2011
|
|
internal int displayMask;
|
|
}
|
|
}
|