49 lines
1.6 KiB
C#
49 lines
1.6 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Reflection;
|
|
using System.Security;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine
|
|
{
|
|
// Token: 0x020003D7 RID: 983
|
|
[RequiredByNativeCode]
|
|
internal class SetupCoroutine
|
|
{
|
|
// Token: 0x06003807 RID: 14343 RVA: 0x00060138 File Offset: 0x0005E338
|
|
[RequiredByNativeCode]
|
|
[SecuritySafeCritical]
|
|
public unsafe static void InvokeMoveNext(IEnumerator enumerator, IntPtr returnValueAddress)
|
|
{
|
|
if (returnValueAddress == IntPtr.Zero)
|
|
{
|
|
throw new ArgumentException("Return value address cannot be 0.", "returnValueAddress");
|
|
}
|
|
*(byte*)(void*)returnValueAddress = (enumerator.MoveNext() ? 1 : 0);
|
|
}
|
|
|
|
// Token: 0x06003808 RID: 14344 RVA: 0x00060168 File Offset: 0x0005E368
|
|
[RequiredByNativeCode]
|
|
public static object InvokeMember(object behaviour, string name, object variable)
|
|
{
|
|
object[] array = null;
|
|
if (variable != null)
|
|
{
|
|
array = new object[] { variable };
|
|
}
|
|
return behaviour.GetType().InvokeMember(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, behaviour, array, null, null, null);
|
|
}
|
|
|
|
// Token: 0x06003809 RID: 14345 RVA: 0x000601AC File Offset: 0x0005E3AC
|
|
public static object InvokeStatic(Type klass, string name, object variable)
|
|
{
|
|
object[] array = null;
|
|
if (variable != null)
|
|
{
|
|
array = new object[] { variable };
|
|
}
|
|
return klass.InvokeMember(name, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, array, null, null, null);
|
|
}
|
|
}
|
|
}
|