회원 로그인
정보기억 정보기억에 체크할 경우 다음접속시 아이디와 패스워드를 입력하지 않으셔도 됩니다.
그러나, 개인PC가 아닐 경우 타인이 로그인할 수 있습니다.
PC를 여러사람이 사용하는 공공장소에서는 체크하지 마세요.
소셜네트워크 서비스를 통해서 로그인하시면 별도의 로그인 절차없이 회원서비스를 이용하실 수 있습니다.


최근 게시물

1.노션에서 작성 중

1.노션에서 작성 중

개편하기 전까지 노션에서 작성 중

2024.04.04//read more

2.ChatGPT

2.ChatGPT

OpenAI로 대규모 언어 모델대화형...

2023.03.16//read more

3.노코딩 게임 엔진 - 빌..

3.노코딩 게임 엔진 - 빌..

빌드 지원안드로이드iOS윈도우즈특이사...

2023.03.14//read more

4.(완료) 미접속 회원 정..

4.(완료) 미접속 회원 정..

[완료] 36명의 회원을 정리하였습니...

2023.02.16//read more

5.매뉴얼 플러스 - 전자제..



안정적인 DNS 서비스 DNSEver
DNS Powered by DNSEver.com


유니티 경고, 에러 모음 (재정리 예정)

푸딩뱃살 | 2013.08.12 00:09 | 조회 71095

유니티 경고, 에러 모음


C# Compiler Errors (Visual Studio 2015) 
     링크 : 콘솔에서 나오는 모든 C# 스크립트 에러 확인 가능



경고!!

Assets/sample.cs(24,23): warning CS0219: The variable `distanceOfit' is assigned but its value is never used
Assets/sample.cs(24,23): 경고 CS0219: 변수 `distanceOfit'은 지정되어 있지만 값이 사용되지 않았다.



에러!!

Assets/sample.cs(12,24): error CS0029: Cannot implicitly convert type `int' to `string'
Assets/sample.cs(12,24): 오류 CS0029: 'int'(정수형)을 'string'(문자열) 타입으로 변환할 수 없다.



에러!!

NullReferenceException
sample.Start () (at Assets/sample.cs:10)
변수를 생성하고 값을 지정하지 않으면 오류 발생



에러!!

NullReferenceException: Object reference not set to an instance of an object
오브젝트 참조가 오브젝트의 인스턴스로 설정되지 않았다.



에러!!

error CS0428: Cannot convert method group `GetComponent' to non-delegate type `UnityEngine.Animator'. Consider using parentheses to invoke the method.
GetComponent를 변환 할 수 없습니다. 메소드를 호출하기 위해 괄호를 사용하는 것이 좋습니다.

해결
GetComponent<>();인데 ()이 빠졌을 때 나오는 에러


에러!!


Can't add script component 'NewBehaviourScript' because the script class cannot be found. Make sure that there are no compile errors and that the name and class name match.

해결
컴포넌트에 넣을 때 나오는 에러로 스크립트 파일명과 Class명이 맞지 않았을 때 나오는 에러


에러!!



TrySetString can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.

해결
클래스 안에 바로 참조하면 나오는 에러, 참조를 Awake()나 Start()에 한다.


에러!!



IndexOutOfRangeException: Array index is out of range.
GameObject[] _objectArray = new GameObject[5];  //선언 초기화 시 에러

// Awake()나 Start()에서 초기화 해준다.
GameObject[] _objectArray = null;

void Awake() {  // 또는 Start()
    GameObject[] _objectArray = new GameObject[5];
}


에러!!



CommandInvokationFailure: Failed to build apk.

해결
keystore 오류.


keystore 경로나 암호 제대로 넣기.

참고) http://answers.unity3d.com/questions/621759/building-error-not-a-file-.html


에러!! (2017.1.0f3, GVR 1.70.0)

Google CardBoard 등록 후 사용 시


On Android 'Play Settings > Virtual Reality Supported' setting must be checked. Please fix this setting and rebuild your app.
On Android 'Play Settings > Virtual Reality SDKs' must include 'Daydream' or 'Cardboard'.  Please fix this setting and rebuild your app.

해결


사용하려면 Virtual Reality Supported 체크 후 DayDream이나 Cardboard를 선택하라고 한다.


에러!! (2017.1.0f3, GVR 1.70.0)

VR AndroidManifest 에러


UnityException: Minimum API Level Not Supported on Requested VR Device Cardboard Requires a Minimum API Level of 19.



Error building Player: UnityException: Minimum API Level Not Supported on Requested VR Device Cardboard Requires a Minimum API Level of 19.



UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.

해결


Play Setting에서 API 버전을 최소 19, 최대 24로 사용(2017.1.0f3)


오류!! (2017.1.0f3)



GvrPointerGraphicRaycaster requires GvrPointer to have a Camera when in Direct mode.

해결


GvrReticlePointer의 Raycast Mode를 Camera로 변경.

참고> https://github.com/googlevr/gvr-unity-sdk/issues/666


오류!! (2017.1.0f3)

Animator 사용 시 Null Reference Exception, UnityEditor.Graphs.ParameterControllerView.HasKeyboardControl () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/ParameterControllerView.cs:762)
이라고 나오면서 Animator 창에 클릭할 수록 에러 카운트가 된다.

해결
유니티 다시 시작

참고> http://answers.unity3d.com/questions/1020334/unexplanable-null-refrence-exception.html


오류!! (2017.1.0f3)



KeyNotFoundException:The given key was not present in the dictionary.
UnityEditor.DockArea:OnEnable()



System.Collections.Generic.Dictionary `2[System.String,UnityEditor.Graphs.AnimationStateMachine.EdgeInfo].get_Item (System.String key)

유니티 창이 너무 작아 나오는 오류로 유니티 전체 창을 키우면 된다. 

오류 (2018.2.3f1)

CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_112\bin\java.exe -classpath "E:\Program\Unity 5.6.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleRelease"

빌드 시 오류, 안드로이드 SDK Manager에서 Android SDK Build-tools 28.x을 인스톨 한다.

참고
https://forum.unity.com/threads/commandinvokationfailure-gradle-build-failed.479460



기타

null
UnityEngine.Debug:Log(Object)
변수의 값이 없으면 null로 출력

 

146개(5/8페이지)
유니티
번호 제목 글쓴이 조회 날짜
공지 유니티 강좌 모음(영문) 푸딩뱃살 60295 2013.08.28 12:02
>> 유니티 경고, 에러 모음 (재정리 예정) 첨부파일 [1+1] 푸딩뱃살 71096 2013.08.12 00:09
64 [정보] Unity 크리스마스/연말 업데이트 소식 첨부파일 푸딩뱃살 4376 2015.01.05 11:56
63 [유니티] 유니티 폴더 구성 푸딩뱃살 4540 2015.01.03 12:34
62 [유니티] Animation 컴포넌트 첨부파일 푸딩뱃살 5514 2014.12.14 17:04
61 [애셋] (링크) NGUI 팁 사진 첨부파일 푸딩뱃살 4731 2014.08.20 01:47
60 [정보] Visual Studio 플러그인 UnityVS 소식 사진 첨부파일 푸딩뱃살 6122 2014.07.03 23:12
59 [유니티] Rigidbody / Physic Material 컴포넌트 푸딩뱃살 9273 2014.04.20 15:13
58 [유니티] 텍스쳐(Texture), 매터리얼(Material), 쉐이더(Shader), 라이트(Light) 첨부파일 푸딩뱃살 18046 2014.03.27 02:31
57 [유니티] 3D 슈팅게임 만들기 첨부파일 푸딩뱃살 6777 2014.03.09 22:05
56 [참고] 3D Package Support 첨부파일 푸딩뱃살 4416 2014.02.19 02:57
55 [유니티] 유니티 '막강좌' - 8. C# 기초 첨부파일 푸딩뱃살 8391 2014.02.07 22:08
54 [유니티] 유니티 '막강좌' - 7. 프로그래밍 Java? C#? Boo? 푸딩뱃살 6484 2014.02.07 17:26
53 [유니티] 유니티 '막강좌' - 6. 게임 제작 맛보기 (게임 시작씬 제작) 첨부파일 푸딩뱃살 14962 2014.02.05 02:10
52 [참고] 유니티에 대한 이야기 푸딩뱃살 3755 2014.02.05 02:02
51 [유니티] 유니티 '막강좌' - 5. 많이 사용되는 용어 정의 푸딩뱃살 6457 2014.02.05 02:00
50 [유니티] 유니티 '막강좌' - 4. 꼭 알고 있어야 할 사항 첨부파일 푸딩뱃살 5792 2014.02.05 01:22
49 [유니티] 유니티 '막강좌' - 3. 인터페이스 사진 푸딩뱃살 5432 2014.02.02 15:34
48 [유니티] 유니티 '막강좌' - 2. FSM, 순서도(Flow Chart) 첨부파일 푸딩뱃살 9812 2014.01.31 01:36
47 [애셋] PlayMaker - Cube 날리기 첨부파일 푸딩뱃살 8872 2014.01.25 17:48
46 [애셋] NGUI & PlayMaker - Counter Button 첨부파일 푸딩뱃살 6038 2014.01.25 17:09
45 [유니티] 유니티 '막강좌' - 1. 공간의 개념 (2D, 3D) 첨부파일 푸딩뱃살 9290 2014.01.24 02:26