when i use the spawn actor from class node in my blueprint it works fine with “play in editor mode” but doesn’t spawn anything in standalone game or even when i package the game
Are you sure that map is the one that gets loaded by default in your standalone game? In project settings, check the Maps & Modes and be sure to load the proper one at game start.
yes it is and i have tried this over many new and old projects but still nothing
also i opened my output log and there was an error “LogSpawn:Warning: SpawnActor failed because no class was specified” it works in the editor but not in standalone. i read somewhere that when you play in editor it overlooks some errors but anything outside the editor and it is more strict
Is your player start colliding with the level? Can you put it a bit up in the air and see if the player can spawn then?
no it doesn’t help even if i lift up the player or the target point. i might just go back to ue 4.9 because it was way more stable and this just has too many issues for me
Is it not spawning at all or is it just invisible with no collision? You can check that by adding a debug message or an event in your spawned object (BeginPlay).
I don’t have access to my laptop now but it probably is invisible and/or spawning in the exact middle of my level because i have had this problem before when i played in editor. BTW i have no idea how to fixed it
seems like the spawn don t find your class, you may try to promote the class to a variable and plug it to the spawn node, that may avoid that bug
i tried it but it didn’t work
What you are likely seeing here is a fault of replication.
Try an actor class variable that is replicated and see if that resolves. Check the actor class that it spawns also has replication enabled.
no that didn’t fix it
I narrowed it down even more and i see that the meshes spawn but are invisible because i have set it up to increase my health once i walk over them and when i walk in my level my health will randomly incerease
and if i spawn them in one specific location (not with the random transform) it is visible