Unity

    [solved] unity class Object reference not set to an instance of an object (class initialize 클래스 초기화 에러)

    (스크립트 안에서 class 선언시 NullReferenceException) 클래스를 생성을 했다. class Item { } 그리고 다른 클래스에서 해당 클래스를 사용하려고 하니, NullReferenceException 에러가 떴다. class ItemGroup{ Item item; void start(){ item = new item(); ... ... } } new () 처리를 해주고 그 다음 순서부터 해당 클래스를 사용하면 된다... 쉬운듯 하면서도 뭐지 하고 public 생각도들게 만든다..; 도움이 되셨으면 좋아요 눌러주세요 ~

    [solved] Unity Scroll View position initialize

    Unity Scroll View Content position reset 유니티에서 스크롤로 쭉 내린 후에, 다른 페이지 갔다가 다시 진입하면 그 위치 그대로 스크롤이 내려져 있다. -> 맨 위 리스트를 보기 위해서 위치를 초기화 하려고 한다. 한참 찾았는데 단순한 rect 위치 문제였다. 간단히 해결! 다들 헤매는 이유는 position 으로 접근한듯 anchoredPosition 임! 1 2 3 4 5 6 7 8 public RectTransform ScrollContent; public void setRectPosition() { float x = ScrollContents.anchoredPosition.x; ScrollContents.anchoredPosition = new Vector3(x, 0..

    [solved] UnityWebRequest Get noneArray Type error

    대강 {"code":0,"results":{"contents":"abcd”,"contents":"abcd”,"contents":"abcd”...}} 형식으로 데이터가 들어올 것을 감안하여 1 2 3 4 5 6 7 8 9 10 11 12 13 public class ServerData { public string code; public Data[] results; } public class Data{ public string content; } cs 로 만들었는데 중간에 데이터가 1개인 경우가 있어서 한참 고생했다. -> noneArray Type;;; Extra details: the issue ONLY happens if the target object where the json is deseriali..