Search Issue Tracker

By Design

Votes

1

Found in

2020.1

2020.2.0b13

2021.1

Issue ID

1296869

Regression

No

UnityWebRequest fails when Managed Stripping Level is enabled

Networking

-

Reproduction steps:
1. Open attached project "TestDownload.zip" and scene "TestUnityWebRequest"
2. In Editor menu, select Tools -> Build Game
3. After the build is complete, open "Test" application in the project's "Player" folder
4. In Player, click on "Test 3" Button
5. In Player, observe console window
6. In Editor menu, set Edit -> Project Settings -> Player -> Other Settings -> Managed Stripping Level to "Medium"
7. Repeat steps 2-5

Expected result: "87730 Success"
Actual result: "0 Success"

Reproducible with: 2020.1.17f1, 2020.2.0f1, 2021.1.0a9
Could not test with: 2018.4.30f1, 2019.4.16f1 (console errors break project)

  1. Resolution Note:

    This happens because using higher stripping settings some overridden method get stripped.
    Adding this attribute to overrides helps:
    https://docs.unity3d.com/ScriptReference/Scripting.PreserveAttribute.html

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.