Show / Hide Table of Contents

Class OptionEnum<TEnum>

Option base class with an enumeration as value.

Inheritance
System.Object
Option
Option<TEnum>
OptionEnum<TEnum>
OptionBuildSettings
OptionPrompt.OptionPromptPosition
Inherited Members
Option<TEnum>.Value
Option<TEnum>.DefaultValue
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.Name
Option.Parent
Option.Path
Option.GetPathRecursive(Option)
Option.InvalidatePathRecursive()
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.BaseOptions
Assembly: Trimmer.dll
Syntax
public abstract class OptionEnum<TEnum> : Option<TEnum>
Type Parameters
Name Description
TEnum
Remarks

If the given enum type has the Flags attribute applied, the Option automatically switches to Unity's flags/mask field. You can override this by setting IsMask in Configure().

Note that prior to Unity 2017.3 (and its EnumFlagsField method), Unity's handling of flags enum is severely limited and the enum's values must be increasing powers of two without gaps.

Properties

| Improve this Doc View Source

IsMask

Set wether the underlying enum is a flags enum and the value should be treated as a mask.

Declaration
public bool IsMask { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Set this property in the Option's Configure() method. If not set, the value defaults to true when the enumeration has the Flags attribute applied.

Methods

| Improve this Doc View Source

EditGUI()

Declaration
public override bool EditGUI()
Returns
Type Description
System.Boolean
Overrides
Option.EditGUI()
| Improve this Doc View Source

Load(String)

Declaration
public override void Load(string input)
Parameters
Type Name Description
System.String input
Overrides
Option.Load(String)
| Improve this Doc View Source

Parse(String)

Declaration
public override TEnum Parse(string input)
Parameters
Type Name Description
System.String input
Returns
Type Description
TEnum
Overrides
sttz.Trimmer.Option<TEnum>.Parse(System.String)
| Improve this Doc View Source

Save()

Declaration
public override string Save()
Returns
Type Description
System.String
Overrides
Option.Save()
| Improve this Doc View Source

Save(TEnum)

Declaration
public override string Save(TEnum input)
Parameters
Type Name Description
TEnum input
Returns
Type Description
System.String
Overrides
sttz.Trimmer.Option<TEnum>.Save(TEnum)
  • Improve this Doc
  • View Source
Back to top © 2017 Adrian Stutz