change the ufunction specifier for sgpawn blueprint implementable events to blueprint native event in order to allow overrides from c++ as well

This commit is contained in:
Mamadou Babaei
2023-10-10 17:29:53 +02:00
parent bf234d720b
commit 7c8f26e978
3 changed files with 34 additions and 6 deletions
+4
View File
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- The BlueprintImplementableEvent have been changed to BlueprintNativeEvent in order to allow them to be implemented from the child C++ classes as well. This won't break any existing Blueprint code that relies on the previous BlueprintImplementableEvent signature.
### Fixed
- Add a missing release note entry for the v1.8.0 release to the changelog file.
@@ -613,6 +613,30 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
RightHandTouchState = FSGTouchState(HandRight, nullptr, nullptr, nullptr, nullptr, nullptr);
}
void ASGPawn::OnGrabStateUpdated_Implementation(const FSGGrabState& GrabState)
{
}
void ASGPawn::OnTouchStateUpdated_Implementation(const FSGTouchState& TouchState)
{
}
void ASGPawn::OnActorGrabbed_Implementation(const USGVirtualHandComponent* Hand, const AActor* Actor)
{
}
void ASGPawn::OnActorReleased_Implementation(const USGVirtualHandComponent* Hand, const AActor* Actor)
{
}
void ASGPawn::OnActorBeginTouch_Implementation(const USGVirtualHandComponent* Hand, const AActor* Actor)
{
}
void ASGPawn::OnActorEndTouch_Implementation(const USGVirtualHandComponent* Hand, const AActor* Actor)
{
}
void ASGPawn::BeginPlay()
{
Super::BeginPlay();
@@ -215,22 +215,22 @@ private:
TArray<const AActor*> RightHandOverlappedActors;
protected:
UFUNCTION(BlueprintImplementableEvent, Category="SenseGlove | Game Framework | Pawn")
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
void OnGrabStateUpdated(const FSGGrabState& GrabState);
UFUNCTION(BlueprintImplementableEvent, Category="SenseGlove | Game Framework | Pawn")
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
void OnTouchStateUpdated(const FSGTouchState& TouchState);
UFUNCTION(BlueprintImplementableEvent, Category="SenseGlove | Game Framework | Pawn")
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
void OnActorGrabbed(const USGVirtualHandComponent* Hand, const AActor* Actor);
UFUNCTION(BlueprintImplementableEvent, Category="SenseGlove | Game Framework | Pawn")
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
void OnActorReleased(const USGVirtualHandComponent* Hand, const AActor* Actor);
UFUNCTION(BlueprintImplementableEvent, Category="SenseGlove | Game Framework | Pawn")
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
void OnActorBeginTouch(const USGVirtualHandComponent* Hand, const AActor* Actor);
UFUNCTION(BlueprintImplementableEvent, Category="SenseGlove | Game Framework | Pawn")
UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn")
void OnActorEndTouch(const USGVirtualHandComponent* Hand, const AActor* Actor);
public: