Class TextModeCRTCameraSetup
Finds out whether the CRT camera effect can show a camera, and sets it up, through the provider that the active render pipeline's TextMode CRT package registers.
Inherited Members
Namespace: Scylla.TextMode.Editor
Assembly: ScyllaTextMode.Editor.dll
Syntax
public static class TextModeCRTCameraSetup
Remarks
GetStatus(Camera, out string) tells the cases apart that an editor tool has to explain differently: the effect is ready, the pipeline needs a change that Fix(Camera, out string) makes, the package for the active pipeline is missing, or the pipeline has no camera effect at all. ActiveProvider adds the CRT to a scene.
Fields
HDRP_PACKAGE
Package name of the TextMode CRT camera effect for HDRP.
Declaration
public const string HDRP_PACKAGE = "com.scylla.textmode.hdrp"
Field Value
| Type | Description |
|---|---|
| string |
URP_PACKAGE
Package name of the TextMode CRT camera effect for URP.
Declaration
public const string URP_PACKAGE = "com.scylla.textmode.urp"
Field Value
| Type | Description |
|---|---|
| string |
Properties
ActiveProvider
Gets the provider for the active render pipeline, or null when no installed package provides the CRT camera effect for it.
Declaration
public static ITextModeCRTCameraSetupProvider ActiveProvider { get; }
Property Value
| Type | Description |
|---|---|
| ITextModeCRTCameraSetupProvider |
Methods
Fix(Camera, out string)
Makes the changes the active render pipeline needs before the CRT camera effect can show a camera.
Declaration
public static bool Fix(Camera camera, out string error)
Parameters
| Type | Name | Description |
|---|---|---|
| Camera | camera | The camera the effect is meant for. |
| string | error | What went wrong, or null on success. |
Returns
| Type | Description |
|---|---|
| bool | True if the pipeline is set up. |
GetStatus(Camera, out string)
Reports whether the CRT camera effect can show a camera, and if not, why.
Declaration
public static TextModeCRTCameraStatus GetStatus(Camera camera, out string message)
Parameters
| Type | Name | Description |
|---|---|---|
| Camera | camera | The camera to check. |
| string | message | A sentence for the user explaining the status. |
Returns
| Type | Description |
|---|---|
| TextModeCRTCameraStatus | The status. |
Register(ITextModeCRTCameraSetupProvider)
Registers a pipeline package's provider. Registering the same provider twice has no effect.
Declaration
public static void Register(ITextModeCRTCameraSetupProvider provider)
Parameters
| Type | Name | Description |
|---|---|---|
| ITextModeCRTCameraSetupProvider | provider | The provider. Null is ignored. |
Unregister(ITextModeCRTCameraSetupProvider)
Removes a provider registered with Register(ITextModeCRTCameraSetupProvider).
Declaration
public static void Unregister(ITextModeCRTCameraSetupProvider provider)
Parameters
| Type | Name | Description |
|---|---|---|
| ITextModeCRTCameraSetupProvider | provider | The provider to remove. |