Files
2023-09-06 22:19:13 +02:00

79 lines
2.2 KiB
C#

using System;
using System.Reflection;
using Cpp2IlInjected;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
// Token: 0x02000227 RID: 551
[Token(Token = "0x2000227")]
[ExecuteInEditMode]
public class CustomURP : RenderPipeline
{
// Token: 0x0600159F RID: 5535 RVA: 0x00030F1C File Offset: 0x0002F11C
[Token(Token = "0x600159F")]
[Address(RVA = "0x12F34F0", Offset = "0x12F24F0", VA = "0x1812F34F0", Slot = "4")]
protected override void Render(ScriptableRenderContext context, Camera[] cameras)
{
if (this.pipeline == (ulong)0L)
{
UniversalRenderPipeline universalRenderPipeline = new UniversalRenderPipeline(CustomURPAsset.Instance);
this.pipeline = universalRenderPipeline;
MethodInfo method4 = this.pipeline.GetType().GetMethod("Render", (BindingFlags)((uint)292));
MethodInfo method = method4;
MethodInfo method2 = method;
int num = 0;
if (method2 != num)
{
Action<ScriptableRenderContext, Camera[]> action = delegate(ScriptableRenderContext src, Camera[] cams)
{
MethodInfo method3;
UniversalRenderPipeline universalRenderPipeline2;
object[] array;
for (;;)
{
CustomURP <>4__this = this;
method3 = method;
universalRenderPipeline2 = <>4__this.pipeline;
array = new object[2];
if (array == 0 || array != 0)
{
array[0] = array;
if (cams == 0 || array != 0)
{
break;
}
}
}
array[1] = cams;
object obj = method3.Invoke(universalRenderPipeline2, array);
};
this.render = action;
}
}
Action<ScriptableRenderContext, Camera[]> action2 = this.render;
if (action2 != 0)
{
action2(context, cameras);
GraphicsSettings.lightsUseLinearIntensity = true;
}
}
// Token: 0x060015A0 RID: 5536 RVA: 0x00030FC4 File Offset: 0x0002F1C4
[Token(Token = "0x60015A0")]
[Address(RVA = "0x499590", Offset = "0x498590", VA = "0x180499590")]
public CustomURP()
{
}
// Token: 0x040020CB RID: 8395
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40020CB")]
private UniversalRenderPipeline pipeline;
// Token: 0x040020CC RID: 8396
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40020CC")]
private Action<ScriptableRenderContext, Camera[]> render;
}