Photon Fusion 1.1.2

Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
BehaviourActionAttribute Class Reference

Attribute for use on Fusion.Behaviour classes. Automatically runs this method when the inspector refreshes. GUILayout calls be in the method and will render into the inspector. Allows for editor code to be added to a component, without requiring a custom Editor script. More...

Inherits Attribute.

Inherited by BehaviourButtonActionAttribute, BehaviourToggleAttribute, and BehaviourWarnAttribute.

Public Types

enum class  ActionFlags
 Conditions flags for when this action should run. More...
 

Public Member Functions

 BehaviourActionAttribute (string conditionMember=null, ActionFlags flags=ActionFlags.ShowAtNotRuntime|ActionFlags.ShowAtRuntime)
 Define a BehaviourAction, with the action being the method this attribute is attached to. More...
 

Public Attributes

ActionFlags ConditionFlags
 Specific flags for when this element should be displayed. More...
 
string ExecuteMethod
 
string ConditionMember
 

Protected Member Functions

 BehaviourActionAttribute (string executeMethod=null, string conditionMember=null, ActionFlags flags=ActionFlags.ShowAtNotRuntime|ActionFlags.ShowAtRuntime)
 Define a BehaviourAction. More...
 

Detailed Description

Attribute for use on Fusion.Behaviour classes. Automatically runs this method when the inspector refreshes. GUILayout calls be in the method and will render into the inspector. Allows for editor code to be added to a component, without requiring a custom Editor script.

Member Enumeration Documentation

◆ ActionFlags

enum ActionFlags
strong

Conditions flags for when this action should run.

Enumerator
ShowAtRuntime 

Run this action when playing.

ShowAtNotRuntime 

Run this action when not playing.

AlwaysShow 

Always run this action, regardless of play mode.

DirtyAfterButton 

Tells the editor to dirty the class instance after executing a button action.

Constructor & Destructor Documentation

◆ BehaviourActionAttribute() [1/2]

BehaviourActionAttribute ( string  executeMethod = null,
string  conditionMember = null,
ActionFlags  flags = ActionFlags.ShowAtNotRuntime | ActionFlags.ShowAtRuntime 
)
protected

Define a BehaviourAction.

Parameters
executeMethodThe name of the method to execute. If excluded, this will be the method this attribute is on.
conditionMemberThe name of the member (in the same class) to evaluate, to determine if the action should be performed. Typically null, as the action method can have its own logic.
flagsSpecific conditions for when the action should occur.

◆ BehaviourActionAttribute() [2/2]

Define a BehaviourAction, with the action being the method this attribute is attached to.

Parameters
conditionMemberThe name of the member (in the same class) to evaluate, to determine if the action should be performed. Typically null, as the action method can have its own logic.
flagsSpecific conditions for when the action should occur.

Member Data Documentation

◆ ConditionFlags

ActionFlags ConditionFlags

Specific flags for when this element should be displayed.