Placing the player
If you remember when we designed the initial scene in Chapter 4, Preparing Our Home Sweet Home: Part 2, we placed the Prefab with the player in the scene, and when we pressed Play, we took the perspective of the player so we could move around.
Our project will become multiplayer from Chapter 9, Turning Our World into a Multiplayer Room, onward, so we will progressively make adjustments to the current configuration to reach that goal. The way in which we currently instantiate the player would not be useful in the future in a multiplayer project, as there is only one instance of the Prefab player in the scene; it is fixed, and everyone who connects will use the same player. Crazy, right?
That’s why in this final section, we will create a dynamic instancing system. Every time a player logs in and appears in the main scene, they will do so with a new Prefab player clone:
- First of all, save the current changes. Then, we need to go back to MainScene...