Zrobiłem coś takiego:
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include <string> #include "GameFramework/Actor.h" #include "ItemParent.generated.h" #define FIRE 0 #define WATER 1 #define GROUND 2 #define AIR 3 struct Aspect { float aspect[4]; FString names[4]; }; USTRUCT(BlueprintType) struct FItemData { GENERATED_BODY() FItemData() {}; FString name; Aspect aspect; }; UCLASS() class SURVIVALONCPP_API AItemParent : public AActor { GENERATED_BODY() public: // Sets default values for this actor's properties AItemParent(); FItemData itemData; protected: // Called when the game starts or when spawned virtual void BeginPlay() override; public: // Called every frame virtual void Tick(float DeltaTime) override; UPROPERTY(EditAnywhere, Category=Options) FString name; UFUNCTION(BlueprintImplementableEvent, Category = "Output") void sendVariables(const FString &itemName); UFUNCTION(BlueprintImplementableEvent, Category = "Input") int32 setVariables(const FString &itemName); };
ale nie pokazuje mi zmiennej "name" w bluepirntach: