您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

29 行
669 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Experimental.ScriptableRenderLoop;
using UnityEngine.Experimental.Rendering;
[ExecuteInEditMode]
public class RenderLoopWrapper : MonoBehaviour
{
public delegate void Callback(RenderLoopWrapper wrapper, Camera[] cameras, RenderLoop renderLoop);
public Callback callback;
void OnEnable()
{
RenderLoop.renderLoopDelegate += Render;
}
void OnDisable()
{
RenderLoop.renderLoopDelegate -= Render;
}
bool Render(Camera[] cameras, RenderLoop loop)
{
callback(this, cameras, loop);
return true;
}
}