About 399 results
Open links in new tab
  1. c# - How to read a data from text file in unity - Game …

    Oct 13, 2014 · Can anybody help me out with giving the steps needed for reading data from the text file in unity and how can the script be added.

  2. c# - unity: read from text file to instantiate objects - Game ...

    Jul 12, 2018 · I'm trying to use the following code to read a text file stored in the Resources folder or in a file on my computer, and instantiate objects in a Unity 3D scene accordingly.

  3. c# - Where should I put a JSON file to be readable in a Unity build ...

    Sep 11, 2022 · Can you tell us anything about the type of the file? If it's a text or binary file you want to read as strings or bytes, it might be best to set it up as a TextAsset, so you can store a …

  4. c# - Reading data from files in Unity on Android - Game …

    May 26, 2019 · I have successfully read in and written level data using .dat files on unity PC builds, but compiling for android stops me from being able to read in information from the …

  5. c# - MonoGame "couldn't find a default importer" for .txt file?

    Jun 12, 2017 · It has predefined content importers for most standard audio and image formats that will import the file, process it into an object, and then write the object into a binary .xnb file. At …

  6. How do I write to a text file in Update function of a script? [Unity|C#]

    Jun 21, 2016 · I have a Unity C# Script which updates a variable each time the Update function is called. I would like to know how to write to a file from the update function.

  7. How can I load a text file from Content? - Game Development …

    Basically set "Content" and "Copy if newer". The exception you are getting, MethodAccessException, is because that API isn't available on WP7. Use Title Storage …

  8. unity & c# - File.ReadAllLines () vs TextAsset Split ('\n')

    Mar 9, 2018 · The File.ReadAllLines () version works on the path to the txt file, the string.Split () version works on the TextAsset.text and the TextAsset is passed through the inspector as …

  9. c# - How to make a string [] from the words of a file in Unity?

    The way I would do that in normal C# is the File.ReadAllLines (path) function in the System.IO namespace. But, I don't think that I can use System.IO with Unity so the alternative that I could …

  10. unity - How to save a text file to relative Path - Game …

    Nov 19, 2016 · At this moment I'm saving a file that is set to a specific path. c:\test\test.exe. Now I know that Android and IOS don't have such directory. I was wondering if it was possible to …