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
43 views

How to import files that are not included in the project by checking that they do not exist?

I want to check whether the files exist, as in the window that opens when importing asset from Package Manager, and copy them into the ...
Atlas's user avatar
  • 13
0 votes
0 answers
10 views

Unreal Engine FDirectoryWatcherModule catching multiple events per file operation

I followed this post to implement a delegate on a directory that notifies me when a change has happened (add file, delete file or remove file). This works fine, though the issue is that for each ...
afarre's user avatar
  • 111
0 votes
0 answers
50 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. ...
Nobodyis_here's user avatar
0 votes
1 answer
66 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 ...
Felix193's user avatar
0 votes
1 answer
277 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: <...
Felix193's user avatar
0 votes
0 answers
64 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: ...
LA_'s user avatar
  • 101
2 votes
1 answer
361 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 ...
Silz's user avatar
  • 37
0 votes
0 answers
55 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 ...
koogel's user avatar
  • 79
-2 votes
2 answers
488 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?
Đạt Phạm's user avatar
0 votes
0 answers
100 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 ...
Trevor Powell's user avatar
2 votes
2 answers
11k 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 ...
Object's user avatar
  • 289
0 votes
0 answers
74 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
674 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 ...
Object's user avatar
  • 289
2 votes
3 answers
2k 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. ...
CraftedGaming's user avatar
0 votes
0 answers
43 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 ...
mr-matt's user avatar
  • 2,759
0 votes
1 answer
926 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 ...
Muhammad Faizan Khan's user avatar
2 votes
1 answer
1k 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 ...
formatc2013's user avatar
0 votes
1 answer
154 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?...
Gener4tor's user avatar
  • 176
0 votes
1 answer
594 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 ...
Gonçalo Peres's user avatar
0 votes
0 answers
118 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 ...
easyanswer's user avatar
0 votes
1 answer
61 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 ...
iQew's user avatar
  • 470
0 votes
1 answer
282 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 ...
xmac's user avatar
  • 17
0 votes
1 answer
83 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: ...
J. Dois's user avatar
2 votes
1 answer
5k 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. ...
StackingofOverflows's user avatar
0 votes
1 answer
2k 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 ...
Lorago's user avatar
  • 103
0 votes
2 answers
631 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 ...
Martacus's user avatar
  • 113
0 votes
1 answer
34 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, ...
ploopploop's user avatar
1 vote
0 answers
388 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, ...
Paul Vinogradov's user avatar
0 votes
1 answer
983 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 ...
Jacob's user avatar
  • 105
0 votes
1 answer
2k 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 ...
tom_mai78101's 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.
John Smith's user avatar
  • 1,255
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 ...
xuwenbuwer's user avatar
1 vote
0 answers
61 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 ...
Mr. Mendelli's user avatar
3 votes
1 answer
4k 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.....
questionasker's user avatar
0 votes
1 answer
36 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/...
coder_86's user avatar
  • 175
3 votes
1 answer
5k 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....
Salinator's user avatar
0 votes
1 answer
305 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 ...
Tessa Painter's user avatar
0 votes
1 answer
82 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
6 votes
1 answer
168 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+ ...
SmileyNZ's user avatar
0 votes
1 answer
260 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 ...
zebleckDAMM's user avatar
0 votes
3 answers
322 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. ...
Dean's user avatar
  • 1
0 votes
1 answer
136 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 ...
Raphael Rosa's user avatar
1 vote
0 answers
77 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 ...
mr-matt's user avatar
  • 2,759
0 votes
0 answers
304 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 ...
J22o's user avatar
  • 482
0 votes
1 answer
195 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 ...
codeulike's 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.
jeuxjeux20's user avatar
0 votes
1 answer
608 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 ...
M. Bedi's user avatar
  • 101
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 ...
TheBITLINK's 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 ...
Matthew Farstad's user avatar
2 votes
1 answer
339 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 ...
harut9's user avatar
  • 157