"Select Actors Using This Asset" and Actor References Array Bug

Hello,

I have a BP with editable actor references array. Recently I noticed that option “Select Actors Using This Asset” doesn’t work for actors listed in this array. Simple as that, but it can be quite misleading and make this option almost useless in my current project.

Hi Nox_A15,

To help us better track this issue down, could you post a small test project with this issue or some screenshots showing your setup?

Sure, no problem. :slight_smile: Good you asked, because working on this little example I’ve learned some more about the issue. Here is a test project:

https://dl.dropboxusercontent.com/u/32968434/UE4/UE4BugTest20150828.zip

There are two BP_ReferenceArrayHolder_1 actors, each has its own editable array with some actors chosen. All these actors use FirstPersonCube_Rounded static mesh. Then I tested some more and here are the results:

  • When actor is just a static mesh, “Select Actors Using This Asset” (used on FirstPersonCube_Rounded) works fine even if actor is chosen in the array.
  • When actor is a BP with Static Mesh Component, the option works fine as well.
  • When actor is a BP with Static Mesh Component added in Construction Script, then the issue occurs.

Mentioned issue:

  • Actors chosen in the actor references array of the mentioned BP won’t be selected with “Select Actors Using This Asset” option. The BP will be selected instead.
  • Deleting the mentioned BP will make “Select Actors Using This Asset” option to work fine again for these actors.

I downloaded and looked through the project, but I’m not seeing the bug you are talking about. The 2 blueprints you created don’t seem to be interacting in any way.

What exactly is the error that you are seeing and what are the steps to reproduce it in this project?

Please follow these steps:

  1. Open the project I attached earlier.
  2. In Content Browser search for static mesh called “FirstPersonCube_Rounded” (it’s in FirstPersonBP/Meshes).
  3. Click it with right mouse button.
  4. Choose Asset Actions/Select Actors Using This Asset option.

You should see something like this:

Notice that not all actors using the model were selected. That’s because the actor called in World Outliner as “BP_ReferenceArrayHolder_2” has them selected in its editable Actor Reference Array (and after step 4 was selected instead of them, you can barely see it in this image). If you delete this actor from the scene then after repeating steps 2-4 you will see that everything works again as intended:

In the previous comment I explained in what situations the issue shows up (or rather what selected actors need to be exactly for it to show up).

I was able to reproduce this in the project you provided. I attempted to repro it in a new project to better understand the bug but it doesn’t repro for me there. Did you happen to do anything in a specific order that may have caused it?

I tried to do it once again in 4.9 writing down every step. It looks like I wasn’t aware of the significance of one of them (7th one).

  1. Create a project, I chose FPS template without Starter Content.
  2. Create Actor based BP, let’s name it “BP_Array_1”.
  3. Inside BP_Array_1 create an array of actor references (in Variables). Let’s name it “Actor References Array”.
  4. Still inside BP_Array_1, make sure this array is Editable.
  5. Create new Actor based BP, let’s name it “BP_Box_1”.
  6. In the Construction Script of BP_Box_1 add node Add Static Mesh Component.
  7. Still inside BP_Box_1, create Scene component (you don’t need to replace the root with it, just create it). I discovered today this step is critical to experience this issue!
  8. Still inside BP_Box_1, create Static Mesh reference variable and make it editable.
  9. Still inside BP_Box_1, add node Set Static Mesh in Construction Script. Set output of Add Static Mesh Component from step 6 into Target and Static Mesh variable from step 8 into New Mesh.
  10. Place a few instances of BP_Box_1 in the level and set their Static Mesh variable to any SM you want. I chose 1M_Cube (from Geometry/Meshes in FPS template without Starter Content).
  11. Place one BP_Array_1 in the level and setting its array elements choose a part of placed BP_Box_1 instances.
  12. Now find 1M_Cube (or any other SM you used) in Content Browser and use “Select Actors Using This Asset” option on it. Actors chosen in step 11 won’t be selected. The BP_Array_1 will be selected instead.

As I said, I wasn’t aware the creation of new Scene component has any significance here. I usually create one to replace the root. Just a habit I guess. But it looks like deleting this new component doesn’t fix the issue and this is a bit worrying.

I hope this will help. :slight_smile:

PS

I just remembered that I usually replace the root scene with new one because of a little billboard in the root’s position. I don’t know how to get rid of it another way.

Any new thoughts on that?

Hi Nox,

I’m sorry that it’s been a few days.

Thank you for working with us and providing thorough repro steps. I was able to reproduce this in-house and I’ve created JIRA UE-21012 for the issue. Our developers will be investigating the issue further and we will post here with updates as we have them.

Cheers,

TJ