实现此接口的类存储在 RenderPipelineGlobalSettings 中。使用它们来存储项目的默认数据。
using System; using System.ComponentModel; using UnityEngine; using UnityEngine.Rendering;
[ Serializable, // required Categorization.CategoryInfo("Dummy",1), Categorization.ElementInfo("A",10), // optional: sort out in the Graphics tab SupportedOnRenderPipeline // optional: which SRP support it ] public class DummyA : IRenderPipelineGraphicsSettings { enum Version { Initial,
Count, Last = Count - 1 } [SerializeField] Version m_Version = Version.Last; int IRenderPipelineGraphicsSettings.version => (int)m_Version; bool IRenderPipelineGraphicsSettings.isAvailableInPlayerBuild => false;
// data project wise public int myInt = 33; }
isAvailableInPlayerBuild | 如果该设置可以在 Player Build 中使用。 |
version | 此设置的当前版本。 |
Reset | 执行自定义重置逻辑的可选方法。 |