Search Issue Tracker
By Design
Votes
0
Found in
2018.2.11f1
Issue ID
1088653
Regression
No
GetMethods function returns a different value when run in the Editor compared to the equivalent scrip run outside of Unity
Steps to reproduce:
1. Open attached project "New Unity Project (2).zip"
2. In Menu press 'Hello -> TestApi' and Inspect console (Method number is 21)
4. Change Scripting Runtime Version to ".Net 3.5"
5. In Menu press 'Hello -> TestApi' and Inspect console (Method number is 19)
6. Unzip and run "ConsoleApp1.zip" in console:
Windows 10: (Method number is 19)
macOS 10.13.6: (Method number is 22)
Expected result: when script is run in Unity it gives the same result as the equivalent script run outside of the Editor
Actual result: script provides a different result when run in Unity Editor, compared to a script run outside of the Editor
Reproducible: (result is 19) 2017.4.13f1, (result is 21) 2018.1.9f2, 2018.2.12f1, 2018.3.0b5, 2019.1.0a4
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
- Location tooltip in the Viewport of UI Builder window does not update when the UI Document Asset is moved to a different location
- Audio Clip Volume and Avoid Repeating Last fields values cannot be changed in Audio Random Container window
- Setting a variable in the root selector via an imported USS file in a theme does not work
- No character limit when creating a new Scene with excessively long name, Editor can be forced to crash
- URP Decal Projector flickers/glitches when added to Cube or Quad GameObjects as a Component
Resolution Note:
The framework types have different APIs in .NET 3.5 vs 4.6, and user code should not depend on implementation being limited to a specific set of APIs.