> For the complete documentation index, see [llms.txt](https://graygzou.gitbook.io/how-to/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://graygzou.gitbook.io/how-to/engines/unreal/unreal_get_started.md).

# Unreal How To

## Useful links

* [Blueprint Editor Cheat Sheet](https://docs.unrealengine.com/en-us/Engine/Blueprints/UserGuide/CheatSheet)

## Macros

|       Names      |                       Definition                       | Example                                           | Arguments                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| :--------------: | :----------------------------------------------------: | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|      `TEXT`      |                                                        |                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `GENERATED_BODY` |                     engine linking.                    |                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|    `UPROPERTY`   |     Used above a property (int, float, string, ...)    | \`UPROPERTY(EditAnywhere)\`\`int32 TotalDamage;\` | <p>*EditAnywhere*: Allow to expose a property to the editor.</p><p>*Category:* Create a section to regroup properties together</p><p>*BlueprintReadWrite:* Expose the property to Blueprints with write access.</p><p>*BlueprintOnly:* Expose the property to Blueprints without write access (`const`).</p><p>[More here](https://docs.unrealengine.com/en-US/Programming/UnrealArchitecture/Reference/Properties/Specifiers)</p>                                                                    |
|   `FORCEINLINE`  |                                                        |                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|     `UCLASS`     | The class is knew to the garbage collector / reflexion |                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|    `UFUNCTION`   |                  Used above a function                 |                                                   | <p>`BlueprintPure` : Allow to call the function in blueprints. Shouln't modify something. Fast call that would frequently change.</p><p>`BlueprintCallable` : Allow to call the function in blueprints. Expensive calculation that wouldn't change often.</p><p>`BlueprintNativeEvents` : Allow to specify a C++ behavior that can be used or override directly in blueprint.</p><p>`BlueprintImplementableEvent` : Don't have to specify a C++ implementation. Only specify a blueprint version.</p> |

### 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 :

* [Introduction C++ Unreal](https://docs.unrealengine.com/en-us/Programming/Introduction)
* [Unreal main documentation](http://api.unrealengine.com/latest/INT/)
* [UnrealVS installation](https://docs.unrealengine.com/en-US/Programming/Development/VisualStudioSetup/UnrealVS)
* [Unreal setup in VS](https://docs.unrealengine.com/en-us/Programming/Development/VisualStudioSetup)
* [Intellisense refresh](https://answers.unrealengine.com/questions/559309/intellisense-stopped-working.html)
