forked from 20tab/UnrealEnginePython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPyHUD.h
More file actions
54 lines (36 loc) · 1.24 KB
/
PyHUD.h
File metadata and controls
54 lines (36 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#include "GameFramework/HUD.h"
#include "UnrealEnginePython.h"
#include "PyHUD.generated.h"
UCLASS(BlueprintType, Blueprintable)
class UNREALENGINEPYTHON_API APyHUD : public AHUD
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
APyHUD();
~APyHUD();
// Called when the game starts
virtual void BeginPlay() override;
// Called every frame
virtual void Tick(float DeltaSeconds) override;
virtual void DrawHUD() override;
UPROPERTY(EditAnywhere , Category = "Python")
FString PythonModule;
UPROPERTY(EditAnywhere, Category = "Python")
FString PythonClass;
UPROPERTY(EditAnywhere, Category = "Python")
bool PythonTickForceDisabled;
UPROPERTY(EditAnywhere, Category = "Python")
bool PythonDisableAutoBinding;
UFUNCTION(BlueprintCallable, Category = "Python")
void CallPythonHUDMethod(FString method_name, FString args);
UFUNCTION(BlueprintCallable, Category = "Python")
bool CallPythonHUDMethodBool(FString method_name, FString args);
UFUNCTION(BlueprintCallable, Category = "Python")
FString CallPythonHUDMethodString(FString method_name, FString args);
private:
PyObject *py_hud_instance;
// mapped uobject, required for debug and advanced reflection
ue_PyUObject *py_uobject;
};