ScriptableObject:
可以用来存储序列化的数据,以后不用json或者text保存运行数据了,创建方式:
1:代码中创建
ScriptableObject.CreateInstance<MyScriptableObject >();
2:Editor目录按钮中创建
using UnityEngine;
[CreateAssetMenu(menuName="MySubMenue/Create MyScriptableObject ")]
public class MyScriptableObject : ScriptableObject
{
public int someVariable;
}
URP Renderer Feature:
urp管线中用来对物体增加额外渲染pass的方式,右键菜单创建资源目录urp栏目中有创建资源的选项,使用的话需要配置在 Edit->Graphics->scriptable render pipeline Settings中的 URPAsset 中的renderer list的ForwardRenderer(资源对象:ScriptableObject)中

本文介绍了Unity URP(Universal Render Pipeline)中ScriptableObject的使用,它允许在游戏中存储序列化的数据,替代传统的JSON或文本存储。同时,详细讲解了URPRendererFeature,这是一个在URP中为物体添加额外渲染pass的方法。创建ScriptableObject可以通过代码或Unity Editor菜单实现,而URPRendererFeature则通过右键菜单在URP资源目录下创建,并在设置中配置。了解这些概念有助于提升Unity游戏的渲染效率和自定义能力。

7555

被折叠的 条评论
为什么被折叠?



