Files
Dec2017-Script-Dump/UnityEngine/LayerMask.cs
T
2026-06-04 11:42:34 +02:00

73 lines
1.6 KiB
C#

using System;
using System.Runtime.CompilerServices;
using UnityEngine.Scripting;
namespace UnityEngine
{
// Token: 0x02000077 RID: 119
[UsedByNativeCode]
public struct LayerMask
{
// Token: 0x06000885 RID: 2181 RVA: 0x0000AE80 File Offset: 0x00009080
public static implicit operator int(LayerMask mask)
{
return mask.m_Mask;
}
// Token: 0x06000886 RID: 2182 RVA: 0x0000AE9C File Offset: 0x0000909C
public static implicit operator LayerMask(int intVal)
{
LayerMask layerMask;
layerMask.m_Mask = intVal;
return layerMask;
}
// Token: 0x17000200 RID: 512
// (get) Token: 0x06000887 RID: 2183 RVA: 0x0000AEBC File Offset: 0x000090BC
// (set) Token: 0x06000888 RID: 2184 RVA: 0x0000AED8 File Offset: 0x000090D8
public int value
{
get
{
return this.m_Mask;
}
set
{
this.m_Mask = value;
}
}
// Token: 0x06000889 RID: 2185
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern string LayerToName(int layer);
// Token: 0x0600088A RID: 2186
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern int NameToLayer(string layerName);
// Token: 0x0600088B RID: 2187 RVA: 0x0000AEE4 File Offset: 0x000090E4
public static int GetMask(params string[] layerNames)
{
if (layerNames == null)
{
throw new ArgumentNullException("layerNames");
}
int num = 0;
foreach (string text in layerNames)
{
int num2 = LayerMask.NameToLayer(text);
if (num2 != -1)
{
num |= 1 << num2;
}
}
return num;
}
// Token: 0x040000BA RID: 186
private int m_Mask;
}
}