如果项目使用了插件(包括原生音频插件),在将项目从 Unity 4 升级到 Unity 5 时需要注意以下注意事项。
不再需要将插件放在 Assets\Plugins<Platform> 文件夹中,这些插件现在具有可用于检查兼容平台的设置以及特定于平台的设置(如设置兼容的 CPU、SDK)等。默认情况下,新插件标记为与“任何平台”兼容。为了更方便从 Unity 旧版本过渡,Unity 将检查插件位于哪个文件夹,并相应设置初始设置,例如,如果插件位于 Assets\Plugins\Editor 中,该插件将被标记为仅与 Editor 兼容,如果插件位于 Assets\Plugins\iOS 中,该插件将被标记为仅与 iOS 兼容,等等。另请参阅“PluginInspector 文档”以获取更多信息。
32 位原生插件在 64 位 Editor 中不起作用。尝试加载它们将导致控制台上记录错误,并在尝试从原生插件调用函数时抛出异常。
要继续在 Editor 中使用 32 位原生插件,请使用 32 位 Editor 版本(作为单独的安装程序提供)。
要在项目中同时拥有 32 位和 64 位版本的同一插件,只需将它们放在两个不同的文件夹中,并在导入器设置中相应设置支持的平台。
局限性:
具有前缀“audioplugin”(不区分大小写)的插件将在扫描时自动加载,以便能在混音器中使用它们。这同样适用于独立构建,这种情况下,在启动时加载任何资源之前会加载这些插件,因为某些资源(如混音器)要求加载这些插件来实例化效果。
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.