feat(scripting): add managed srp base api
This commit is contained in:
@@ -2,13 +2,19 @@ using XCEngine;
|
||||
|
||||
namespace Gameplay
|
||||
{
|
||||
public sealed class RenderPipelineApiProbeAsset : RenderPipelineAsset
|
||||
public sealed class LegacyRenderPipelineApiProbeAsset : RenderPipelineAsset
|
||||
{
|
||||
}
|
||||
|
||||
public sealed class RenderPipelineApiProbeAsset : ScriptableRenderPipelineAsset
|
||||
{
|
||||
}
|
||||
|
||||
public sealed class RenderPipelineApiProbe : MonoBehaviour
|
||||
{
|
||||
public bool InitialTypeWasNull;
|
||||
public bool InvalidSelectionRejected;
|
||||
public bool InvalidSelectionMentionsScriptableBase;
|
||||
public bool SelectionRoundTripSucceeded;
|
||||
public string SelectedPipelineTypeName = string.Empty;
|
||||
|
||||
@@ -16,6 +22,19 @@ namespace Gameplay
|
||||
{
|
||||
InitialTypeWasNull = GraphicsSettings.renderPipelineAssetType == null;
|
||||
|
||||
try
|
||||
{
|
||||
GraphicsSettings.renderPipelineAssetType =
|
||||
typeof(LegacyRenderPipelineApiProbeAsset);
|
||||
InvalidSelectionRejected = false;
|
||||
}
|
||||
catch (System.ArgumentException ex)
|
||||
{
|
||||
InvalidSelectionRejected = true;
|
||||
InvalidSelectionMentionsScriptableBase =
|
||||
ex.Message.Contains("ScriptableRenderPipelineAsset");
|
||||
}
|
||||
|
||||
GraphicsSettings.renderPipelineAssetType =
|
||||
typeof(RenderPipelineApiProbeAsset);
|
||||
System.Type selectedType = GraphicsSettings.renderPipelineAssetType;
|
||||
|
||||
Reference in New Issue
Block a user