Difference between revisions of "Loading Order of Lua Files"
From GiderosMobile
(added example) |
(added some more explanations) |
||
Line 10: | Line 10: | ||
--!NEEDS:your_file.lua | --!NEEDS:your_file.lua | ||
</source> | </source> | ||
+ | |||
+ | '''PS: the path is relative to the file in which you call --!NEEDS:''' | ||
+ | |||
This will tell Gideros to load '''your_file.lua''' before the file containing the above code. | This will tell Gideros to load '''your_file.lua''' before the file containing the above code. |
Revision as of 06:54, 26 September 2020
Supported platforms:
Available since: Gideros 2020.5
Description
You can now implement Gideros Code Dependency by code instead of Gideros project setting.
--!NEEDS:your_file.lua
PS: the path is relative to the file in which you call --!NEEDS:
This will tell Gideros to load your_file.lua before the file containing the above code.
To tell Gideros the file should not be executed/parsed right on start but will be loaded through a require or a loadfile command, you can write:
--!NOEXEC
This is very useful if you develop a Lua library that is meant to be used in several projects.
Example
--!NEEDS:luashader/luashader.lua
local function makeEffect(name,vshader,fshader)
...
end
See also
Methods |
EventsConstants |