포커스 컨트롤 사용하기 텍스트 필드 포커스 이동 GUI.FocusControl("");

http://www.devkorea.co.kr/reference/Documentation/ScriptReference/GUI.FocusControl.html GUI .FocusControl( "" ); // 포커스 아웃 // "사용자 이름"Textfield 선택된 때, 버튼을 누르면. var username : String = "username" ; var pwd : String = "a pwd" ; function OnGUI () { //textfield 집합 내부 이름 GUI.SetNextControlName ( "MyTextField" ); // 실제 텍스트 필드를 확인합니다. username = GUI.TextField ( Rect (10,10,100,20), username); pwd = GUI.TextField ( Rect (10,40,100,20), pwd); // 사용자가이 버튼을 누를 경우 키보드 포커스가 이동합니다. if ( GUI.Button ( Rect (10,70,80,20), "Move Focus" )) GUI.FocusControl ( "MyTextField" ); }

문자 첫번째 문자 지우기 , 마지막 문자 지우기

if  (option ==  "first" )             {                 textLength = text.Length;                 text = text.Substring(1, textLength - 1);             }              else             {                 textLength = text.Length;                 text = text.Substring(0, textLength - 1);            ...

현재 선택된 게임오브젝트의 콜라이더 타입 알아내기

Debug .Log( Selection .gameObjects[0].GetComponent< Collider >().GetType());

게임 오브젝트 하이어라키 패널에서 숨기기

             GameObject  obj = Instantiate(mapMag.tile)  as   GameObject ;             obj.hideFlags =  HideFlags .HideInHierarchy; 

런타임에서 스트리밍 폴더 만들어 파일 읽어 오기

이미지
http://cafe.naver.com/unityhub/33749 using  UnityEngine; using  System.Collections; using  System.IO; public   class   TEST  :  MonoBehaviour  {      Texture  image;      string  path; // Use this for initialization void  Start () {         StartCoroutine(ImageTex()); }      IEnumerator  ImageTex()     {         path =  Path .Combine( "file:///"  +  Application .streamingAssetsPath,  "logo.jpg" );          WWW  w =  new   WWW (path);          yield   return  w;         image = w.texture;          Debug ....

상업 용도로 사용 가능한 무료 이미지 사이트

상업 용도로 사용 가능한 무료 이미지 사이트 http://opengameart.org/ http://www.wikitree.co.kr/main/news_view.php?id=181872 http://graphicriver.net/category/game-assets/sprites http://www.supergameasset.com/ https://www.gamedevmarket.net/ http://www.graphic-buffet.com/ http://opengameart.org/ http://www.2dgraphicsprogramming.com/forums/discussion/1/where-can-i-find-2d-art-for-my-game/p1 http://morguefile.com/archive http://imagebase.net/ http://www.freepik.com/ http://hanulsoblog.com/50189245935 http://opencast.naver.com/HB224 http://kan-k http://kan-kikuchi.hatenablog.com/entry/FreeMaterial http://gongu.copyright.or.kr/search/search.do?sk=all&kwd=%EC%95%B1%EC%84%BC%ED%84%B0&x=3&y=13 https://www.iconfinder.com

sorting sort 하이어라키 순서대로 리스트에 담는법

SORTOBJECT =  Selection .gameObjects.Where(g => ! AssetDatabase .Contains(g)).OrderBy(g => g.transform.GetSiblingIndex()).ToList();