Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add document directory in search path

  • Loading branch information...
commit 00f2ef8c0e40bba745790e4774b44855588cb429 1 parent 29e93d5
@xlc authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  CocosLua/Scripts/init.lua
View
3  CocosLua/Scripts/init.lua
@@ -1,4 +1,7 @@
require 'cocos2d'
require 'LuaScene'
+-- also search scripts in document directory
+package.path = package.path .. NSDocumentDirectory .. "/Scripts/?.lua;" .. NSDocumentDirectory .. "/Scripts/?/init.lua"
+
print('loaded')
Please sign in to comment.
Something went wrong with that request. Please try again.