Notice
Recent Posts
Recent Comments
Link
아미(아름다운미소)
유니티 게임정보저장/로딩 (PlayerPrefs : SetInt, GetInt) 기능 본문
유니티 게임정보저장/로딩 (PlayerPrefs) 기능
(1) PlayerPrefs 라는 클래스(기능)을 이용하면 간단하게 정보를 로컬(핸드폰/pc)에 저장/로딩가능(2) 저장할때는 SetInt 가져올때는 GetInt 이라는 기능을 사용 (*타입에따라 명령어가다르다)
using System.Collections; using System.Collections.Generic; using UnityEngine; public class monster : MonoBehaviour { void Start () { PlayerPrefs.SetInt ("Player Score : ", 50000); int score = PlayerPrefs.GetInt ("Player Score : "); Debug.Log ("best score " + score); } void Update () { } }
'랭귀지 > Unity' 카테고리의 다른 글
[유니티] 유니티에서 씬(Scene) 전환 방법 (0) | 2018.04.28 |
---|---|
[Unity] 유니티 네비게이션(추적기능 AI) NavMashAgent (0) | 2018.04.11 |
유니티 이미지 플립 (오브젝트 이미지 뒤집기) (0) | 2018.04.07 |
Unity GetButton, GetButtonDown, GetButtonUp 설명 및 사용법 (0) | 2018.04.06 |
[Unity] 2D 점프 (0) | 2018.04.05 |
Comments