Creating a variable in c++ also available in the editor

Is there a way to create a variable also available in the editor? In particular, I want to create a const FName in c++ to use as a tag, then assign this tag to some objects of some classes in the editor. I could manually type the tag on every single object that I want it to be on, but I find it so error prone! Also, if I want to change this tag later, I would have to change it on all objects of every level.

This should help you: https://docs.unrealengine.com/latest…ies/index.html

Basically you can use
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=“My Category”) float MyFloat;

I’ll try to be more clean expanding my example, let’s say I define this tag in a class:

in .h:



public:
    static const FName INITIAL_CHECKPOINT_TAG;


in .cpp:



    const FName UProjectStatics::INITIAL_CHECKPOINT_TAG = FName("initialcheckpoint");


And in the editor I want to assign this tag to some actors, I do not want to change the tag, which the EditAnywhere Specifier does.

Somehow, instead of writing literally “initialcheckpoint” I’d like to write UProjectStatics::INITIAL_CHECKPOINT_TAG. Is there a way to do it?

Sorry I misunderstood your original question, one way I could see this solved is using an public ENUM, then in your OnConstruction method check the enum values and write to the Actors tag.

hi
Is there a way to create a variable also available in the editor? [RIGHT]طراحی سایت, طراحی وب سایت, طراحی وب , طراحی سایت حرفه ای ,طراحی سایت فروشگاهی طراحی سایت اسپیناس](https://sitedp.com)[/RIGHT]

That is the way to expose a variable to the Editor.

hi
Is there a way to create a variable also available in the editor? یکی از جدیدترین روش های درمان شقاق](روش های درمان شقاق توسط پزشک با لیزر و بوتاکس) (فیشر) **لیزر **می باشد