📖
FlowReactor
  • 👋Welcome
  • Installation
  • Interface
    • Graph Library
    • Graph Explorer
  • FlowReactorComponent
  • Settings
  • Addons / Packages
  • Guides
    • Introduction
    • Create custom node
    • Variables & Blackboards
      • Type conversions
    • Using the EventSystem
      • Sequencing Events
  • In-depth
    • Node Attributes
    • Long running nodes
    • Node Modules
      • FRNodeControllable
      • FRNodeEventDispatcher
      • Custom node utility modules
    • Assembly Defintion
  • API
    • Nodes
    • Blackboard
    • Eventboard
    • FlowReactorComponent
    • FRVariables
      • FREnum
      • FRAttributes
    • INodeControllable
Powered by GitBook
On this page
  1. API
  2. FRVariables

FREnum

FlowReactor comes with a generic enum type which can be used for your custom nodes and Blackboard variables.

Example

// Define your enum like this:
public enum MyEnum
{
  A,
  B,
  C
}
 
// To make sure we can select the enum from the Blackboard we need to add the FRVariableAttribute.
// Create a custom class and inherit from FREnum and set your custom enum as type
[FRVariableAttribute(Name = "MyEnum")]
public class MyCustomEnum : FREnum<myenum>{}</myenum>
 
// Now we can create our new enum variable field like this.
// Important: You have to create a new instance of your enum by using "new"
public MyCustomEnum testEnum = new MyCustomEnum();
PreviousFRVariablesNextFRAttributes

Last updated 2 years ago