Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:toolworks:docs:apparatus:mechanical [2021/06/08 15:21] – [C++ Workflow] vladius | en:toolworks:docs:apparatus:mechanical [2021/06/18 22:23] (current) – vladius | ||
---|---|---|---|
Line 12: | Line 12: | ||
- Click " | - Click " | ||
- The new class gets created as a combo of its header (.h) and a source file (.cpp). All in the Source (sub)folder of your project. You should now see them in the IDE of your choice:{{ : | - The new class gets created as a combo of its header (.h) and a source file (.cpp). All in the Source (sub)folder of your project. You should now see them in the IDE of your choice:{{ : | ||
- | - Note that you may have to recompile the project and/or restart the Editor after that. Don't be scared by some possible errors here, regenerate the IDE project, rebuild and start again. | + | - Note that you may have to recompile the project and/or restart the Editor after that. Don't be scared by some possible errors here, regenerate the IDE project, rebuild and start again.{{ : |
- | - | + | - The corresponding file contents should be as: |
+ | * '' | ||
+ | // Fill out your copyright notice in the Description page of Project Settings. | ||
+ | |||
+ | #pragma once | ||
+ | |||
+ | #include " | ||
+ | #include " | ||
+ | #include " | ||
+ | |||
+ | /** | ||
+ | * | ||
+ | */ | ||
+ | UCLASS() | ||
+ | class MY_API AMyMechanicalActor : public AMechanicalActor | ||
+ | { | ||
+ | GENERATED_BODY() | ||
+ | |||
+ | }; | ||
+ | </ | ||
+ | * '' | ||
+ | // Fill out your copyright notice in the Description page of Project Settings. | ||
+ | |||
+ | |||
+ | #include " | ||
+ | </ | ||
+ | - Now you can override a single (or multiple) Tick method(s) as you usually would do in C++... | ||
+ | * ... in the header:< | ||
+ | void Tick(float DeltaTime) override; | ||
+ | </ | ||
+ | * ... and the source file:< | ||
+ | void AMyMechanicalActor:: | ||
+ | { | ||
+ | // Your mechanical code here... | ||
+ | } | ||
+ | </ | ||
+ | - Proceed creating a [[en: |