No announcement yet.

SpawnActor sometimes missing mesh in cook build

  • Filter
  • Time
  • Show
Clear All
new posts

    SpawnActor sometimes missing mesh in cook build


    I have been fixing this bug almost 8+ hours, but can't figure out what's causing this issue.

    I have an NPC blueprint with AI controller and behavior tree. I use "SpawnActor" in blueprint to spawn the NPC.

    While in PIE, everything works as intended, in cook build, the spawned NPC will "sometimes" missing its mesh.

    (Most of the time the spawned NPC will appear correctly, but maybe 5 or 10 minutes of gameplay, one of the spawner

    actor, will spawn a missing mesh NPC for unknown reason.)

    At first, I thought it is a missing reference issue, which can happen quite a lot in cook build, so I added

    the required skeletalmesh to the level but the bug still happen.

    I then duplicate that skeletalmesh in content browser, give it a separate material and attach it to the NPC as a

    addtional component, and in cook build that duplicated mesh is also missing!!

    I tried calling "SetSkeletalMesh" in the NPC's beginplay event, but the bug still persist.

    I have ran out of ideas, and I still don't know what's causing this strange bug. I will appreciate if someone

    could point out any possible fixes or how to debug this problem in cook build. Thank you.

    Note: engine version: 4.12.5 (This is a C++ project but only blueprints were used, currently no custom c++ code)

    PS. I've also posted this problem at ue4 answer hub, but after 12 hours, the view count is only 2 (which is both contributed by me) so I figured I gave forum a try.
    Last edited by rit; 01-16-2017, 01:20 AM.
    Steam Page

    I'm still experiencing this issue.

    Is there no way to debug cook build?
    Steam Page


      So you didn't change the core code of the engine? Hmm for the compiler to ignore adding in the npc's mesh is weird and sounds like a bug if its missing the mesh.


        Hi Tozan,

        I didn't change the core code. Just a c++ project with custom blueprints only.

        I build my own engine from git hub though, not sure if that's why I get strange bug in cook build?

        Currently, I'm out of ideas why this behavior happen only in cook build but not in PIE.

        My last resort is building a custom console system and debug from there in cook build...but that's gonna take quite some time from me.
        Steam Page


          I think I have narrowed down the problem.

          The mesh is using a masked opacity channel, if I don't use mask opacity, then the mesh will show up correctly everytime.

          In other word, the mesh isn't missing, just the opacity mask channel is broken in cook build.
          Steam Page