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
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
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.