Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::BehaviorProperty Class Reference

#include <BehaviorContext.h>

Inherits AZ::OnDemandReflectionOwner.

Public Member Functions

 AZ_CLASS_ALLOCATOR (BehaviorProperty, AZ::SystemAllocator)
 
 BehaviorProperty (BehaviorContext *context)
 
template<class Getter , class Setter >
bool Set (Getter getter, Setter setter, BehaviorClass *currentClass, BehaviorContext *context)
 
AZ::TypeId GetTypeId () const
 
- Public Member Functions inherited from AZ::OnDemandReflectionOwner
 OnDemandReflectionOwner (const OnDemandReflectionOwner &)=delete
 
OnDemandReflectionOwneroperator= (const OnDemandReflectionOwner &)=delete
 
 OnDemandReflectionOwner (OnDemandReflectionOwner &&)=delete
 
OnDemandReflectionOwneroperator= (OnDemandReflectionOwner &&)=delete
 
void AddReflectFunction (AZ::Uuid typeId, StaticReflectionFunctionPtr reflectFunction)
 Register an OnDemandReflection function.
 

Public Attributes

AZStd::string m_name
 
BehaviorMethodm_getter
 
BehaviorMethodm_setter
 
AttributeArray m_attributes
 

Additional Inherited Members

- Protected Member Functions inherited from AZ::OnDemandReflectionOwner
 OnDemandReflectionOwner (ReflectContext &context)
 Constructor to be called by child class.
 

Detailed Description

Property representation, a property has getter and setter. A read only property will have a "nullptr" for a setter. You can use lambdas, global of member function. If you want to just expose a variable (not write the function and handle changes) you can use BehaviorValueProperty macros (or BehaviorValueGetter/Setter to control read/write functionality) Member constants are a property too, use BehaviorConstant for it. Everything is either a property or a method, the main reason why we "push" people to use functions is that in most cases when we manipulate an object, you will need to do more than just set a value to a new value.


The documentation for this class was generated from the following file: