The player is not persistant between scenes, but the NPCs are.
The player reference in the global BB is correct, since when a new scene is loaded, NPCs that were never pooled work correctly, getting the player reference correcly. Only NPCs that were pooled in another scene get the incorrect reference of the player.
NPCs only retrieve the player reference correctly when they are first spawned in the same scene (an NPC can spawn all the times we want correctly in the same scene), but when we change scene, if the NPC already spawned in a previous scene, we get the reference error.
Thanks,
Login
Register
By registering on this website you agree to our Privacy Policy.