Kaagh1231
(Kaagh1231)
December 11, 2023, 2:36am
1
I have a number of various actors that have an enum variable set to a few different values.
When I recompile my project from visual studio these actors have the Enum variable set back to the default enum value as opposed to the default variable value.
Does anyone have an idea on how to prevent this?
Hi!
Can you, please, show UPROPERTY of this enum on any of the BP actors?
Kaagh1231
(Kaagh1231)
December 11, 2023, 10:33pm
3
The Enum was created in the editor (not c++), see pictures attached.
1 Like
Kaagh1231
(Kaagh1231)
December 11, 2023, 10:36pm
4
I have actually tested further and the issue is present on closing and reopening the project. Not specifically on c++ compile
3dRaven
(3dRaven)
December 11, 2023, 10:52pm
5
nikita.aksenov:
UPROPERTY
Seems to keep both c++ and bp enum values on version 5.3.2
Even tried a mix of a c++ actor with a c++ enum and a later added blueprint enum.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "EnumActor.generated.h"
UENUM(BlueprintType)
enum E_Mode
{
On UMETA(DisplayName = "Turn on"),
Off UMETA(DisplayName = "Turn off"),
};
UCLASS()
class TESTINGGAME_API AEnumActor : public AActor
{
GENERATED_BODY()
public:
AEnumActor();
protected:
virtual void BeginPlay() override;
public:
virtual void Tick(float DeltaTime) override;
UPROPERTY(BlueprintReadWrite,EditAnywhere)
TEnumAsByte<E_Mode> ExposedMode;
};
cpp is just default actor class not worth posting.