- Home /
Script Execution Order settings with Multiple Assemblies?
I have two assemblies with the same scripts in them: one is for use in the Editor (references to UnityEditor stuff), the other is for builds. I have marked them as such in the Plugin Importer settings. Let's say they appear in the project like this:
Plugins/MyProject/MyAssembly.dll
Plugins/MyProject/Unity Editor/MyAssembly.dll
and both of them contain a reference to a MonoBehaviour called MyBehaviour
.
Now I want to customize the execution order of MyBehaviour
. When I go to Edit→Project Settings→Script Execution Order, I can see it just fine in the dropdown list that appears with the "+" button. I add it and make the customization and things seem to work fine.
When I check the contents of the meta files for the assemblies (Execution Order is stored in the .meta files from what I can tell), only one of the two assemblies above has been modified. I just tested and, in this run, it added the reference to #1 above (non-"Unity Editor" version).
But that's not all! Sometimes I can go back into the Script Execution Order editor, click the "+" button, and MyBehaviour
is listed again! Selecting it a second time adds a second row and changes the second assembly's meta file!
At this point, the Script Execution Editor ("MonoManager") gets a little funky. Attempts to remove references look good until I hit Apply at which point the settings revert to how they were pre-edit. (I suspect it's not actually built to handle situations where there are multiple copies of underlying MonoScripts around...)
So, how are we supposed to set Script Execution Order of scripts that exist in multiple assemblies? What's the correct way to do this?
I am currently testing this in Unity 5.0.4.
Your answer
Follow this Question
Related Questions
Can I use .NET 4.5 assembly as external library? 1 Answer
NotSupportedException while loading an external assembly in WebGL 0 Answers
Dynamic Assembly Plugin 1 Answer
Writing unity ios plugin in Swift 1 Answer
Why does my 32-bit dll plugin(c++) work in Unity 4 and not in Unity 5 indy (Windows 32-bit editor) 0 Answers