Invisible components get visible for one frame after being attached to other component

I attach components to other components using this node:

http://puu.sh/kgppG/c64dc6d094.png

The parent is a skeletal mesh and the targets are all child actor components. All components I attach are invisible (visibility set to false), but every time the “AttachTo” node is called, the invisible components are visible for one frame. This issue was introduced in 4.9, in 4.8 they stayed invisible all the time. It gives me really not nice looking flicker in 4.9.1.

Hi ,

Unfortunately I haven’t been able to reproduce this on my end thus far. Does the frame flicker occur with static mesh components or are you using instanced mesh components? Are you setting the visibility at any time or is it set in the details pane? What steps can I take to reproduce this on my end?

Hi ,

I am using Child Actor Components with Static Mesh Components inside. Why would I want to attach ISMCs to a skeletal mesh? Since unfortunately I’m not able to attach individual instances it would not make much sense :slight_smile: Btw, could you enter a feature request for Instanced Skeletal Mesh Components? It would surely increase performance quite a bit when having a lot of AI…

I am setting the visibility of the Static Mesh Component inside of the Child Actor Component to false before I attach the components, but since visibility was false before it should not change much.

What have you tried to reproduce this? I think just attaching an invisible Child Actor Component with a Static Mesh inside should give this bug. It’s some kind of bug caused by the child actor component I guess. Maybe that the visible child actor component with an invisible Static Mesh Component inside is overriding the visibility of the Static Mesh Component for one frame after being attached to a skeletal mesh.

Hi ,

I had initially attempted this with static meshes within a blueprints, but after seeing you mention child components again (I had missed this in the first post), I re-created my repro steps with child components, however I was still unable to reproduce the error. The steps I took are listed below, is there anything else I need to do to reproduce this on my end?

  1. Open Editor (any project, I used a third person template and first person template for my tests)
  2. Open relevant skeletal mesh and add a socket to connect to.
  3. Create new blueprint
  4. Add Child Actor Component
  5. On Begin Overlap>Cast to player character (ThirdPersonCharacter)>as PlayerCharacter_C>Attach To
  6. Set target as Child actor, parent as character’s mesh component, socket as the added socket, Set attach type to “snap to target, keep world scale”
  7. Create a new blueprint with a cube mesh (no collision), set visibility to invisible, compile
  8. Return to blueprint with child actor component, set child actor type to the new blueprint with cube, compile
  9. Add a copy of overlap blueprint to level> press PIE and run over blueprint. This should attach the blueprint to the player character at the socket.

Am I missing any steps that I can try to repro this on my end?

Hi !

I have tried it in my project again and I found the reason why you don’t see it! Your repro steps are absolutely fine and you are not missing anything you could have known from my description. What I have not said is:

I do the attaching on an actor which I only see through a SceneCapture and the RenderTarget which is visible on one UMG widget. So I don’t look at the actor directly, but through another “photo camera”. I moved the actor so that I can see it with the regular camera too while I also see it on the UMG widget and on the regular camera it’s not flickering. So that’s quite strange and I think it’s a bit funny since that’s something you would probably never think of, a bug depending on through which camera you look at the Actor :stuck_out_tongue:

So for reproducing it, just add a SceneCapture Actor to your scene, assign a render target, either just open it on a second monitor or draw it on some kind of UMG widget. Then do the attachment and see the flickering :slight_smile:

Hi ,

Unfortunately I still haven’t been able to reproduce this on my end. I’ve tried using scenecapture2d through a UMG widget as well as on a second monitor. To test against cameras not connected to the player character I created a separate camera actor and pinned that view to the window as well. In all 4 cameras I saw no flickering. What LOD settings are you using on your actor? Do you have a sample asset that this is occurring in I can take a look at?

The meshes I use don’t have any LODs.

So you have tried to do it with child actor components and the mesh was not visible for one frame?

Hi ,

That is correct. I tried with child actors as well as non child actors to ensure that I covered multiple variations of the same setup to check and see if I could replicate it, but have thus far been completely unsuccessful in doing so. Do you have a project I could look at that this is occurring in or assets this occurs with that I can take a look at?

Absolutely, I’ll have him send me a copy and check out what may be occurring. If you could, please let me know which specific assets I need to interact with to cause this to occur and I’ll try it on my end.

You could ask Rudy, he currently has a version of my project where this can be reproduced I think. Would that be possible?

Ok, I will send you detailed repro steps in the forums :slight_smile:

Hi ,

I was able to reproduce this and have entered a bug report, UE-21677, to be assessed by the development staff.

Awesome :slight_smile: Have you found the reason for why this is happening and why you were not able to reproduce it before? So do you now know what is needed to reproduce this in a clean project? Just curious.

Unfortunately I couldn’t reproduce in a clean project so I’ve modified the project you sent to show the error occurring. I’m not entirely certain why it is occurring or what could be done to fix it. It is very difficult to see through the emitter so it does hide fairly well during spawning, but it isn’t clear what the exact problem is.

Yes, When you press the building and spawn an Archer, a gold particle system is spawned as well, my assumption was to indicate spawning. I went into the building and removed this emitter and that’s when I was able to start seeing the component switch you were seeing. At least, this is what occurs in the version of the project that was sent to me.

“It is very difficult to see through the emitter so it does hide fairly well during spawning”
Emitter? Spawning? Are there particles anywhere? Sorry, I don’t get it.

I never tried to see it there, since even if its there its not a problem since you can’t see it through the particle, the problem is that it’s very visible in the UI as I described to you in the PM. I did not thought it would be visible with what you are doing since there is no SceneCapture, right? The problem is that it’s very visible on the UI where you select the different Items for the Soldier. I’m confused why you even attempted to spawn an Archer because I have not mentioned it in the repro steps I described to you.

Initially I did not see it as you had described, so I decided to improvise and ended up finding it a different way. I went back and tried your method again and ended up finding the step I was missing to cause it to reproduce. Once I managed to reproduce it using the methods you described I added that information to the bug report so that it can be assessed.