Code and loading a Resource type object into the game