Hi Guys,
I have a camera thats following my player. It was working when my prefab was in the scene. Now its being instantiated by my game manager.
I just cannot work out how to reference it.
My player is coming up once instantiated as Player(Clone)
but nothing i put in start (Where the ????????'s are in my line of code) seems to work.
Here is the code:
Pointing my camera to my instantiated player
I have a camera thats following my player. It was working when my prefab was in the scene. Now its being instantiated by my game manager.
I just cannot work out how to reference it.
My player is coming up once instantiated as Player(Clone)
but nothing i put in start (Where the ????????'s are in my line of code) seems to work.
Here is the code:
Code (CSharp):
- public class CameraFollow : MonoBehaviour
- {
- public float cameraDistOffset = 10;
- private Camera mainCamera;...