From ab948c5d2f78a745ba7a60e86fab559e09da3254 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 12 Jan 2024 18:51:05 +0000 Subject: [PATCH] Made BlueprintReadWrite for weapon actors --- .../Source/EndlessVendetta/EndlessVendettaCharacter.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h index 8bfa7c05..cb06f775 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h +++ b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h @@ -103,7 +103,9 @@ public: float WalkSpeed; float OriginalWalkSpeed; + UPROPERTY(BlueprintReadWrite) AActor* PrimaryWeaponActor; + UPROPERTY(BlueprintReadWrite) AActor* SecondaryWeaponActor; bool bIsPrimaryWeaponCreated = false; bool bIsSecondaryWeaponCreated = false; @@ -148,13 +150,15 @@ public: UFUNCTION(BlueprintCallable, Category = Weapon) bool GetHasRifle(); - UPROPERTY(EditAnywhere, Category = "Weapons") + UPROPERTY(EditAnywhere, Category = "Weapons", BlueprintReadWrite) TSubclassOf PrimaryWeaponClass; - UPROPERTY(EditAnywhere, Category = "Weapons") + UPROPERTY(EditAnywhere, Category = "Weapons", BlueprintReadWrite) TSubclassOf SecondaryWeaponClass; + UPROPERTY(BlueprintReadWrite) ABaseWeaponClass* PrimaryWeapon; + UPROPERTY(BlueprintReadWrite) ABaseWeaponClass* SecondaryWeapon; UFUNCTION(BlueprintCallable, Category = "Weapons")