When the engine starts, the angelscript plugin automatically goes through all of unreal's reflection data.
Relevant types, properties and functions from C++ are automatically given bindings into Angelscript so they can be used from your scripts.
The general principle of automatic bindings is:
If it can be used from Blueprint, it should be usable from Angelscript.
Classes in C++ that are marked with
UCLASS() are automatically bound either when they have the
BlueprintType specifier, or if they contain any functions with
Classes can be skipped for automatic bindings by adding the
Structs in C++ that are marked with
USTRUCT() are automatically bound either when they have the
BlueprintType specifier, or if they contain any properties that are blueprint-accessible or editable.
Structs can be skipped for automatic bindings by adding the
UPROPERTYs that are declared with
BlueprintReadOnly are automatically bound to script.
If the property is
BlueprintReadOnly, it will become
const and unable to be changed from script.
To expose a property to Angelscript without exposing it to blueprint, you can use the
Properties that are declared with any of the editable flags (
EditDefaultsOnly) are also exposed to script.
Note: If a property has an editable flag, but not a blueprint access flag, it will only be accessible in script from inside a class
defaultstatement. See Default Statements.
Properties can be skipped for angelscript binds even if they are otherwise accessible to blueprint by adding the
UFUNCTION that has
BlueprintPure is automatically bound to script.
To expose a function to Angelscript without exposing it to blueprint, you can use the
UFUNCTIONs with the
BlueprintNativeEvent specifiers can be overridden from script as well as blueprint.
See Overriding BlueprintEvents from C++
Functions can be skipped for angelscript binds even if they are otherwise accessible to blueprint by adding the
Functions marked as deprecated are not bound to script at all.
There is no deprecation warning functionality in script, so engine upgrades may necessitate script changes when Epic deprecates certain APIs.
Static functions declared on
UCLASSes are bound as namespaced global functions in script.
Note that for static functions only, the name of the class will go through Namespace Simplification when they are bound.
UENUM() declared in C++ is automatically usable in script.