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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Problem for read line from text file external

Discussion in 'Android' started by Hippiecode, Jun 19, 2015.

  1. Hippiecode

    Hippiecode

    Joined:
    Feb 13, 2012
    Posts:
    110
    hi to all.
    i am trying to read line from .txt file from my external folder in android,but path is not accessable.my code is like this.
    Code (CSharp):
    1. private var stereoValue:String = "";
    2. function Start()
    3. {
    4.   var str1:String = "file:/storage/emulated/0/sdfg.txt";
    5.    var myReader:StreamReader = new StreamReader(str1);
    6.    stereoValue = myReader.ReadLine();
    7. }
    8.  
    9.  
     
  2. Hippiecode

    Hippiecode

    Joined:
    Feb 13, 2012
    Posts:
    110
    problem solved thanks for watch...