Search Issue Tracker
Fixed
Votes
5
Found in
4.2.0f4
Issue ID
560137
Regression
No
New scripts are not detected first time when running editor with -batchmode flag
To reproduce:
1) Create new project
2) Create an editor script which would have a static method (for example:
public static void Test() { Debug.Log ("EditorScript"); }
3) Close Unity
4) Make a new script in the Assets folder and also give it a public static method
5) Change the editor script so it would call the newly created method
6) Run Unity in batch mode with following arguments:
Unity -quit -batchmode -projectPath "YourProjectPath" -executeMethod "EditorScript.Test"
7) Notice in Editor.log that it could not find the new method you made
8) Rerun the command
9) Now Editor.log shows it ran everything successfully
Comments (3)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
sparedes
Mar 21, 2016 23:06
This is also happening to us running in batch mode. Please fix!!!
BenHymers
Jan 07, 2016 10:41
This is not fixed.
It's a 100% repro for me. In my case it's on a continuous integration server - any time someone on the team adds or removes source files, the Unity build will fail on the build server. The workaround is to open Unity twice, once to import assets (ignoring the logs and return code completely), and again to run the build. This is far from ideal as it's slow, and loses much of the useful log information from the first import.
I've seen it in various versions from 5.0.1 onwards, up to and including 5.3.1.
There's a related bug in FogBugz here, also reported in August 2013, marked as resolved in May 2015:
https://fogbugz.unity3d.com/default.asp?560137_5p90morai1utgu6o
davisben85
Jul 30, 2015 18:15
This happens with ANY assets that are moved into the Asset directory without going through Unity. We build custom plugins and drop them in, outside of Unity, through build scripts. We then have to open the project in Unity to have it update the assetDatabase and then quit. From there, we can kick off another Unity batchmode process and build the project.