Questions tagged [file]
Files are a common resource for storing information on computers and electronic devices.
88
questions
0
votes
0
answers
39
views
Only first line/column of level text file gets loaded into tile map
I'm trying to make a map using a text file, but it only does the first line / column and not the rest.
I know the problem is in getTileImage.
...
0
votes
1
answer
62
views
Persistent save value, event after deleting savefile
Now, I now the title is really obscure, but I have tried to solve the following problem for so long and most of it is integrated into my game so far that I can't just copy & paste it here, so this ...
0
votes
1
answer
90
views
Problem with JSON ScriptableObject saving using NewtonSoft JSON
I am saving a list of ScriptableObjects in a JSON file using NewtonSoft JSON, the problem being that the following error message is thrown when it tries to save:
<...
0
votes
0
answers
27
views
Fortnite files structure - how to find quest description?
Fortnite files can be discovered with FModel. This is unreal engine project.
I would like to understand how it works.
For ex., I found the following record at AssetRegistry.json:
...
2
votes
1
answer
181
views
How to store localized text data in Unity?
I need to create a lot of read-only text data. As far as I know storing a lot of data directly in the script is not good, so I need to create a separate json file with ready-made data to load in the ...
0
votes
0
answers
48
views
How to automaticaly assign textures based on their name to a Dictionary<T,Texture>
I have a state machine that the controls the flows and transitions of the states, the thing is that I have a script that requires textures to transition to in-between scripts, what I want to do is to ...
0
votes
0
answers
36
views
Continuously reading sensor data from a file
I'm working on a game/app used for relaxing, which is measuring pulse and using it to adjust the world (grow or decrease some trees etc.)
I have already found an app for connecting a Fit Band to a PC ...
-2
votes
2
answers
287
views
Why are sound files always larger in size than an image file?
I am making 2D games. I noticed that PNG files are always much smaller in size than a second-long sound effect file. Why are sound files always larger in size than an image file?
0
votes
0
answers
81
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 ...
2
votes
2
answers
8k
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 ...
0
votes
0
answers
69
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 ...
0
votes
2
answers
646
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 ...
2
votes
3
answers
1k
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. ...
0
votes
0
answers
39
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 ...
0
votes
1
answer
853
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 ...
2
votes
1
answer
859
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
...
0
votes
1
answer
142
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?...
0
votes
1
answer
591
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 ...
0
votes
0
answers
100
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 ...
0
votes
1
answer
58
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 ...
0
votes
1
answer
262
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 ...
0
votes
1
answer
81
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:
...
2
votes
1
answer
4k
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.
...
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 ...
0
votes
2
answers
550
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 ...
0
votes
1
answer
26
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, ...
1
vote
0
answers
360
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, ...
0
votes
1
answer
943
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 ...
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 ...
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.
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 ...
1
vote
0
answers
60
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 ...
3
votes
1
answer
3k
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.....
0
votes
1
answer
34
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/...
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....
0
votes
1
answer
285
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 ...
0
votes
1
answer
81
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 ...
6
votes
1
answer
162
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+ ...
0
votes
1
answer
252
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 ...
0
votes
3
answers
293
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. ...
0
votes
1
answer
134
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 ...
1
vote
0
answers
75
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 ...
0
votes
0
answers
299
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 ...
0
votes
1
answer
189
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 ...
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.
0
votes
1
answer
580
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 ...
6
votes
3
answers
17k
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 ...
-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
...
2
votes
1
answer
330
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
...
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:
...