Version: 2020.2

SystemInfo.usesLoadStoreActions

切换到手册
public static bool usesLoadStoreActions ;

描述

如果图形 API 考虑 RenderBufferLoadActionRenderBufferStoreAction,则返回 true,否则返回 false。

使用此属性可检查 RenderBufferLoadAction.DontCareRenderBufferStoreAction.DontCare 是否可能会导致实际丢弃 RT 内容。例如,如果使用非全屏 ViewPort 进行渲染,则不希望丢弃 RT 内容。请注意,某些 Unity API 可以使用 RenderBufferLoadAction.Clear 清除 RenderTexture,即使 Graphics API 不直接支持 RenderBufferLoadAction.Clear。在这种情况下,Unity 会发出正常清除调用。