본문 바로가기

전체 글

(307)
스파인 애니메이션 셋팅값 설정 파랗게 표시한 부분을 0으로 설정한다. 기본적으로 0.2로 셋팅되어있다.
UGUI - text 글자길이에 맞게 Recttransform 크기 변경하기 (recttransform resize as text length) Recttransform m_Text_Recttransform; Text m_Text; m_Text.string = "asfsafsdfasdfsa"; m_Text_Recttransfrom.sizeDelta = new Vector2 (m_Text.preferredWith, m_Text.preferredHeight);
c# 타임스템프 사용하기 using system; TimeSpan m_LocalTime = DateTime.Now.ToLocalTime() - new DateTime (1970, 1, 1, 0, 0, 0, 0).ToLocalTime (); ulong _DiffTime = receivedTime - (ulong)m_LocalTime.TotalSeconds; float _timeTick = 0; void Update () { _timeTick += Time.deltaTime; if (_timeTick >= 1) { _DiffTime--; } }
c# 숫자앞에 0 넣기 int a_hour = (int)(_time / 3600); int a_min = (int)_time % 3600 / 60; int a_sec = (int)_time % 3600 % 60; string.Format ("{0:D2} : {1:D2} : {2:D2}", a_hour, a_min, a_sec); => 01:59:06
animator 사용시 play함수 사용법 animator ani; 1) ani.Play("애니메이션이름"); => 같은 애니메이션을 반복시 애니메이션을 중간에 끊지 못하고 기다려야한다. 2) ani.Play("애니메이션이름, -1, 0); => 같은 애니메이션을 반복시 중간에 끊고 다시 시작할수있다. 유니티 (Unity) Animator로 2d Animation 재생(Play) 목표 animator를 이용하여 간단하게 반복적인 Idle 움직임과 외부에서 클릭 시 점프하는 animation을 구현하여 여러 개의 애니메이션이 한 번에 재생되는 상황을 연출해 보겠습니다. 목차 1. 결과화면 moblieandlife.tistory.com 유니티(Unity) 애드몹 부업 프로젝트 : [1] 시작 목표 아주 단순한 점프게임을 만들어서 광고를 붙이고 광고수..
UGUI - UI Button OnClick 리스너 스크립트에서 지정하기 inspector에서 버튼에 호출함수를 넣기 어려운 상황이라면 스크립트에서 호출함수를 AddListener를 통하여 연결시켜 줄수있다. 주의할점 : 초기화 RemoveAllListeners (); RemoveListener(callFunction); 를 통해서 추가되었던 호출함수를 제거해줄수있다. 예시) using UnityEngine.UI; Button _bt; //호출함수 추가 _bt.onClick.AddListener (()=>callFunction(0.3f);};); //호출함수 제거 .onClick.RemoveListener(callFunction); //호출될 함수 void callFunction (float _param) {}
겔럭시 노트 - Polaris Engine / this is a model with the library does note support 폰에서 잘 찾아보시면 위와같은 아이콘이 있을거에요~ 설치하신 기억이 없더라도 기본적으로 깔린 어플같으니 잘 찾아보세요 실행하시면 이런 화면이 나올겁니다. 그럼 검색창에서 s노트를 입력합니다. 저는 업데이트가 완료되서 업데이트 표시가 없는데 원래는 업데이트 표시가 나옴니다. 실행하시면 아래같은 사진이 나오고 업데이트라고 써진 버튼이 나옴니다. (저는 이미 업데이트를 받아서 '실행'이라고 뜨네요) 업데이트 받으시고 꼭!! 재부팅 하세요~~
바이너리 파일 읽어오기(read a file as binaryreader) re:2019.05.11 바이너리 읽기 (read a file data) string _filename; => (resource폴더 이하의 경로 / 파일 확장자명 제외) TextAsset _textAsset = Resources.Load (filename) as TextAsset; Stream _s = new MemoryStream (_textAsset.bytes); BinaryReader br = new BinaryReader (_s); Debug.Log( br.ReadByte ()); Debug.Log( br.ReadInt32()); Debug.Log( br.ReadSingle()); ... 모든 바이트배열 얻기 (get all bytes) byte[] _all = br.ReadBytes ((int)br.BaseStream...