Search Issue Tracker
Fixed in 2020.1.X
TextAsset.bytes returns different bytes with different file extensions
1. Open project in "TextTest.zip"
2. In "TextAssetTest.cs" the test will compare bytes of 2 identical files (text wise) but with different extensions (".txt", ".bytes")
3. Open Test Runner window (Window -> General -> Test Runner)
4. Click "Run All"
Expected result: test will not fail
Actual result: test fails
Reproducible with: 2019.2.12f1, 2019.3.0b10, 2020.1a12
Not reproducible with: 2017.4.33f1, 2018.4.12f1, 2019.2.0a5
1. TextAsset.bytes documentation implies that for getting bytes of a file, it needs to have the extension ".bytes". Even though documentation is the same for all versions, the behavior is different
2. Only some characters in files cause the issue, such as 'š', 'ž', for example. Otherwise, test results with .txt and .bytes extensions will be the same
3. Test is defined in "TextTestAsset.cs"
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- NullReferenceExceptions are being thrown when saving a ScriptableObject with an array of a type with a CustomPropertyDrawer that uses TrackPropertyValue
- Applied velocity is inconsistent when using Rigidbody AddForce() with ForceMode.VelocityChange
- Crash on AudioUtil_CUSTOM_HasAudioCallback when exiting Play Mode while the Inspector is displaying a GameObject with an empty script attached
- Scroll offset is framerate-dependent when scrolling with velocity in the Device Simulator
- "Object.FindObjectsOfType<T>() is obsolete" warning is thrown when using "Transitions Plus" asset