Interface ITextModeCRTCameraSetupProvider
Sets up the CRT camera effect of one render pipeline in the editor: checks a camera, fixes what the pipeline needs before the effect can run, and adds the CRT to a scene.
Namespace: Scylla.TextMode.Editor
Assembly: ScyllaTextMode.Editor.dll
Syntax
public interface ITextModeCRTCameraSetupProvider
Remarks
The TextMode editor code cannot reference a render pipeline, so each pipeline package registers its own provider with Register(ITextModeCRTCameraSetupProvider) when the editor loads. The URP package and the HDRP package each ship one.
Properties
IsPipelineActive
Gets whether the provider's render pipeline is the active one.
Declaration
bool IsPipelineActive { get; }
Property Value
| Type | Description |
|---|---|
| bool |
PipelineName
Gets the short name of the render pipeline, such as URP.
Declaration
string PipelineName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
CheckCamera(Camera, out string)
Checks whether the CRT camera effect can show a camera.
Declaration
bool CheckCamera(Camera camera, out string problem)
Parameters
| Type | Name | Description |
|---|---|---|
| Camera | camera | The camera to check. |
| string | problem | What has to change before the effect can show the camera, or null when it can. |
Returns
| Type | Description |
|---|---|
| bool | True if the effect can show the camera. |
CreateVolume(string, string, TextModeCRTPreset, CRTQualityTier, bool, int)
Adds a global Volume with the CRT to the open scene, with its profile saved as an asset.
Declaration
GameObject CreateVolume(string volumeName, string profileFolder, TextModeCRTPreset preset, CRTQualityTier qualityTier, bool readabilityClamp, int sourceLines)
Parameters
| Type | Name | Description |
|---|---|---|
| string | volumeName | Name of the Volume's GameObject, also used for the profile asset. |
| string | profileFolder | Project folder for the profile asset, starting with |
| TextModeCRTPreset | preset | The preset the CRT shows, or null for the project's default preset. |
| CRTQualityTier | qualityTier | The quality tier. |
| bool | readabilityClamp | Whether the readability clamp is on. |
| int | sourceLines | Number of scanlines the picture is shown with, or 0 to follow the screen. |
Returns
| Type | Description |
|---|---|
| GameObject | The Volume's GameObject. Its creation is registered with Undo. |
FixCamera(Camera, out string)
Makes the changes the render pipeline needs before the effect can run, such as adding the CRT to the pipeline's renderers or settings, and saves them.
Declaration
bool FixCamera(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 changes were made or were already in place. |