Unity 시스템.Reflection.출현시 대처법

4471 단어 unity5

결론


Assets 폴더에 있습니다.의 AsseemblyInfo입니다.cs 지우면 돼.

까닭


LitJson은 json 라이브러리입니다.LitJson을 구성합니다.dll을 Unity에 가져와서 사용하는 것 같지만, 로컬 환경의 Mac OSX Yosemite에서 구축할 수 없기 때문에, src/이하 파일을 Unity의 Assets 아래에 넣어서 사용합니다.
여기서 AsseemblyInfo를 참조하십시오.cs의
using System.Reflection;
에 오류가 발생한 것 같습니다.(자세한 내용은 알 수 없음)

날과 씨


WWW 통신에서 LitJson을 가져와 Json 대상을 얻으려고 했을 때 아무런 문제가 없었고 스크립트를 썼으며 장면을 새로 제작한 후 다음과 같은 오류가 발생했다.

Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetExportedTypes () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.TypeManager.LoadAllImportedTypes () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 
장면 중의 게임 대상을 삭제해도 안 되고, 심지어 다른 장면도 같은 오류로 인해 이동할 수 없다.
Unity 어딘가가 이상해진 것 같아서 프로젝트를 다시 만들고 Asseets 이하의 것을 카피해서는 안 된다.Assets 이하로 빈 장면을 만들고 Images, Audio, Animation을 백업하는 게 문제라는 것이다.폴더를 하나하나 삭제했다.
Scripts를 제거해도 오류는 제거됩니다.
백업에서 Scripts를 복원하는 데 다시 오류가 발생했습니다. 이번에 Scripts의 파일을 하나하나 삭제한 후 LitJson에서 오류를 제거합니다.
LitJson의 공식 사이트에 갔을 때 dll이 나눠진 것을 발견했는데 그때는 인터넷 회선이 좋지 않아서 DL를 진행하지 못했기 때문에 PKG를 직접 구축하고 싶었어요.CONFIG와 gmbc의 경로를 설정했지만
error CS0016: Could not write to file `LitJson', cause: Could not find a part of the path "/Users/kaeruko/Desktop/honmaru/Assets/Scripts/LitJson/bin/LitJson.dll".
이런 실수가 생겨서 못했어요.
makefile LitJson도 봤어요.dll이 생성된 곳이 어딘지 모르겠어요.
LitJson.dll은 구축할 수 있지 않습니까?
왜 구축할 때 요구를 받을까... 이렇게 생각하면서 LitJson 폴더를 보면서 서로 다른 색깔의 파일을 발견했다.
LitJSON
닫힌 곳이 움직였다.
들여다보다
AssemblyInfo.cs
using System;
using System.Reflection;
using System.Runtime.CompilerServices;


[assembly: CLSCompliant (true)]

[assembly: AssemblyTitle ("LitJson")]
[assembly: AssemblyDescription ("LitJSON library")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("LitJSON")]
[assembly: AssemblyCopyright (
    "The authors disclaim copyright to this source code")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]

[assembly: AssemblyVersion ("@ASSEMBLY_VERSION@")]

잘못된 내용과 일치합니다.
하, 검사기에서 게임 대상을 다시 설정해야 하는데...

좋은 웹페이지 즐겨찾기