Click or drag to resize

OptionalT Class

Useful for displaying optional values in the inspector.
Inheritance Hierarchy
SystemObject
  Gamelogic.ExtensionsOptional
    Gamelogic.ExtensionsOptionalT
      More...

Namespace:  Gamelogic.Extensions
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
[SerializableAttribute]
public class Optional<T> : Optional

Type Parameters

T
The type of the optional value.

The OptionalT type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyUseValue
Gets or sets whether to use the value of this instance.
Public propertyCode exampleValue
The value of this instance. It should only be used if UseValue is true. Otherwise, some other value should be used, or code that does not need it must be executed instead.
Top
Methods
Extension Methods
  NameDescription
Public Extension MethodThrowIfNull
Throws a NullReferenceException if the object is null.
(Defined by ObjectExtensions.)
Top
Remarks
For this class to be displayable in the inspector you cannot use it directly. You have to use one of the provided subclasses (or derive your own).
See Also
Inheritance Hierarchy