I am making a program to livestream from using the TwitchWorks plugin. I am pretty new to Unreal and have been piecing things together from online tutorials and forum posts, so I apologize for my lack of formal knowledge.
I have done all the ‘programming’ using nodes in the level blueprint as it seems more straightforward and its a very small project. The Twitch login function works perfectly, but I am having issues with the Spawn Actor node I have attached to the OnCheer pin, pictured below.
In the editor, everything works exactly as intended, but when I package the project the actors do not show up. The print string nodes still trigger both from the hotkey and the Twitch Integration, and there are no visible error messages, so I assume everything in the blueprint is executing, and for some reason the Ball actor is either invisible, not in the right location, or not spawning at all.
I have been trying to find a solution for days with no luck and would really appreciate any suggestions.
if that is the case then that means the function completed whether it succeeded or not.
out of the ReturnValue pin on the SpawnActor() pull out an IsValid (either version will work) out of the true on the IsValid print your the “balls Spawned”. as it is possible for SpawnActor to fail, but then continue with execution (usually this is for physics preventing the spawn, or Ascyn Load on a Soft Pointer not being completed) out of the false of the IsValid print out “Ball was not spawned” or something.
in “Shipping” the program removes many warning messages that would normally happen in the editor. try packaging in Debug mode and see if the problem exists there as well (many of the error messages still exist as well as the console commands)
I would also suggest testing with known locations (first unobstructed, then obstructed for the physics correction) to see if the spawning is working. maybe drawDebug Sphere to preview where your “ball” actor is going to be.
if this is still an issue then there is the possibility that the Blueprint was not packaged by the AssetManager for some reason, to check this check the Reference Viewer... with respect to the BallBP (in the content browser/drawer right click the Blueprint, and select “Reference Viewer” blueprints typically show up as Green Boxes, and there should be something to the left connected by a purple line) in your case the Level should be the thing referencing it, and so it “should be” included in the same chunk as the Level
Thank you! The change in the print strings confirmed that it was spawning correctly and I was able to figure out that they were spawning in the wrong place. I replaced the Target Point with an empty actor and it works great!