A question on hard references to the player character

There are two things that can be wrong with hard refs.

  1. Memory

  2. Mess

1 means that anything that references your player, will always have everything concerned with your player loaded, even when your player isn’t there. This is probably not an issue, because the player is always loaded. So it doesn’t really matter.

2 It’s bad practice and could lead to messy programming if your player is referenced directly. There are degrees of this. Just cast to your player, and everything is loaded, but it’s not really bad practice. But if you’re referencing and changing variables in your player, not so good :slight_smile:

1 Like