Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- MS-SQL
- port
- Excel
- javascript
- flutter
- 유니티
- PER
- swift
- PyQt
- 함수
- ASP
- 날짜
- 맛집
- node.js
- Linux
- Unity
- IOS
- 다이어트
- MySQL
- sqlite
- GIT
- 리눅스
- PyQt5
- urllib
- 라즈베리파이
- ubuntu
- python
- mssql
- pandas
- tensorflow
Archives
아미(아름다운미소)
유니티 게임정보저장/로딩 (PlayerPrefs : SetInt, GetInt) 기능 본문
유니티 게임정보저장/로딩 (PlayerPrefs) 기능
(1) PlayerPrefs 라는 클래스(기능)을 이용하면 간단하게 정보를 로컬(핸드폰/pc)에 저장/로딩가능(2) 저장할때는 SetInt 가져올때는 GetInt 이라는 기능을 사용 (*타입에따라 명령어가다르다)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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 |