Created
January 19, 2024 02:45
-
-
Save kirby561/98edfa42d168e8621f8d149ab57b4878 to your computer and use it in GitHub Desktop.
The source files for the UE5 Blueprint/C++ interop tutorial at https://www.youtube.com/watch?v=ejGfHtgGOOI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "SomeObject.h" | |
DEFINE_LOG_CATEGORY_STATIC(SomeObjectSub, Log, All); | |
void USomeObject::HelloFromABlueprint(int someArgument) { | |
UE_LOG(SomeObjectSub, Warning, TEXT("Hello called from a blueprint down to C++! With arguemnt: %d"), someArgument); | |
CallBlueprintFromCpp(someArgument); | |
CallBlueprintNativeEvent(someArgument); | |
} | |
void USomeObject::CallBlueprintNativeEvent_Implementation(int someArgument) { | |
UE_LOG(SomeObjectSub, Warning, TEXT("Called a native blueprintable event: %d"), someArgument); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "CoreMinimal.h" | |
#include "SomeObject.generated.h" | |
UCLASS(Blueprintable) | |
class USomeObject : public UObject { | |
GENERATED_BODY() | |
public: | |
UFUNCTION(BlueprintCallable) | |
void HelloFromABlueprint(int someArgument); | |
UFUNCTION(BlueprintImplementableEvent) | |
void CallBlueprintFromCpp(int someArgument); | |
UFUNCTION(BlueprintNativeEvent) | |
void CallBlueprintNativeEvent(int someArgument); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment