2026-04-15 01:57:14 +08:00
|
|
|
using XCEngine;
|
|
|
|
|
|
|
|
|
|
namespace Gameplay
|
|
|
|
|
{
|
2026-04-15 20:14:48 +08:00
|
|
|
public sealed class LegacyRenderPipelineApiProbeAsset : RenderPipelineAsset
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class RenderPipelineApiProbeAsset : ScriptableRenderPipelineAsset
|
2026-04-15 01:57:14 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class RenderPipelineApiProbe : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public bool InitialTypeWasNull;
|
2026-04-15 20:14:48 +08:00
|
|
|
public bool InvalidSelectionRejected;
|
|
|
|
|
public bool InvalidSelectionMentionsScriptableBase;
|
2026-04-15 01:57:14 +08:00
|
|
|
public bool SelectionRoundTripSucceeded;
|
|
|
|
|
public string SelectedPipelineTypeName = string.Empty;
|
|
|
|
|
|
|
|
|
|
public void Start()
|
|
|
|
|
{
|
|
|
|
|
InitialTypeWasNull = GraphicsSettings.renderPipelineAssetType == null;
|
|
|
|
|
|
2026-04-15 20:14:48 +08:00
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
GraphicsSettings.renderPipelineAssetType =
|
|
|
|
|
typeof(LegacyRenderPipelineApiProbeAsset);
|
|
|
|
|
InvalidSelectionRejected = false;
|
|
|
|
|
}
|
|
|
|
|
catch (System.ArgumentException ex)
|
|
|
|
|
{
|
|
|
|
|
InvalidSelectionRejected = true;
|
|
|
|
|
InvalidSelectionMentionsScriptableBase =
|
|
|
|
|
ex.Message.Contains("ScriptableRenderPipelineAsset");
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-15 01:57:14 +08:00
|
|
|
GraphicsSettings.renderPipelineAssetType =
|
|
|
|
|
typeof(RenderPipelineApiProbeAsset);
|
|
|
|
|
System.Type selectedType = GraphicsSettings.renderPipelineAssetType;
|
|
|
|
|
SelectionRoundTripSucceeded =
|
|
|
|
|
selectedType == typeof(RenderPipelineApiProbeAsset);
|
|
|
|
|
SelectedPipelineTypeName = selectedType != null
|
|
|
|
|
? selectedType.FullName ?? string.Empty
|
|
|
|
|
: string.Empty;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|