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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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.