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()

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.