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. Dismiss Notice

How to raed a .dat file in Unity ?

Discussion in 'Editor & General Support' started by DASARADHI, May 26, 2010.

  1. DASARADHI

    DASARADHI

    Joined:
    Jul 2, 2009
    Posts:
    65
    Hi All ,
    How to read a .dat file using java script or c# script ?

    Thanks
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you would use System.IO to read the file data and then parse them as you want to. Dat is no format, its just a "binary data container" and the format depends on where the dat came from.

    remember that you can read files from local file system only with standalone applications, not webplayer

    System.IO is no unity feature but a .NET / mono thing. So for documentation on it, please check go-mono or MSDN
     
  3. schetty

    schetty

    Joined:
    Jul 23, 2012
    Posts:
    424
    i saved my encrypted file in .dat, when i run it on my editor its working fine, but after export to the android and run it on my device its not working.
    What is the issue?