Hello! I have an abstract class derived from AActor , called “APowerUpBase”, written in C++. Inside it, I have a public variable of type “FSlateColor” called “TextColor”, with the macro UPROPERTY, as you can see in these following images:
Then, I have a Blueprint class derived from APowerUpDamage. This Blueprint has the property “TextColor” (of type FSlateColor) inherited from APowerUpBase:
Now the TextColor has a red color, but the problem is: Every time that I close and reopen the Unreal Editor, the TextColor property resets its value to Fuchsia color (Fuchsia color is the default color for every uninitialized variable of type “FSlateColor”). For example, if I close the Unreal Editor now and I reopen it, the property “TextColor” will have the Fuchsia color.
Why is the “TextColor” property reset to its default value (Fuchsia) every time that I close and reopen the Unreal Editor if I already modified it with another value in the Blueprint class? Is this a bug?
I’m using Unreal Engine 5.1 version.
I appreciate your answers or suggestions a lot, thanks in advance!
Thanks for replying! I really appreciate it. Yes, that’s an alternative, but I would like to have all properties in one place (in the details of the Blueprint class) because is more “Clean” for my project in my opinion.
Mine is after updating from 5.0 to 5.1. It changes a string to None and a boolean to False when i open the asset… It even has the same little reset to default arrows.
Hello! No, I didn’t figure it out. I think it is just a bug. For now, I’m ignoring that bug, I will solve it at the end of my game. Anyway, I think I will need to set the values of the properties in a Blueprint node in the BeginPlay event. Or I can save and load the values manually. Both solutions are the best I can think for me.
If someone has other solutions, I’d be glad to know them.
Hey sorry just saw this. I believe Circular dependencies were the cause for me and possibly you too. Basically having cast to nodes or object references from one actor to another that eventually end up going back to the first actor like this:
Actor 1 → Actor 2 → Actor 3 → Actor 1
When Unreal loaded the actor it would try and load the ones it references too but because it is a circle it would mess up the order and random problems would happen.
This free marketplace tool helped me find and fix all of them: Circular Dependencies Detector in Code Plugins - UE Marketplace
I used interfaces with generic Actor variables to fix most of mine.
Best of luck!