I have a following function in my scene, which scans directories for files of specified format.
func list_files_in_directory(path , type):
var files = 
var dir = Directory.new()
var file = dir.get_next()
if file == "":
elif not file.begins_with("."):
Will return this:
[goodluck.wav, laugh.wav, missing.wav, noise.wav, takeout.wav]
Which is correct. Such directory as "res://audio" has exactly 5 .wav files. (It excepts .import files, so everything works as intended)
The problem comes out when I export the project as .exe on Windows.
Without changing anything in code, after opening this scene, function returns value with empty array i.e
Am I missing something ?
I tried defining it within both _ready() and _process() functions, neither of them return expected value.
Godot version: Godotv3.0.6-stablewin64