Show / Hide Table of Contents

Class Option<TValue>

Option subclass that defines the type of the Option value.

Inheritance
System.Object
Option
Option<TValue>
OptionAsset<TUnity>
OptionEnum<TEnum>
OptionFloat
OptionInt
OptionString
OptionToggle
Inherited Members
Option.Configure()
Option.DEFINE_PREFIX
Option.OPTION_PREFIX
Option.changed
Option.Capabilities
Option.SupportedTargets
Option.IsAvailable(IEnumerable<BuildTarget>)
Option.ShouldIncludeOnlyFeature()
Option.PostprocessScene(Scene, OptionInclusion)
Option.PostprocessOrder
Option.PrepareBuild(BuildPlayerOptions, OptionInclusion)
Option.PreprocessBuild(BuildTarget, String, OptionInclusion)
Option.PostprocessBuild(BuildTarget, String, OptionInclusion)
Option.GetScriptingDefineSymbols(OptionInclusion, HashSet<String>)
Option.EditGUI()
Option.Name
Option.Parent
Option.Path
Option.GetPathRecursive(Option)
Option.InvalidatePathRecursive()
Option.Load(String)
Option.Save()
Option.ApplyOrder
Option.Apply()
Option.ApplyFromRoot()
Option.Variance
Option.VariantParameter
Option.VariantDefaultParameter
Option.IsDefaultVariant
Option.Variants
Option.AddVariant(String)
Option.GetVariant(String, Boolean)
Option.RemoveVariant(Option)
Option.ClearVariants()
Option.RenumberArrayVariants()
Option.HasChildren
Option.Children
Option.CreateChildren()
Option.GetChild(String)
Option.GetChild<TOption>()
Option.Category
Namespace: sttz.Trimmer
Assembly: Trimmer.dll
Syntax
public abstract class Option<TValue> : Option
Type Parameters
Name Description
TValue
Remarks

This subclass is mostly an informal standard, adopted by all subclasses in sttz.Trimmer.BaseOptions but not actually used in the rest of Trimmer's code.

Properties

| Improve this Doc View Source

DefaultValue

The default value, used when input is empty or invalid.

Declaration
public TValue DefaultValue { get; protected set; }
Property Value
Type Description
TValue
| Improve this Doc View Source

Value

The typed value of the Option.

Declaration
public TValue Value { get; set; }
Property Value
Type Description
TValue

Methods

| Improve this Doc View Source

Parse(String)

Parse a string value to the Option Value's type.

Declaration
public abstract TValue Parse(string input)
Parameters
Type Name Description
System.String input
Returns
Type Description
TValue
Remarks

If the input is empty or parsing fails, DefaultValue should be returned.

| Improve this Doc View Source

Save(TValue)

Serialize a typed value to a string.

Declaration
public abstract string Save(TValue input)
Parameters
Type Name Description
TValue input
Returns
Type Description
System.String
Remarks

The string returned by Save can later be fed back to Parse(String) and should survive the round-trip without loss.

  • Improve this Doc
  • View Source
Back to top © 2017 Adrian Stutz