카테고리 : 유니티 Neo Land | 2018. 7. 30. 12:59
Ignoring asset refresh of ******** because the file or its directory couldn't be found! 프로젝트 실행 시 콘솔에 위와 같은 경고 문구가 뜰 때가 있습니다. 이런 경우 유니티를 종료한 후 해당 프로젝트 안에 있는 Library 폴더를 삭제한 후 다시 실행하면 Rebuilding Library because the asset database could not be found! 이런 로그를 찍고 Library 폴더를 다시 생성합니다. 즉, 유니티 안에 있는 모든 에셋을 Reimport 하는 것입니다. Hold On 시간이 발암이긴 하지만 어쩔 수 없죠~
카테고리 : C# Neo Land | 2018. 7. 30. 11:58
유니티에서 컬러 값을 스크립트로 조정해줄 때 txt.color = new Color(255, 10, 10); 이런식으로 조정하면 색깔이 제대로 바뀌지 않는 경우가 발생한다. 그럴 경우 txt.color = new Color(255/ 255f, 10/ 255f, 10/ 255f, 255 / 255f); 이런식으로 바꿔주면 제대로 색깔이 적용된다.
카테고리 : C# Neo Land | 2018. 7. 30. 11:54
숫자가 1씩 카운팅 되면서 올라가는 애니메이션입니다.주로 게임 재화가 올라갈 때 쓰입니다. StartCoroutine(Count(GameMgr._instance.playerMoney+100, GameMgr._instance.playerMoney)); IEnumerator Count(float target, float current) { float duration = 0.5f; // 카운팅에 걸리는 시간 설정. float offset = (target - current) / duration; while (current < target) { current += offset * Time.deltaTime; moneyLabel.text = ((int)current).ToString(); yield return ..