Add managed render pipeline selection bridge
This commit is contained in:
29
managed/GameScripts/RenderPipelineApiProbe.cs
Normal file
29
managed/GameScripts/RenderPipelineApiProbe.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using XCEngine;
|
||||
|
||||
namespace Gameplay
|
||||
{
|
||||
public sealed class RenderPipelineApiProbeAsset : RenderPipelineAsset
|
||||
{
|
||||
}
|
||||
|
||||
public sealed class RenderPipelineApiProbe : MonoBehaviour
|
||||
{
|
||||
public bool InitialTypeWasNull;
|
||||
public bool SelectionRoundTripSucceeded;
|
||||
public string SelectedPipelineTypeName = string.Empty;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
InitialTypeWasNull = GraphicsSettings.renderPipelineAssetType == null;
|
||||
|
||||
GraphicsSettings.renderPipelineAssetType =
|
||||
typeof(RenderPipelineApiProbeAsset);
|
||||
System.Type selectedType = GraphicsSettings.renderPipelineAssetType;
|
||||
SelectionRoundTripSucceeded =
|
||||
selectedType == typeof(RenderPipelineApiProbeAsset);
|
||||
SelectedPipelineTypeName = selectedType != null
|
||||
? selectedType.FullName ?? string.Empty
|
||||
: string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user