![]() ![]() ![]() You can also use explicit references to plug-ins to prevent plug-ins used in an Asset package from conflicting with other code in a project into which the package is imported. (More than one assembly can use the plug-in, but all assemblies must explicitly declare the dependency.) Also, if you change the plug-in, only the dependent assemblies must be recompiled, not your entire project. Because the plug-in is no longer automatically referenced throughout your project, other scripts in your project cannot mistakenly use the plug-in. For example, if only one set of scripts in your project use a plug-in, you could create an assembly definition file for those scripts and create an explicit reference to the plug-in. To control Build Settings for plug-ins use Platform settings.ĭisable Auto Reference in order to limit the scope in which a plug-in can be referenced by explicitly declaring all references to that plug-in. When you disable the Auto Reference option, Unity will not automatically reference the file during compilation. The Auto Reference option has no effect on whether a file is included in the build. Only code included in an assembly created with an assembly definition file can reference classes, functions, or other resources in a plug-in that has the Auto Reference property disabled. These predefined assemblies contain all the scripts in your project that you have not assigned to another assembly using an assembly definition file. When you disable Auto Reference you cannot reference a plug-in from the predefined assemblies created for your project by Unity. See Script Compilation and Assembly Definition Files for more information. You can declare references to a plug-in file for an assembly definition using the Assembly Definition Inspector window. Disable Auto Reference if you want to explicitly declare references to the plug-in instead. ![]() If Auto Reference is enabled, which is the default, then all predefined assemblies and assembly definitions automatically reference the plug-in file. The Auto Reference setting controls how a plug-in file is referenced by other assemblies and assembly definitions in the project. Select a plug-in file in the Project window to view the Plugin Inspector: Plugin Inspector for “MyPlugin.dll” General You can also specify various other platform-specific settings for a plug-in. Use the Plugin Inspector to specify the conditions under which Unity loads and references a plug-in file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |