11월, 2015의 게시물 표시

유니티 에디터 커서 이미지 바꾸기

http://docs.unity3d.com/ScriptReference/Cursor.SetCursor.html

문자열 형변환 float.Parse(mapDepthInfo[1]);

float .Parse(mapDepthInfo[1]);

배열 길이(사이즈) 재정의 할때

using  System; if  (PREFABS.Length > 5) {  // 배열 길이 재정의 Array .Resize< GameObject >( ref  PREFABS, 5);  Array.Resize<자료형>(ref 배열명, 변경할 길이); } http://jy93630.blog.me/220496790271 Array 설명

유니티 에디터에서 기즈모 안보이게 하기

Tools .current =  Tool .None;  // 기즈모 안보이게 http://answers.unity3d.com/questions/326430/how-to-disable-the-default-transform-gizmo-in-edit.html

배열 초기화

using  System; public   class   MapMag  :  MonoBehaviour  {          public   GameObject [] PREFABS;      public   void  ArrayResrt()     {         selectPrefab =  null ;          Array .Clear(PREFABS, 0, PREFABS.Length);     } } 네임스페이스 using  System; 사용.   Array .Clear(배열명, 시작 인덱스, 지워질 배열 길이);

리스트 항목 삭제

    void RandomNum()     {         randomNumber = Random.Range(0, 4 + 1);         FLOORNUM.Add(randomNumber);         print(FLOORNUM[0]);         FLOORNUM.Remove(randomNumber); // 리스트 항목삭제         print(FLOORNUM[0]);     } 전체삭제는 CLEAR