单位多个程序集定义文件错误

人气:47 发布:2023-01-03 标签: assemblies unity3d

问题描述

我是Unity的初学者,在处理项目时出现错误文件夹‘Assets/JMO Assets/Toony Colors Pro/Demo TCP2/Common Demo Assets/Kino Bloom/Editor/’包含多个程序集定义文件(Assets/JMO Assets/Toony Colors Pro/Demo TCP2/Common Demo Assets/Kino Bloom/Editor/CFXR Demo Editor.asmdef)。我对程序集一无所知,当我研究的时候,我不明白如何修复这个错误。我如何修复它?

以下是两个汇编脚本的代码

第一个:

    "references": [
        "CFXRDemo"
    ],
    "includePlatforms": [],
    "excludePlatforms": [
        "Android",
        "CloudRendering",
        "iOS",
        "LinuxStandalone64",
        "Lumin",
        "macOSStandalone",
        "PS4",
        "Stadia",
        "Switch",
        "tvOS",
        "WSA",
        "WebGL",
        "WindowsStandalone32",
        "WindowsStandalone64",
        "XboxOne"
    ],
    "allowUnsafeCode": false,
    "overrideReferences": false,
    "precompiledReferences": [],
    "autoReferenced": true,
    "defineConstraints": [],
    "versionDefines": [],
    "noEngineReferences": false 

第二个:

 "name": "ToonyColorsPro.Demo.Editor",
    "references": [
        "ToonyColorsPro2.Demo"
    ],
    "includePlatforms": [],
    "excludePlatforms": [
        "Android",
        "CloudRendering",
        "iOS",
        "LinuxStandalone64",
        "Lumin",
        "macOSStandalone",
        "PS4",
        "Stadia",
        "Switch",
        "tvOS",
        "WSA",
        "WebGL",
        "WindowsStandalone32",
        "WindowsStandalone64",
        "XboxOne"
    ],
    "allowUnsafeCode": false,
    "overrideReferences": false,
    "precompiledReferences": [],
    "autoReferenced": true,
    "defineConstraints": [],
    "versionDefines": [],
    "noEngineReferences": false

推荐答案

正如错误所述,您需要删除其中一个程序集定义文件,因为一个文件夹不能有多个文件。

如果在更新资源后出现此错误,则可能是作者在最新更新中重命名了程序集定义文件,从而导致项目中有2个程序集定义文件。我建议您删除‘Assets/JMO Assets/Toony Colors Pro/Demo TCP2/Common Demo Assets/Kino Bloom/Editor/’文件夹,然后仅从Asset Store重新导入该文件夹(即取消选择导入对话框中的所有其他资产)。

16