Unreal How To

Macros

Names

Definition

Example

Arguments

TEXT

GENERATED_BODY

engine linking.

UPROPERTY

Used above a property (int, float, string, ...)

`UPROPERTY(EditAnywhere)``int32 TotalDamage;`

*EditAnywhere*: Allow to expose a property to the editor.

*Category:* Create a section to regroup properties together

*BlueprintReadWrite:* Expose the property to Blueprints with write access.

*BlueprintOnly:* Expose the property to Blueprints without write access (`const`).

[More here](https://docs.unrealengine.com/en-US/Programming/UnrealArchitecture/Reference/Properties/Specifiers)

FORCEINLINE

UCLASS

The class is knew to the garbage collector / reflexion

UFUNCTION

Used above a function

`BlueprintPure` : Allow to call the function in blueprints. Shouln't modify something. Fast call that would frequently change.

`BlueprintCallable` : Allow to call the function in blueprints. Expensive calculation that wouldn't change often.

`BlueprintNativeEvents` : Allow to specify a C++ behavior that can be used or override directly in blueprint.

`BlueprintImplementableEvent` : Don't have to specify a C++ implementation. Only specify a blueprint version.

Functions

  • PostInitProperties()

  • PostEditChangeProperty()

Commun Errors

  • fatal error C1853 : Delete the build folder (Intermediate > Build).

  • Do not put anymore "#include" under the "#include xxxx.generated.h" in the header file.

In blueprint mode

  • Events: Red border on top.

  • Functions: Blue with f.

Tips

  • Refresh Intellisense: Build solution >> Close VS >> In the editor File -> Refresh VS Project >> File->Open VS >> Wait 5-10 secs.

  • Level blueprint (Select it in the scene + Right Click in blueprint): Add nodes concerning a specific objet : Select it in the scene + Right Click in blueprint.

  • Class blueprint (Select it in the class blueprint + Right Click): Add nodes about a specific componants.

  • Event tick are executed every frame.

Acknowledgements

Based on the following links :

Last updated

Was this helpful?