2022 Developer Survey is open! Take survey.

Questions tagged [file]

Files are a common resource for storing information on computers and electronic devices.

Filter by
Sorted by
Tagged with
0 votes
0 answers
33 views

Handling problems with file permissions - PhysFS

My game handles all file access through PhysicsFS. (N.B.: PhysicsFS (sometimes called PhysFS) is a file access library, and has nothing to do with game physics; it just handles opening, reading, and ...
user avatar
0 votes
2 answers
1k views

Is there a way to convert built Unity game back into a project?

I accidentally deleted my game. I had been working on it for about 2 months and I accidentally deleted it while cleaning up my files. I am so smh. I have a ton of builds of the game though and since ...
user avatar
  • 145
0 votes
0 answers
51 views

Best way to save screenshots in a game?

I'm making a game, and I'm adding a screenshots feature. Currently I save screenshot files to <Home Directory>/Pictures/MyGame/. However, I'm not sure if ...
user avatar
0 votes
2 answers
390 views

cant add unity scripts to obects "unity_csc.bat not found. Is your Unity installation corrupted?"

I got a new computer and on it I installed unity and signed in etc. when I load it up however and try adding scripts to objects in the scene it doesn't add them and has this error: "cant add ...
user avatar
  • 145
3 votes
3 answers
825 views

Unity Prevent reloading of edited files packages

I had to make a change in the existing Universal Rendering Pipeline's ShadowCaster2D.cs to suit my needs. But every time I reload the project, the file gets reset. ...
user avatar
0 votes
0 answers
32 views

XML Serializer deleting player files

I've been getting reports from my users that sometimes the game isn't saving. I've recently been provided with the game save files from one of these reports and found all the XML files were completely ...
user avatar
  • 2,729
0 votes
1 answer
555 views

How can I import an Excel file in an Unity WebGL game?

Currently, we have a project that runs on Windows and uses an Excel spreadsheet to save/retrive some data/information. Now we want to build that project for WebGL. The problem is that file reading ...
user avatar
2 votes
1 answer
300 views

How to get Unreal find headers needed for my code to work?

I am trying to open a dialog to select files under UE4, using OpenFileDialog. I added this to my build.cs ...
user avatar
0 votes
1 answer
102 views

How big can a background file in Unity be?

I want to start a new 2D top-down project in Unity and want to figure out how to organize my background (one big file or a lot of files joined together). So how big can a background file get in Unity?...
user avatar
  • 142
0 votes
1 answer
562 views

UnityTeams: Files to publish but no Upload button

I am using Unity 2019.2.14f1 to build a game. As I am working with a team, we have decided to use Unity Teams for the collaboration. The project escalated and we ended up having to architecture a ...
user avatar
0 votes
0 answers
55 views

How to extract data from a resource compiler script in c#

I need to know how to extract all data from a resource compiler script to a folder or the desktop. the .res files are compiled and added to an exe file. .res is the file extension. and if that is ...
user avatar
0 votes
1 answer
51 views

Reading text from file changes the text?

I'm currently trying to load a simple text file and filter it by a certain string. In the text file I'm using a new line for each value and sometimes use a "--" to make things easier to read for me ...
user avatar
  • 450
0 votes
1 answer
215 views

LibGDX FileHandle does not delete file

I'm using this line of code to delete a file: if(Gdx.files.local("/files/ids.json").exists()) { Gdx.files.local("/files/ids.json").delete(); } The same code ...
user avatar
  • 17
0 votes
1 answer
80 views

Why are my records duplicated when writing them to a file?

I am writing data to a file every two seconds. I used InvokeRepeating and everything is Ok except that every record is saved 3 times in the file: ...
user avatar
2 votes
1 answer
3k views

Reading a Binary File in Unity

I am trying to display the first two bytes of a binary file as a test. I have the following code. ...
user avatar
0 votes
1 answer
1k views

Where should I store textures for a game?

I am currently creating a game in SFML using C++ and I'm wondering: what is good practise for a location for textures? Should I store it with my project? Or my executable? Or even in something like ...
user avatar
  • 103
0 votes
2 answers
426 views

Cannot find folder when building game to .jar LibGDX

Whenever I run my game from my IntelIJ IDEA the game runs fine. It finds every folder and every asset in there. But whenever I build my game with :desktop:dist and ...
user avatar
  • 113
0 votes
1 answer
24 views

Importing audiofile into Unity3d gets shown after ending playmode

I am working on a game where the user has the possibility to import custom audio tracks that can be listened to during the game. For this I am making use of System.IO.File.Copy method. This works, ...
user avatar
1 vote
0 answers
299 views

Load Unity game launch options from file

I have a need to disable the resolution dialogue when the game launches, but have a config file that will have all of the dialogue options (resolution, quality, monitor (monitor is most important, ...
user avatar
0 votes
1 answer
694 views

Unity3D : Where to put external files?

I want my game to be user-translated friendly.I put .text file to Data folder from where strings will be read. What is Editor alternative for data folder ? Also i know compiler ignore some files, how ...
user avatar
  • 105
0 votes
1 answer
1k views

How to use SDL_RWops and SDL_RWseek to read text files, line by line?

I'm right now looking for alternative ways to read text files on a line-by-line basis, for cross-platform compatibility (Windows / Linux). My current solution is to go look for (or seek out) the ...
user avatar
1 vote
1 answer
2k views

Let player upload text file in-game Unity

How would I create a button for the user to click and be able to upload a text file from his desktop let's say? I'd like to know about both, computer and mobiles.
user avatar
  • 1,217
1 vote
1 answer
1k views

How to make a string[] from the words of a file in Unity?

I have .txt file containing all the English words separated by line breaks. I want to turn them to a string[] so I can easily pick a random one from them. The way I would do that in normal C# is ...
user avatar
1 vote
0 answers
58 views

How do I remove 'playerachievementcache.dat' from my GMS project?

I am working with a GameMaker: Studio project that outputs a file called "playerachievementcache.dat". It isn't used for anything, and I can't seem to remove it from my project. Is it possible that ...
user avatar
1 vote
1 answer
2k views

Import Unity Package Into Specific Folder

Everytime i do import custom unity package file, I alwasy get Messy Folder and files in root of Asset Folder. Any Idea how to solve this ? Many Thanks in advance.....
user avatar
  • 137
0 votes
1 answer
32 views

Errors when calling functions from File class?

When I try something like File.Delete("Assets/a.txt"); it gives me a error saying Unknown identifier: 'File'. In Unity Documentation https://docs.unity3d.com/...
user avatar
  • 175
3 votes
1 answer
4k views

MonoGame "couldn't find a default importer" for .txt file?

I'm trying a solution in MonoGame to create levels from a .txt file, but the pipeline tool fails when trying to build the Content.mgcb correctly: ❌ Skipping HighResolutionContent\Backgrounds\Layer1_0....
user avatar
0 votes
1 answer
226 views

LibGDX search for file types in local file system

I'm building a system that allows users to upload files to LibGDX's local directory to play them in the game. How can I search recursively through the local file system for a specific file type and ...
user avatar
0 votes
1 answer
77 views

Loading settings files better?

I have recently been working on a small game project and decided to implement settings loading at game startup. The problem is that my method seems to be too hard coded and not scalable without having ...
user avatar
  • 87
6 votes
1 answer
154 views

How to implement large data files without using up a lot of space at runtime?

Say I have a bunch of images that I want to use with my game; I want the image files to be external, so overall I have the game's executable and a directory full of images. Let's say there are 100+ ...
user avatar
0 votes
1 answer
232 views

How do you save the rendering of a tiled map to an image?

Im currently using LibGDX and drawing a tiledmap with the OrthogonalTiledMapRenderer. Is there a way to save one rendering and put it into some file as an image? If you know of a method that doesnt ...
user avatar
0 votes
3 answers
217 views

Unity - Where should downloaded level data be stored?

I've been looking around and it appears suggestions are only to store data to UserPrefs, or PersistentDataPath. I intend to have map files streamed to the client on demand, and saved for reuse. ...
user avatar
  • 1
0 votes
1 answer
132 views

AudioSource not working. Empty Exception

I'm trying to load and play an wav file that exists in my Application.dataPath but when the game gets to the line ...
user avatar
1 vote
0 answers
74 views

Unity DirectoryInfo not working in OSX standalone build

So I'm building an application in unity which I hope to use at a market day coming up soon at my school (it's not a game, it's basically like a checkout app, kind of...) Anyway, I'd like to be able to ...
user avatar
  • 2,729
0 votes
0 answers
258 views

Java .dae file loader problem

I am making a COLLADA parser in Java, and I have made a loader that reads a .dae file, and saves it's content in a string. But, when I load a specific file, it doesn't get read correctly. Specifically ...
user avatar
  • 482
0 votes
1 answer
165 views

LibGdx: search through text file without lots of String garbage

I'm reading a text file from Gdx.files.internal in LibGdx. This is essentially streaming a file from a compressed Jar file so random access is not possible. I want ...
user avatar
  • 101
0 votes
1 answer
5k views

How to save variables into a file unity

I've wanted to save progress of my game (i don't have the code , sorry) without using PlayerPrefs. If it's possible ; with UnityEngine.
user avatar
0 votes
1 answer
519 views

How to read a custom binary file made with Adobe air into Unity 3D & C#

I have a custom data file from a project that was authored in actionscript some years ago by another developer. I am porting parts of the project over to Unity 3D. I don't have any documentation for ...
user avatar
  • 101
5 votes
3 answers
16k views

How do i play mp3 files in Unity Standalone?

I am making a game in Unity in which the player can select music files in their hard drive to use them in-game. I use the WWW class to load the sound files, but this only works for OGG, WAV and ...
user avatar
-1 votes
1 answer
2k views

Reading from txt causes null pointer exception [closed]

I'm reading from this text file called beatSheet.txt. A: 100 A: 101 A: 102 A: 103 A: 104 A: 105 A: 117 A: 120 A: 122 A: 126 A: 128 A: 129 A: 130 A: 131 A: 133 A: 138 ...
user avatar
2 votes
1 answer
308 views

How can I get direction or link of file in computer

I want to import an .obj file in my Engine or open some files. To do that I write a link or direction of that file in my computer. Like this ...
user avatar
  • 157
2 votes
1 answer
3k views

In Unity, on an Android device, CaptureScreenshot writing to Phone, but persistentdatapath linking to the external card

I'm using CaptureScreentshot() to get an image. But when I try to access it on an Android device it's giving me: ...
user avatar
  • 177
1 vote
1 answer
924 views

storing game options in java

I'm making a game using java. I'm wondering what would be the best way to store games options (like screen height and width, full screen boolean and many other similar options the user can select) at ...
user avatar
9 votes
6 answers
2k views

Why can't I read .ttf file when running Android configuration?

When running or debugging my game on Android device, I get this error in the logcat: com.badlogic.gdx.utils.GdxRuntimeException: Error reading file: data/fonts/myFont.ttf (Internal) Which is ...
user avatar
1 vote
2 answers
1k views

How to make a function in Haxe that reads content from text file and does something with each line?

How can I make a function in Haxe that reads a line from a text file, prints it/saves it to a variable, and then goes to the next line? My objective is to make the dialogues on a text file, having ...
user avatar
17 votes
4 answers
86k views

How to read a data from text file in unity

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.
user avatar
2 votes
1 answer
161 views

How do I serialise a mesh to a text file?

I'm building a game engine in OpenTK (OpenGL for C#). Is it ossible to take a terrain mesh (in any format) and convert it into a text file (or a really small character-filled file, no more than a few ...
user avatar
-1 votes
1 answer
3k views

How to encode game files or pack to one file like game_data.dat [duplicate]

I am a beginner C++ programmer. I am creating a custom Open Tibia Server and I use the alternative Tibia client (OTClient). I want encode game files (image, sound, lua, etc.) or pack all files into ...
user avatar
0 votes
0 answers
39 views

Loading dynamically created files with XNA

I'm trying to implement a structured save/load functionality so if the user saves, it will take up one of 10 slots, and if the user loads, they would select one of these slots. To do this, I need ...
user avatar
  • 123
34 votes
3 answers
31k views

Which Unreal Engine 4 project files can I ignore in source control?

I want to put an Unreal Engine 4 project under source control with git. (I know the editor has Perforce and Subversion support, but I don't care for those.) What folder and files do I include in the ...
user avatar
  • 2,826