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
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
- Previously deleted “DefaultLookDevProfile“ is present when upgrading the Editor version
- [Ubuntu] UI text and buttons are missing spaces in Unity Version Control > New Workspace window
- "Inherit attribute is not supported" warning is shown but attributes are available in VFX Graph Output and Update blocks
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.