Finding references to actors in a level has pretty poor workflow and I wanted to know if we are missing a feature or if it is something that is going to get improved.
Right now if an actor sets another actor as a reference it seems the way to find the reference is to try and delete it. There doesn’t seem to be a way to see what in a level is referencing a particular class. The property resolver seems to always fail.
So:
Is there a way to see who is referencing a specific actor without having to try and delete it?
is there a way to see what in a level is referencing a particular class?
So all that tells you is TestMap references BP_TestActor. So for example, someone overrides a meshes material to MI_Colorway1. Tracking that down via the reference viewer isn’t great.
There’s a difference in how references are saved for Classic maps and WP maps.
World Partitioned maps save the dependencies per actor instance, so you should be able to see in the reference viewer immediately which actor the reference came from:
[Image Removed]Classic maps, on the other hand, save dependencies during save time for the entire map, so Reference Viewer can’t tell which actor introduced the dependency. There are two ways to figure out how that dependency got set.
“Resolve Referencing Properties”. This loads the map and figures out which actor introduced the dependency. This feature was recently introduced (not sure exactly when) but you can right-click the referenced object (the material in your case) in the reference viewer and click “Resolve Referencing Properties.” This should show the actor name that’s referencing your material.
[Image Removed]
If the reference viewer isn’t working for you (you have an older UE version or it shows an error, which I’ve seen happening) for showing the reference for a classic (non-WP) map, you can insert a breakpoint during map saving to see when and why the reference is serialized into the map. This is a bit more advanced, but I explain how here: Failed to load [filename] Referenced by [function] - #7 by Ari_Epic
Is there a setup need for the resolve referencing properties? It has only ever failed for me. In this example all i did was create top down game using 5.6 from the epic store and I get “impossible to retrieve at this time”, I don’t know if I’ve ever seen it work.
I believe the top down game mode map is using world partition, but I only see the asset referencing the map not an asset like you.
My rerpro here:
create the top down game with 5.6
duplicate the MI_Colorway
set that to be used by one of the blue static meshes.
Look at the reference viewer for MI_colorway1 and this is all i get?
Another common one is a level designer wants to move some objects and wants to know what references it. Currently we have to delete the actor to see if the SDeleteReferencedActorDialog will pop up telling us what references it. Is there a way to figure that out without deleting it?
The pop up there does tell us who/what references it, just not which properties.
[mention removed] I got an email saying you sent this image, but the udn post doesn’t show it anywhere that I can see. This method only seems to work half the time?
If I select the referenced actor and open the reference viewer, all I see is the map. If i resolve properties it fails, and if i look at the list it just shows the map.
If I select the referencing actor and open the viewer or (recenter the graph) it DOES show the link. So there does seem to be just some bugs that prevent this from working reliably.
Referenced actor view[Image Removed]Referencing actor view:
[Image Removed]image from email that doesn’t appear for me in this post:
Oh, fascinating. I had a draft with an image that I hadn’t pressed “Reply” for because I wanted to double-check that it works in all scenarios. It didn’t, which is why I didn’t send it, and I was trying to figure out alternatives. The system must’ve decided you really needed to see that image from that unsent WIP answer
I’m still looking into it. Reference Viewer is being really weird and not always showing what I want it to show. I’ll get back to you once I’m done researching this a bit more because I’m not currently finding a way to do what you want it to do. However, I suspect that Unreal has the data, so I wonder why it’s not showing up.
Make sure that the “Show External Referencers” option is enabled -- this is the important bit. This will show you which actors are referencing your actor. You can now right-click the actor and click “Resolve Referencing Properties,” and it should show the property name that the reference came from.
It does! Excellent. Thank you for that. We will make that our default. I do wish it recommended turning that on instead of just telling me it was impossible.
I have on more case that doesn’t seem to get picked up out side hitting delete on the actor.
If the actor is bound in a level sequence the only way I see the reference is by trying to delete the level sequence. [Image Removed]Here are the references for the level sequence. That character is the same as before, turning that setting on only fixed seeing the other actor with the property reference.
Had to dig a bit to see why the Level Sequence doesn’t work:
A level sequence is saved as an asset file outside the level. The property that points to the actor is in the level sequence’s asset, not in the level. When an external asset like that references an actor in a level, the dependency is only saved on a whole level granularity since that’s the asset that needs to be loaded to satisfy that dependency.
The Reference Viewer only queries the asset registry. The asset registry only knows that the level sequence needs the whole level.
The reason this works differently from actors within the level itself is that External Actors (One File Per Actor) in a level keep their dependencies in their own OFPA files. But any asset outside that level pointing to an actor in the level would only save the dependency to the whole level itself.
When you try to delete an actor, Unreal needs to make sure that no assets point to the level that might have a reference to that actor. So Unreal loads all assets that point to the level, and then scours those assets for any references to the actor itself. This loads those assets (if they’re not already loaded) and is a potentially heavy action, explaining why sometimes deleting an actor takes a long time. So the delete action is doing a lot of extra things that the Reference Viewer doesn’t because it needs to be super fast to be able to show lots of references, even if they’re nested.
Unfortunately, since the Level Sequence is a separate asset, the Reference Viewer cannot currently see which specific actors within the level it points to -- only the level.
Thanks for the context! It comes up a lot from our designers as a common complaint, so having an option in the reference viewer to find all references even if slow would be nice. I’ll select your answer as best, so you can close the issue. I appreciate all the digging in to it.
The “Resolve Referencing Properties” operation is a slow operation anyway, so it could also do the same checking as the delete operation in my opinion. I’ll make a feature request at least.
Edit: Ah, it’s hard as “Resolve Referencing Properties” only checks the referencers as listed by the Asset Registry to the actor for the properties, and the Level Sequence isn’t even listed there in the first place. Not sure how we would solve this without major modifications to the asset registry.