- Home /
Question by
tuliocll · Feb 08, 2014 at 03:16 PM ·
save scenegame savestate saving
Save Transform in PlayerPrefs
Hi, a have this script:
var Object : Transform;
function Save(){
//Save the object in player prefs?
}
Any help ? :(
Comment
Best Answer
Answer by getyour411 · Feb 08, 2014 at 03:19 PM
If you had a look @ PlayerPrefs, you see it takes something like
PlayerPrefs.SetFloat(trans.pos.x);
PlayerPrefs.SetFloat(trans.pos.y);
PlayerPrefs.SetFloat(trans.pos.z);
there is no "Object" type
https://docs.unity3d.com/Documentation/ScriptReference/PlayerPrefs.html
Answer by jtagamesinfo · May 13, 2021 at 06:13 PM
https://www.youtube.com/watch?v=q95h6PmlR18
For a method to say PlayerPrefs.SetTransform("name", target.transform);
Your answer
Follow this Question
Related Questions
Web player for my project 0 Answers
Save and load 0 Answers
How can I save & load gameObjects? 1 Answer
Unity keeps crashing when I try to save a scene 0 Answers
Saving Player Position Scene to Scene 0 Answers