In our project we faced a complex problem which was roughly as follows:
I created a base actor and several children based on it.
At some point in time, child blueprint had an actor variable attached to it", “MyParent”
I then moved that “MyParent” variable from child to parent actor
I spawned one of those children and immediately set (using actor reference pin from spawn node) MyParent variable in that child
At that point game runs just fine, but once editor is restarted “Failed to import ObjectProperty” error message showed up.
In child object blueprint, “MyParent” variable was greyed out. In blueprint that contains “Spawn from class” node which spawns that child, there were error messages on both spawn node and “Set MyParent” node.
I managed to fix those errors by repeatedly recompiling several or all of those 3 blueprints and recreating Spawn and Set “MyParent” nodes
game ran fine then, but when I restarted editor, it crashed. We were unable to recover project and had to revert respective changelists.
I managed to “permanently” fix problem by creating a temporary variable which briefly holds actor reference from “Spawn from Class” node, which is then immediately retrieved and cast to parent, from whose pin then “MyParent” variable can be set without problems.
I tried to reproduce this bug in a simpler environment, but only partially succeeded. I was able to recreate “Failed to import ObjectProperty” part. Hopefully fixing that may help with larger problem as well.
It can be created as follows:
Create a fresh project (“TwinStick Shooter” works just fine)
Create three blueprints:
A parent blueprint, which has a variable of type “Actor” and a function “ShowMyPosition”
A child of that blueprint, which on event “ShowMyPosition” shows a debug sphere at position of that actor
Another third actor blueprint, which spawns child blueprint, then immediately sets “actor” variable to “player pawn” and executes “ShowMyPosition”
Spawn third blueprint in level script
Start game and see how debug sphere is shown at player position
Now save everything and restart editor
On startup error message “Failed to import ObjectProperty” will be shown.
I wasn’t able to reproduce this error message using steps you listed above. Have you made any changes to source code? Please and attach crash log for project from crash you got, we may find a clue about what happened in there. Thanks!
Hi , thanks for quick reply. I’ll try to get you those logs.
Meanwhile I recreated problem once more in another fresh 4.5.1 Binary build. (I should probably mention repro from yesterday was also 4.5.1 binary, though original crash bug was 4.5 source)
I got “Failed to import object property” once again, though this time another error on top, “Failed to import event”. I’ll attach another screen shot.
blueprint code was same:
Create a new twinstick shooter blueprint project
Create 3 blueprints
first one is parent and contains an actor variable and an empty function
second one is a child of first. On event of parent’s function, it displays a sphere at location of actor in actor variable
third is a blueprint that on BeginPlay simply spawns child and immediately overwrites actor variable with “player pawn” and executes function, triggering event (both using pin coming out of spawn node)
That third actor I dragged into world. On start-up, sphere shows up.
I then save everything and restart editor. error messages shown in 5th screenshot pop up.
I attempted to reproduce this error again in a fresh project, also in 4.5.1 binary, but I still don’t get any errors on restarting project. Since you were able to get it in a new project, would you mind uploading test project somewhere and sending me a link? Thanks!
Okay, I can see error in your project, though it seems identical in every way to mine. I’m going to dive into this and see what may be causing error. Thanks!
We believe this may be a circular dependency issue. I have entered a bug report (UE-5134) with a copy of project you provided as a test case, and I will let you know when I see an update on that. Thanks for detailed report and test project, that was really helpful!
This is a very old report and if you are seeing a similar issue now, it is likely a different cause. Could you create a new bug report that has exact repro steps and/or a small test project that has issue?
We just ran into this exact error on a project in 4.22, additionally I could not find a bug labeled UE-5134 in issues database. It seems reparenting a uasset with internal redirectors doesn’t always save updated references in uasset. After closing editor the ‘failed to import properties’ error appears and all we had to do was open and re-save affected uassets.