Cannot set actor references in Game Mode
I seem to be unable to set references of actors in scene to variables in my game mode. My custom game mode has a component actor that contains the reference variables, and when I click the drop down and select the actor I want, it doesn't save any changes. It remains as none. I'm not entirely sure what the problems is. Yes, the variables are public and editable.
EDIT: Updated screen shot
I am not 100% on this but I believe this is because Actors are not the same for all connected players, loaded on client then replicated to represent the servers version, therefore a reference to it in GM would be redundant. You should try make actor references in the Level Blueprint or where necessary for interactivity, the Character or Pawn BP.
answered Jul 28 '16 at 07:25 AM
The problem is, that the GameMode isn't spawned yet. You can only set Reference to other spawned Actors within a spawned Actor. The GameMode will be spawned during runtime, so it simply doesn't exist yet.
You need to get the references differently. One way would be letting the Objects register themselves in their "BeginPlay" function. They can "Get the GameMode" and enter themselves into the Variables you need.
answered Jul 28 '16 at 08:51 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here