Search Issue Tracker
Won't Fix
Votes
0
Found in
5.6.0f3
Issue ID
908821
Regression
No
[API Updater] Obsolete code located under #else in "#if UNITY_EDITOR" preprocessor directive region does not get updated
Steps to reproduce:
1. Open the attached project
2. API updater should pop up. Do the API update.
3. Try building Scene "scene.unity" to any platform
4. Observe the error
Expected results: obsolete script gets fixed by Unity API updater on build.
Actual results: obsolete script located in "#else" bracket of "#if UNITY_EDITOR" preprocessor directive does not get updated, thus compile error is thrown.
Reproduced on: 5.4.5p1, 5.5.3p2, 5.6.1f1, 2017.1.0b4
------------------------------------------------------------------------------------
There are 2 different issues here:
1) APIUpdater taking Editor parameters for compilation (symbols, references, etc) regardless of which target is selected
2) Some members exist only in the Editor version of UnityEngine.dll causing updates to be skipped when the updater run during a player build.
We've fixed issue 1, meaning, that most code guarded by "#if !UNITY_EDITOR" as well code in the "else" branch of an "#if UNITY_EDITOR" will now be processed by the APIUpdater
Fixing 2 is not possible since it would require us to reintroduce these members which has a high potential of causing name clashes to a high number of developers; after considering the pros/cons of doing that we decided to not fix it. We apologize for the inconvenience.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on PrepareDrawShadowsCommandStep1 when entering the Play Mode in a specific project
- Physics Layer Collision Matrix's Layer names, checkboxes and hover highlights become misaligned when the Editor's UI Scaling gets changed
- Light/shadow information on an edge of a Terrain tile creates a seam with an adjacent Terrain tile when baking a LightMap
- "Missing types referenced from component UniversalRenderPipelineGlobalSettings on game object UniversalRenderPipelineGlobalSettings..." warning is thrown after switching the Platform to tvOS
- “Metal: Error creating pipeline state (Universal Render Pipeline/2D/Sprite-Lit-Default): Vertex attribute BLENDINDICES0(5) of type uint4 cannot be read using MTLAttributeFormatFloat2 (null)“ when setting GPU Skinning to GPU after opening the project
Add comment