The Haxe manual page for compiler usage shows
-r <file>[@name] (or --resource <file>[@name]) Add a named resource file.
What does it mean for it to "add" a named resource file? Add it to what? Is the @name part optional? How can I access this custom name?
The Haxe manual page for compiler usage shows
-r <file>[@name] (or --resource <file>[@name]) Add a named resource file.
What does it mean for it to "add" a named resource file? Add it to what? Is the @name part optional? How can I access this custom name?
Share Improve this question edited Mar 18 at 23:56 DivergentSpaceTimeWanderer asked Mar 18 at 14:19 DivergentSpaceTimeWandererDivergentSpaceTimeWanderer 9,1676 gold badges43 silver badges59 bronze badges1 Answer
Reset to default 1-r
/ --resource
adds resources that are then accessed through haxe.Resource.
So, if you do --resource test.txt
,
you'll be able to do Resource.getString("test.txt")
to retrieve the contents of the resource.
Using @name
allows to override the resource name - if you do --resource test.txt@X
,
you would be accessing it using Resource.getString("X")
instead.