I looked at other threads, but could not find an answer.
The error is on line 6, 7 and 8.
Could someone help me out?
using UnityEngine;
using System.Collections;
public class SaveLoad2 : MonoBehaviour {
public void SaveLocation (Vector3 pos){ //Where pos is the position of the player
PlayerPrefs.SetFloat("playerX") = pos.x;
PlayerPrefs.SetFloat("playerY") = pos.y;
PlayerPrefs.SetFloat("playerZ") = pos.z;
}
//Handles Load - Returns Vector3
public Vector3 GetLocation(){
return new Vector3(PlayerPrefs.GetFloat("playerX"), PlayerPrefs.GetFloat("playerY"),PlayerPrefs.GetFloat("playerZ"));
}
}