feat(rendering): select managed SRP through asset instances
This commit is contained in:
@@ -4,31 +4,10 @@ namespace XCEngine
|
||||
{
|
||||
public static class GraphicsSettings
|
||||
{
|
||||
public static Type renderPipelineAssetType
|
||||
public static ScriptableRenderPipelineAsset renderPipelineAsset
|
||||
{
|
||||
get
|
||||
{
|
||||
string assemblyQualifiedName =
|
||||
InternalCalls.Rendering_GetRenderPipelineAssetTypeName();
|
||||
if (string.IsNullOrEmpty(assemblyQualifiedName))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Type.GetType(assemblyQualifiedName, throwOnError: false);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null &&
|
||||
!typeof(ScriptableRenderPipelineAsset).IsAssignableFrom(value))
|
||||
{
|
||||
throw new ArgumentException(
|
||||
"GraphicsSettings.renderPipelineAssetType must derive from ScriptableRenderPipelineAsset.",
|
||||
nameof(value));
|
||||
}
|
||||
|
||||
InternalCalls.Rendering_SetRenderPipelineAssetType(value);
|
||||
}
|
||||
get => InternalCalls.Rendering_GetRenderPipelineAsset();
|
||||
set => InternalCalls.Rendering_SetRenderPipelineAsset(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user