Components are not updated and get corrupted in blueprints (C++) (UE5.2)

Components are not updated and get corrupted in blueprints.

I’m talking about SceneComponents and ActorCompoonents:

This occurs when:
-When you make a change in the C++ class.
-Especially when you add or remove specifiers in variables or functions. UPROPERTY(…) or UFUNCTION(…).

The component is corrupted and and it causes problems, as instances of null pointers.

The problem is detectable because the SubobjectName disappears.

0

The only way to fix it is to change the name of the variable.

Deleting temporary project files doesn’t work.
Live Coding doesn’t fix it either.
I think that the problem is inside the blueprint.

So you can imagine how annoying this is, and the waste of time it represents.

Please fix this problem in the next version of the engine.

Thank you so much!!

No need to rename. Just close down the editor and recompile from the IDE. The component should work as intended. Tested it on 5.2 creating an actor component HealthComponent and later after running the editor added 2 params health and maxhealth & getHealthPercentage function, reloaded the project from the IDE and everything works as intended.

Live coding is a joke an doesn’t work 90% of the time, and probably only simple variables work with hot reloads (nothing that impacts structure) otherwise a rule of thumb is close out the project and reload.

Renaming classes strictly from c++ is a big no no in terms of unreal, it writes asset redirects for name changes so you will be breaking your project doing this if any references are made.

1 Like

It works as you say!!

It’s a bit tedious to have to restart the editor every time this happens, but it is much better method compared to renaming the variables.

Anyway I think the developers should fix this. It’s such a basic thing (relatively).

They are always developing new features. (Nanite, Online Services, Fortnite Editor…). I don’t know… but I think it’s better to do just one without bugs than a hundred full of bugs.

I mean… I think quality is better than quantity.

Thank you so much 3dRaven!!

Anyway I always try rebuilding first in vs with ctrl + shift + b from visual studio while the editor is running. (with Live coding off)

I only turn off the editor if there aren’t results after incremental compiling (you can hear a recompile sound in the editor play once it compiles ok)

1 Like

I will
Thank you so much for your help 3dRaven!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.