Class DebugDisplaySerializer
Helper class that serializes Rendering Debugger state across domain reloads. If you want the state of your debug variables to persist across domain reloads, the setting class should be marked [Serializable] and implement the ISerializedDebugDisplaySettings interface. Then you can access the serialized instance through GetOrCreate<T>().
Inheritance
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public sealed class DebugDisplaySerializer : ScriptableSingleton<DebugDisplaySerializer>
Methods
Clear()
Remove all instances of serialized debug display settings that have been created.
Declaration
public static void Clear()
GetOrCreate<T>()
Returns the serialized instance for the given debug display settings type. If the instance does not exist yet, it will be created. The next time this method is called with the same type, the same instance will be returned.
Declaration
public static T GetOrCreate<T>() where T : class, ISerializedDebugDisplaySettings
Returns
| Type | Description |
|---|---|
| T | The serialized instance for the given debug display settings type. |
Type Parameters
| Name | Description |
|---|---|
| T | The debug display settings type to retrieve. |
Get<T>()
Returns the serialized instance for the given debug display settings type. If the instance does not exist, null is returned.
Declaration
public static T Get<T>() where T : class, ISerializedDebugDisplaySettings
Returns
| Type | Description |
|---|---|
| T | The serialized instance for the given debug display settings type if it exists, or null otherwise. |
Type Parameters
| Name | Description |
|---|---|
| T | The debug display settings type to retrieve. |
LoadFoldoutStates()
Restore foldout open/closed states from serialized data.
Declaration
public static void LoadFoldoutStates()
SaveFoldoutStates()
Save foldout open/closed states to serialized data.
Declaration
public static void SaveFoldoutStates()