Casting works in editor but fails in build

I have a specific camera actor blueprint class that follows the character. The camera casts to the sidescroller character (reading in from “get player character”) on begin play for all sublevels, but manages to fail in every build despite working flawlessly in editor. I’m curious if there’s anything that would break this? I have been working with level streaming and when loading new levels it fails to cast to the character every time but when I tested a build without it the casting worked fine.

WELL this is embarrassing. I forgot to set a game mode for the persistent level and a character wasn’t spawned at all! Somehow I guess the editor preview finds a game mode to work with?