블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-23 18:01

Unity2018에서 Unity2019로 올려보면서 나오는 에러 정리

 

그렇게 큰 이슈는 없는 듯 하고, GUIText와 GUITexture가 obsolete 되면서 나온 이슈 뿐인 것 같다.

 

[Error:1] error CS0619: 'GUIText' is obsolete: 'GUIText has been removed. Use UI.Text instead.'

  -> GUIText -> UnityEngine.UI.Text 로 변경

 

[Error:2-1] error CS0619: 'GUITexture' is obsolete: 'GUITexture has been removed. Use UI.Image instead.'

  -> GUITexture -> UnityEngine.UI.Image 로 변경

 

[Error:2-2] error CS1061: 'Image' does not contain a definition for 'texture' and no accessible extension method 'texture' accepting a first argument of type 'Image' could be found (are you missing a using directive or an assembly reference?)

  -> Texture2D를 Sprite로 변환해서 처리

 

public void CameraFadeAdd(Texture2D texture)
{
  ....
  //Create Sprite from the Texture2D
  Sprite tempSprite = Sprite.Create(texture, new Rect(0.0f, 0.0f, texture.width, texture.height), new Vector2(0.5f, 0.5f), 100.0f);
  cameraFade.GetComponent().sprite = tempSprite;
  ....
}

[Error:2-2 참조] stackoverflow.com/questions/53491613/guitexture-is-deprecated-so-what-should-i-use-instead-of-it

 

[Error:3] 

[해당 씬에 접근 했을 때 Error]

- Component GUI Layer in Main Camera for Scene Assets/Scenes/InGame.unity is no longer available. It will be removed after you edit this GameObject and save the Scene. UnityEditor.SceneManagement.EditorSceneManager:OpenScene(String)

[빌드 할 때 Error]

- Component GUI Layer in Main Camera for Scene Assets/Scenes/InGame.unity is no longer available. It will be removed after you edit this GameObject and save the Scene. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

- Component at index 2 could not be loaded when loading game object 'Main Camera'. Removing it!
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

  -> 해당 Scene으로 가서 Hierarchy에서 임의 수정 후 Save 하면 해결 됨.

 

[Error:3 참조]

Baroni 2020년 8월 12일 오전 6:43

All of them can be ignored. Just open the scenes once and save them.

[참조링크] www.rebound-games.com/forum/topic/2485/networkmanager-networkscenename-cannot-be-used-in-this-context-because-the-set-accessor-is-inaccessible/5

반응형
Posted by blueasa
, |
게임을 만들면 UICamera와 MainCamera 두 개를 보통 쓰는 데,

UI를 클릭하고 싶어서 클릭했더니 MainCamera쪽도 체크돼서 두 곳 다 실행되는 경우가 생기는데..

우연한 기회에 답을 주신 분이 있어서 적어놓는다.


NGUI 기준..

UICamera 클래스를 보면 

static public GameObject hoveredObject;

가 있다.

hover(UI 오브젝트 위에 있는 상태) 된 오브젝트가 들어가 있는 곳인가보다..


hoveredObject가 null이면 UI위에 있는 상태가 아니니, 다시 말해 터치된 곳에 UI가 없는 상태니 MainCamera쪽을 실행하면 되겠다.


if(null == UICamera.hoveredObject)

{

    // 게임쪽 클릭 처리

}




출처 : http://devkorea.co.kr/bbs/board.php?bo_table=m03_qna&wr_id=37658&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%EC%B9%B4%EB%A9%94%EB%9D%BC&sop=and&currentId=44

반응형
Posted by blueasa
, |