Version 2.1.0.0

LocalPersistentContext<T> class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
public sealed class LocalPersistentContext<T>
Helper class that provides a local copy of a GlobalPersistentContext<T>. When the local value is changed, it also changed the global value, but the global value does not change the local value.
Inheritance
  • System.Object
  • LocalPersistentContext<T>

Type Parameters

T

The type of the context value.

Properties

Value
The value of the context. Changing this value, also changes the global context value, but the global value does not change the local value.
public T Value { get; set; }

Methods

Create(GlobalPersistentContext<T>)
Creates a local context object for the provided global context.
public static LocalPersistentContext<T> Create(GlobalPersistentContext<T> global)
Parameters
GlobalPersistentContext<T> global

The global context object.

UpdateLocalValue()
Updates the local value to the current global value.
public void UpdateLocalValue()