Photon Fusion 1.1.12

Public Member Functions | List of all members
BehaviourWarnAttribute Class Reference

Attribute for use on Fusion.Behaviour classes. Automatically draws a warning box in the inspector if the conditions are met. More...

Inherits BehaviourActionAttribute.

Public Member Functions

 BehaviourWarnAttribute (string warnText, string conditionMember)
 Define a ButtonBehaviourAction. More...
 
- Public Member Functions inherited from BehaviourActionAttribute
 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...
 

Additional Inherited Members

- Public Types inherited from BehaviourActionAttribute
enum class  ActionFlags
 Conditions flags for when this action should run. More...
 
- Public Attributes inherited from BehaviourActionAttribute
ActionFlags ConditionFlags
 Specific flags for when this element should be displayed. More...
 
string ConditionMember
 
string ExecuteMethod
 
- Protected Member Functions inherited from BehaviourActionAttribute
 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 draws a warning box in the inspector if the conditions are met.

Constructor & Destructor Documentation

◆ BehaviourWarnAttribute()

BehaviourWarnAttribute ( string  warnText,
string  conditionMember 
)

Define a ButtonBehaviourAction.

Parameters
warnTextThe text that will be shown in the warning box.
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. This member can be a property, field or method. The return value of any of these is converted into a double. True = 1, False = 0. Null = 0.