Search found 2 matches
- Sun Apr 11, 2021 1:34 pm
- Forum: General Discussion
- Topic: Cant save the position of a GameObject
- Replies: 3
- Views: 918
Re: Cant save the position of a GameObject
Hey, I have adjusted my code as you told me: public GameObject player; public Vector3 defaultValue; public void Save() { ES3.Save("playerPosition", player.transform.localPosition); } public void Load() { player.transform.localPosition = ES3.Load("playerPosition", defaultValue); }...
- Sat Apr 10, 2021 10:24 pm
- Forum: General Discussion
- Topic: Cant save the position of a GameObject
- Replies: 3
- Views: 918
Cant save the position of a GameObject
Hey, Im trying to save the position of my Player Gameobject and I have created two simple save and load methods that execute on button press for that. public GameObject player; public void Save () { ES3.Save<Vector3>("playerPosition", player.transform.localPosition); } public void Load() {...