Boat Attack使用了Universal RP的许多新图形功能,可以用于探索 Universal RP 的使用方式和技巧。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

29 行
727 B

using System.Collections.Generic;
using UnityEngine.Events;
namespace UnityEngine.Rendering
{
public static class CommandBufferPool
{
static ObjectPool<CommandBuffer> s_BufferPool = new ObjectPool<CommandBuffer>(null, x => x.Clear());
public static CommandBuffer Get()
{
var cmd = s_BufferPool.Get();
cmd.name = "Unnamed Command Buffer";
return cmd;
}
public static CommandBuffer Get(string name)
{
var cmd = s_BufferPool.Get();
cmd.name = name;
return cmd;
}
public static void Release(CommandBuffer buffer)
{
s_BufferPool.Release(buffer);
}
}
}