function init(self)
local path = sys.get_application_path()
print(path)
local f = io.open(path .. "/text.txt", "rb")
local txt, err = f:read("*a")
if not txt then
print(err)
return
end
print(txt)
end
Scripts throws error, there is not file like this.
There also image is here with 1mb size, if i bundle project into web build and investigate /archive folder there is no files at this size, they all below 37kb, which means resource bundle not inculded.
The platform names or common must be subfolders of the bundled resource folder. So you must create a folder res (or another name), and then put the folder common into that (or platform names). And use res as the bundle resource folder in game.project.
For example, if you use:
res/common/a.txt
then a.txt will be bundled on all platforms.
When you use
res/win32/a.txt
res/android/b.txt
then a.txt will be bundled on Windows, and b.txt on Android.
When you use other folders or no subfolders like
res/a.txt
res/something/b.txt
then both will be ignored, because they are not platform names.