Spawned Actors Missing in Packaged Game

I have an odd problem on a recent project. The game works without a hitch in PIE, and running as standalone through PIE. But I’m running into an issue after packaging it.

The game relies on a board which is generated when the player starts a new game. It calls a set up board function in GameState which then creates the board from a Block actor which is replicated, and set to be always relevant. While this works fine in standalone and PIE when I execute it in the packaged game it fails to create anything on the board. I’ve tried moving the creation to GameMode, as well as running it my pawn as a test since it is a single player game. I’m using SpawnActorFromClass at a transform of 0,0,0 which is where the player starts, and to make sure it wasn’t creating blocks in a far away location I tested teleporting the player there when the game starts to be sure. But still no dice.

Any ideas what might be causing this issue?

Hi ,

  • Does this occur in a clean, blank project with no additional content or is it limited to one project?
  • Is the actor being loaded onto the client?
  • What steps can I take to reproduce this on my end?
  • Have you tested this in Launch to see if it still occurs when launching the project?

I haven’t tried yet on a clean package, been working on debugging this one. Some notes though:

The actors are being spawned on the server, currently in GameState. I put some debug text so I could monitor them on the packaged version and it both is being created on the server, and it successfully creates the objects because I can print the display name of the created actors. I can’t see them, however. It puzzling because they are set to replicate, and as a test they are also set to be Always Relevant, Replicate Movement, and Net Load on Client, with the owner only variations being the only thing not checked under replication.

I did test using launch as a test and it ran similar to the packaged version, not working.

An update here. I have put different actors in place of the spawned ones and those are spawning correctly, though have the same replication flags as the non-working actor. Haven’t been able to find the difference between them yet.

Okay this is now solved. What the issue was was using one the 1M_Chamfer_Cube as a model (UE default geometry) and then retexturing since it was just a colored block for a match 3 game. This apparently wasn’t packaging as the Geometry/ directory wasn’t there I guess. Probably some type of an option to make it work. But I just created a new cube model and used that and it is now working.