简体   繁体   English

如何将 ScriptableObject 资产文件导入 Unity 3d 项目。

[英]How to import ScriptableObject asset file into Unity 3d project.

I have created ScriptableObject derived Quests.asset file in one of my project and then just copied it into my other project Assets folder.我在我的一个项目中创建了 ScriptableObject 派生的 Quests.asset 文件,然后将其复制到我的另一个项目 Assets 文件夹中。 When I click on this file in project inspector view, I see "the associated script can no be loaded" message.当我在项目检查器视图中单击此文件时,我看到“无法加载关联的脚本”消息。 When i create public Quests quests;当我创建public Quests quests; field in my script, there is: "type not found" error.我的脚本中的字段,有:“找不到类型”错误。 What have I done wrong?我做错了什么?

Ok, got it.好的,我知道了。 There was C# script with the same name I was missing.有一个与我丢失的名称相同的 C# 脚本。 When copied to the new project all started to work.当复制到新项目时,一切都开始工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM