I am trying to create a start point for my game, so that when the player switches scenes they are placed where I want them to be to make it seem more real. I am having a problem however, after following some instructions, I wrote a script to do this and upon playing the game the camera zooms close to the ground as if the player is invisible or behind the scene. I can walk around and interact with the world but the character isn’t there. I’ll post the script and hopefully we can figure this out, I will also attatch the file. Thanks in advance!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//This checks player position when loading into new levels or scenes
You should first go to the scene and place everything as it should be. Your camera should show your player and this will give you a reference point of where things should be.
Then when you switch scenes, see where things “end up” after. This should help you track down what value is putting your player in the wrong place. Double click the player. Where are they? Are they in the ground, in the air? Are they on the wrong z coord. Try to adjust them so they appear back in view of the camera (while in play mode so you know)
Also, is this a save system you’re trying to load from? For a 2d game you should normally be able to place your player and camera in the scene and just load the scene and not have to move anything and you’d be fine.