Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | lee1121 |
In Unity you can create a directory called StreamingAssets. When exporting it will just copy-paste this directory, without packaging/serializing it, allowing XML-files to remain readable and editable in the exported game. I wish to do the same thing in Godot, but have been unable to find an option to do so.
So my question is: is it possible to create the same functionality of Unity’s StreamingAssets in Godot?
SOLUTION: Unfortunately I haven’t found a way to do this using Godot. However I did find a way to emulate it using a batch file.
For reference, I have my bat-file located on D:\Godot_v3.1-stable_mono_win64\Projects\Wargame, my game project is in D:\Godot_v3.1-stable_mono_win64\Projects\Wargame\Wargame.
This is the content of my bat-file:
set mypath=%~dp0
set godot=D:\\Godot_v3.1-stable_mono_win64\\Godot_v3.1-stable_mono_win64.exe
set exportsDir=D:\\Godot_v3.1-stable_mono_win64\\Projects\\Wargame\\Exports
set windowsDir=%exportsDir%\\Windows
set linuxDir=%exportsDir%\\Linux
cd Wargame
%godot% --export "Windows Desktop" %windowsDir%\\Wargame.exe
%godot% --export "Linux/X11" %linuxDir%\\Wargame.exe
rmdir /Q /S %windowsDir%\\StreamingAssets
rmdir /Q /S %linuxDir%\\StreamingAssets
xcopy StreamingAssets %windowsDir%\\StreamingAssets /I /Y /E /H
xcopy StreamingAssets %linuxDir%\\StreamingAssets /I /Y /E /H
cd %mypath%