V5.4.3 Interfaces losing implementation after reloading project

Hi, I’m new to UE, and recently started a new project with Blueprints.
I have created a blueprint interface and am inheriting it from a BP Class, I’ve recently noticed that every time I do the implementation in the class for a blueprint function (with return value), it works as expected. However when I save and close the project, the implementation is lost every time I reload the project.

The inheritance is still set up correctly in the class, however the implementation goes back to default.
Has someone else experienced this?

I am using GIT to store my changes, and git is tracking my changes every time I fix it. Even if I reload my git branch, which I’m sure I’ve pushed after saving, while the project is still open and I see it working, when I open the project the implementation is gone.

Luckily the DIFF button in UI can track my old implementation and I can easily copy and paste it every time I reopen the project, but it’s becoming annoying. I can’t imagine upkeeping more interfaces like this.

Has anyone else had this problem, or am I doing something stupidly wrong?

Thanks!

2 Likes

Can you show the code? ( Just checking, there’s a lot of confusion around interfaces ).

Hi there, thank you for reaching out.

I’m following a playlist of tutorials from GorkaGames on youtube:
Unreal Engine 5 RPG Tutorial Series - #4: Assassinations (youtube.com)

I have a Blueprint Interface named BPI_Assasination which has one function:
image

Inherited from a Blueprint Class BP_Dummy:
image

Has a simple implementation as can be seen below:

This last screenshot is from the diff version control, its interesting to note that my ‘Depot’ changes shows that I removed the implementation, ‘Removed Nodes’. However I didn’t do this, this happens every time I restart the project.

Any help would be great, thanks a ton!

1 Like

What I did right now to avoid this problem is, created another function ‘Assasinate Me’ and left the interface empty without an implementation.

When I’m calling the function, I first do the check for interface, then call another function instead of the function defined in the interface, but this is temporary so I don’t have to redo the implementation every time, as it defeats the purpose of using an interface in the first place :frowning:

Ok, I see what you’re saying. It does look like it’s related to GIT somehow…

I have also seen people with interface implementations vanishing on restart without GIT, though.

Thanks for the info, but I don’t have any ground breaking suggestions at the moment. Apart from breaking the whole thing down into steps in an empty project… :melting_face:

1 Like

No problemo! Thanks a lot for your time anyway. Let’s hope someone else has this problem figured out. I also believe this could be related to GIT. However I tried turning it off, but the problem still persisted.

I will also try in a new project where GIT isn’t set up, and see if I manage to reproduce the issue there.

1 Like

I also have this exact same problem and it seems to be quite random and not related to GIT.
This only happens since 5.4.3 so I guess this is a new bug?

1 Like

This is a pretty major bug. I just tested 5.5.0 and its fixed however, so good news.

I upgraded to 5.5.3 but unfortunately still ran into this bug, that the implementation in an interface just disappears after restarting the editor even though it was saved before.

Is there a bug ticket for that issue?

Im also having this issue. UE 5.5.3. Implementation is sometimes disappear after restarting engine.

Running into this issue in 5.5.4 using P4V. Project is upgrade from using 5.4 where the player already had the interface implemented. All other previous implementations work great and I can edit them without losing data. The new getter event was added after upgrading to 5.5 where no matter what I do (adding a random print string node, dragging in random nodes and not hooking them up, connecting the actor component node into the output) It always defaults to as if I never touched it on restarting editor.

I hook up the node. Save, restart editor, and it’s gone. I’m not submitting or anything, it just disappears like I was never there.

FOUND A SOLUTION

My new event was only using outputs.

Step 1: Add any input node. I used boolean as it is the default choice.
Step 2: (not sure you NEED to do this but will put it just in case) Hook up the input to anything. I used a branch but did NOT hook any of its exec pins
Step 3: Restart editor and see that your changes saved this time!
Step 4: Remove the random input variable you added earlier.
Step 5: Restart editor again and it saves properly!

2 Likes

What a shame. We randomly lose code without any solution. It happened to me today. I tried to open my backup project and, surprise, two months of code lost.

Guess that now we should make screenshots or copy paste the entire code somewhere

This happens to me in 5.4.4, so I updated to 5.5.4, and it’s still happening. It’s a really major and shameful bug on Epic’s part. What kind of framework loses source code on its own?

Also, I’m finding something like this happening with my child Blueprint class. It’s losing overridden settings of components that it inherited from the parent class. They shouldn’t be working on a new feature if they have this kind of major bug. I really hope they are at least aware of this.

The only work around I have found is to make sure it has a function output, Set up the inner logic as its own function so if it does delete, it is easy to re-implement AND then restarting right after you are done. That seems to do the trick.

I would not consider this a viable workaround. It is totally unacceptable to re-implement all interface methods each time I restart the editor.

Epic, how can such a blatant error slip through QA? This really kind of worries me how your testing is organized. Maybe we are all doing something wrong here with how we use interfaces, but anyway: Loosing source (blueprint) code is a no-go!

By the way, I noticed that the implementation of the interface-methods is actually not really lost, it seems. It’s just no longer visible. Also, the class is simply no longer implementing the interface anymore after a restart, as can be seen by looking at the “Class settings” (where you “add” the interface to your blueprint-class).

I’m using 5.5.4-40574608+++UE5+Release-5.5.

This is not git related, I think. UE simply seems to forget the “add interface” action on the blueprint.

1 Like

You’re probably right :slight_smile:

Interfaces can behave strangely, though.

It’s working now, right?

I’m on 5.5.4 and it is still happening to me. No workarround worked so far, as even my functions with outputs are reseting.
This happens with every new interface function or event

It may have something to do with the order in which unreal is loading assets and moving some things around has made the problem go away in my project. My folder structure was like this:

     -  bar
     -       bar actor (uses foo interface)
     -  foo
     -        foo actor
     -        foo interface definition

which I reworked to look like this:

     -  foo interface definition
     -  bar
     -       bar actor (uses foo interface)
     -  foo
     -        foo actor

so my theory is that the content of the “bar” folder was being loaded before any content of the “foo” folder and the load of “bar actor” was getting damaged because it had no idea what the foo interface was at that time. Moving “foo interface” up in the folder structure so it gets traversed first appears to have fixed the problem… YMMV.