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
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
- "Assertion failed on expression" error occurs when multiple Animation Components are instantiated after changing the Culling Type
- MacOS persistentDataPath uses old path when built compared to Editor Play mode
- Crash on RaiseException when entering Play Mode in a specific project
- Debug Console does not reappear when disabling and re-enabling Debug.developerConsoleEnabled
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.