Can't save blueprint variable value set in level editor

Ok, simple situation:

I have a blueprint called headquarters. Every headquarters is assigned to a team - via an enum called “TeamEnum”. The default value of this enum is “NoTeam”.

I place two headquarters in the map and edit their editable and exposed on spawn variables in the details tab of the world editor:

All is well, I can play and test and everything is fine.

However, once I restart the editor, this value is set to “NoTeam” again.

What am I doing wrong?

Why not try to create a workaround of sorts.
Assign tags and expose the tag to be edited from the world editor.
Then do a event begin play in the blueprint… and check if tag is Team awesome, set enum value to team awesome.

I only suggest this because tags seem to be very reliable on blueprints… where as i have run into too many issues trying to use exposed variables.

Any tip is welcome - but yes, I’m saving the level :slight_smile:

Sorry if it is a dumb question, but just to make sure.
Are you saving the level? :slight_smile:

Hm, tags are a good idea, thank you.

I actually hoped there was a problem on my end, something I did wrong. If exposed variables have issues, that means all my other work could just cease working from one day to the other…

Did the tag workaround not work?

I’m sure it will work, but I thought I’d keep this question open a bit so that maybe we’ll get a response from epic once the weekend is over.

Maybe they (or someone else) knows more about the issue. Hopefully there are only problems with enum types and not integers, too.

Yeah… i had the same issue with vectors. And in some cases int’s as well. Not sure but i reckon its related to the reason they removed editing components directly from there

the enum variables still don’t work, but the tag workaround suggested by Crocopede works.

However I’ll keep this question open. Enum Variables are suppossed to work and you can’t and shouldn’t have to solve everything with tags.

Hey man. Have you reported this as a bug? I would strongly suggest you do that. Because technically it is a bug. :stuck_out_tongue:

Maybe try and change this to a bug report… or else just write one up. I would also very much like not to resort to tags as workarounds

Good idea, I moved it.

Let’s hope someone from epic comes around and leaves a comment :smiley:

Hi Deventico,

I’m glad that Crocopede’s suggestion is working for you. But you are correct, this isn’t the expected behavior of enums.

Which version of the editor are you using? I just tested this in 4.7.4 but I couldn’t get your results.

  • I created an Enum with the 3 team names

  • Created an actor class bp with an exposed variable of that enum type

  • Placed 3 of them in the level & changed the enum var of each to one of the three types

  • Saved, closed, and then reopened the level

If you are also in 4.7.4, could you try reproducing this in a new blank project?

Hey TJ Ballard,

at the time of this issue I was using 4.7.3, but now I’m using 4.7.4.

It seems like the issue vanished in the meantime and I haven’t found a way to reproduce it. My blueprints and C++ code is version controlled and even after checking out an old version I couldn’t see the issue.

Either the bug was in the .umap file or it was fixed with 4.7.4. Anyways, thanks for your help!

It seems like the issue is fixed in 4.7.4 since I can’t reproduce it even with old blueprints.

Therefore I’ll mark this question as answered.

Thanks again for Crocopede’s workaround suggestion in the meantime.

Same problem happens in one of my 4.9.2 project with a GameMode_BP. If I reset the values to Default, after save and reload, it is gone.