어셈블리 정의 및 어셈블리 정의 레퍼런스 에셋은 JSON 파일입니다. Inspector 창을 사용하여 Unity 에디터 내에서 에셋 파일을 편집하거나, 외부 툴을 이용하여 JSON 콘텐츠를 수정할 수도 있습니다.
어셈블리 정의는 다음 필드가 포함된 JSON 객체입니다.
선택 사항. 기본값은 false입니다. ‘안전하지 않은’ 코드 허용을 참조하십시오.
"allowUnsafeCode" : true
선택 사항. 기본값은 true입니다. 자동 참조를 참조하십시오.
"autoReferenced": false
선택 사항. 제약 역할을 하는 심볼입니다. 비어 있을 수 있습니다. 제약 정의를 참조하십시오.
"defineConstraints": [
"UNITY_2019",
"UNITY_INCLUDE_TESTS"
]
선택 사항. 제외할 플랫폼 이름 문자열, 또는 빈 배열입니다. includePlatforms에 값이 포함된 경우 excludePlatforms 배열은 비어 있어야 합니다. CompilationPipeline.GetAssemblyDefinitionPlatforms 함수를 사용하여 플랫폼 이름 문자열을 검색해서 가져올 수 있습니다(이 함수 호출 시 현재 에디터에 대한 플랫폼 지원이 설치되어 있어야 함). 플랫폼을 참조하십시오.
"includePlatforms": [],
"excludePlatforms": [
"iOS",
"macOSStandalone",
"tvOS"
]
선택 사항. 포함할 플랫폼 이름 문자열, 또는 빈 배열입니다. excludePlatforms에 값이 포함된 경우 includePlatforms 배열은 비어 있어야 합니다. CompilationPipeline.GetAssemblyDefinitionPlatforms 함수를 사용하여 플랫폼 이름 문자열을 검색해서 가져올 수 있습니다(이 함수 호출 시 현재 에디터에 대한 플랫폼 지원이 설치되어 있어야 함). 플랫폼을 참조하십시오.
"includePlatforms": [
"Android",
"LinuxStandalone64",
"WebGL"
],
"excludePlatforms": []
필수. 모든 합법적인 어셈블리 이름입니다.
"name" : "MyAssemblyName"
선택 사항. 기본값은 false입니다. 엔진 레퍼런스 없음을 참조하십시오.
"noEngineReferences": false
선택 사항. 이전 버전의 Unity에서 이 필드는 어셈블리를 테스트 어셈블리로 지정하는 데 사용되는 Unity References : Test Assemblies 옵션을 직렬화했습니다. Unity 2019.3 버전부터 이 옵션은 더 이상 표시되지 않습니다. 이 필드는 여전히 지원되지만, 에셋이 최신 버전의 Unity 에디터에서 다시 직렬화될 경우 필드가 동등한 어셈블리 레퍼런스로 대체됩니다.
테스트 어셈블리에 대한 자세한 내용은 테스트 어셈블리 생성을 참조하십시오.
"optionalUnityReferences": [
"TestAssemblies"
]
선택 사항. precompiledReferences에 값이 포함된 경우 true로 설정됩니다. 기본값은 false입니다.
[오버라이드 레퍼런스]를 참조하십시오.
"overrideReferences": true
선택 사항. 참조된 DLL 라이브러리의 파일 이름으로, 확장자를 포함하지만 다른 경로 요소가 없습니다. 비어 있을 수 있습니다. overrideReferences를 true로 설정하지 않으면 이 배열은 무시됩니다.
어셈블리 레퍼런스를 참조하십시오.
"overrideReferences": true,
"precompiledReferences": [
"Newtonsoft.Json.dll",
"nunit.framework.dll"
]
선택 사항. 어셈블리 정의 에셋으로 생성된 다른 어셈블리에 대한 레퍼런스입니다. 어셈블리 정의 에셋 파일의 GUID 또는 어셈블리의 이름(어셈블리 정의의 [name] 필드에 정의됨)을 사용할 수 있습니다. 리스트의 모든 레퍼런스에 대해 동일한 형식을 사용해야 합니다. 비어 있을 수 있습니다.
AssetDatabase.AssetPathToGUID 함수를 사용하여 에셋의 GUID를 검색해서 가져올 수 있습니다(GUID는 모든 에셋과 연결된 메타데이터의 일부이기도 함).
에디터의 어셈블리 정의 인스펙터에서 Use GUIDs 옵션이 표시됩니다. 이 옵션은 연결된 JSON 파일에서 직렬화되지 않습니다. 대신, 파일에 있는 레퍼런스 형식에서 선택을 추론합니다.
다른 어셈블리 참조를 참조하십시오.
GUID 사용:
"references": [
"GUID:17b36165d09634a48bf5a0e4bb27f4bd",
"GUID:b470eee7144904e59a1064b70fa1b086",
"GUID:2bafac87e7f4b9b418d9448d219b01ab",
"GUID:27619889b8ba8c24980f49ee34dbb44a",
"GUID:0acc523941302664db1f4e527237feb3"
]
어셈블리 이름 사용:
"references": [
"Unity.CollabProxy.Editor",
"AssemblyB",
"UnityEngine.UI",
"UnityEngine.TestRunner",
"UnityEditor.TestRunner"
]
선택 사항. 각 버전 정의에 대한 오브젝트가 들어 있습니다. 이 오브젝트에는 다음의 세 가지 필드가 있습니다.
버전 정의를 참조하십시오.
"versionDefines": [
{
"name": "com.unity.ide.vscode",
"expression": "[1.7,2.4.1]",
"define": "MY_SYMBOL"
},
{
"name": "com.unity.test-framework",
"expression": "[2.7.2-preview.8]",
"define": "TESTS"
}
]
다른 어셈블리 정의 및 includePlatforms에 대한 레퍼런스에 어셈블리 이름 사용:
{
"name": "BeeAssembly",
"references": [
"Unity.CollabProxy.Editor",
"AssemblyB",
"UnityEngine.UI",
"UnityEngine.TestRunner",
"UnityEditor.TestRunner"
],
"includePlatforms": [
"Android",
"LinuxStandalone64",
"WebGL"
],
"excludePlatforms": [],
"overrideReferences": true,
"precompiledReferences": [
"Newtonsoft.Json.dll",
"nunit.framework.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_2019",
"UNITY_INCLUDE_TESTS"
],
"versionDefines": [
{
"name": "com.unity.ide.vscode",
"expression": "[1.7,2.4.1]",
"define": "MY_SYMBOL"
},
{
"name": "com.unity.test-framework",
"expression": "[2.7.2-preview.8]",
"define": "TESTS"
}
],
"noEngineReferences": false
}
다른 어셈블리 정의 및 excludePlatforms에 대한 레퍼런스에 GUID 사용:
{
"name": "BeeAssembly",
"references": [
"GUID:17b36165d09634a48bf5a0e4bb27f4bd",
"GUID:b470eee7144904e59a1064b70fa1b086",
"GUID:2bafac87e7f4b9b418d9448d219b01ab",
"GUID:27619889b8ba8c24980f49ee34dbb44a",
"GUID:0acc523941302664db1f4e527237feb3"
],
"includePlatforms": [],
"excludePlatforms": [
"iOS",
"macOSStandalone",
"tvOS"
],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"Newtonsoft.Json.dll",
"nunit.framework.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_2019",
"UNITY_INCLUDE_TESTS"
],
"versionDefines": [
{
"name": "com.unity.ide.vscode",
"expression": "[1.7,2.4.1]",
"define": "MY_SYMBOL"
},
{
"name": "com.unity.test-framework",
"expression": "[2.7.2-preview.8]",
"define": "TESTS"
}
],
"noEngineReferences": false
}
어셈블리 정의 레퍼런스는 다음 필드가 포함된 JSON 객체입니다.
필수. 참조할 어셈블리 정의입니다. 어셈블리 정의 레퍼런스를 참조하십시오.
어셈블리의 이름 또는 에셋의 GUID를 사용하여 어셈블리 정의 에셋을 참조할 수 있습니다. AssetDatabase.AssetPathToGUID 함수를 사용하여 에셋의 GUID를 검색해서 가져올 수 있습니다(GUID는 모든 에셋과 연결된 메타데이터의 일부이기도 함).
어셈블리 이름 사용:
{
"reference": "AssemblyA"
}
어셈블리 정의 에셋 GUID 사용
{
"reference": "GUID:f4de40948f4904ecb94b59dd38aab8a1"
}
어셈블리 정의 레퍼런스 에셋 생성을 참조하십시오.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.