Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

TextAsset.bytes is broken in Unity 2019.2.1f1

Discussion in 'Scripting' started by IJM, Aug 19, 2019.

  1. IJM


    Aug 31, 2010
    I just upgraded from Unity 2018 to 2019, and TextAsset.bytes is not working correctly.
    I've tested it against System.IO.File.ReadAllBytes, and it returns a wrong number of bytes.

    In a case of test file it's 35153 bytes for System.IO.File.ReadAllBytes and Windows Explorer, but Unity TextAsset.bytes returns 40558 bytes from the same file.

    Any ideas why is this broken?
    Last edited: Aug 19, 2019
  2. Baste


    Jan 24, 2013
    The docs says:

    So that's probably what's happening.