Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Is anyone having trouble creating TextAssets?

Discussion in 'Windows' started by Zapgun, Dec 4, 2015.

  1. Zapgun

    Zapgun

    Joined:
    Jun 3, 2011
    Posts:
    48
    Not sure if its the latest patch, but under windows 10-64 Unity doesn't seem to recognize any of the default TextAsset types. They all open up in their default applications (Notepad, iExplorer, etc) and I can't drag them into any TextAsset properties in the inspector. Is this a bug?
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    2,892
    Could you do a screen cast of the problem? And which Unity version is this?
     
  3. Zapgun

    Zapgun

    Joined:
    Jun 3, 2011
    Posts:
    48
    I'm using the latest version.. I built a brand new project and its working again.. not sure what's up with the old one.
     
  4. Zapgun

    Zapgun

    Joined:
    Jun 3, 2011
    Posts:
    48
    Aha.. OK .. open up Unity 5.2.3f1, create a StreamingAssets folder, create a new test.html file in it.. boom.. problem occurs.
     
  5. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    2,892
    I think that's by design.
     
  6. Zapgun

    Zapgun

    Joined:
    Jun 3, 2011
    Posts:
    48
    An.. odd design.. wouldn't it be more functional for me to be able to have a text assets in that folder? I am sure I can handle writing my own if (null) statement to handle exceptions.
     
  7. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    2,892
    If you have an asset there, the only way to load it, is to use general file loading functions, like File.ReadAllText, etc.

    StreamingAssets is a special folder, which is copied to destination folder without any modifications from Unity.
     
unityunity