Permalink
Browse files

add document directory in search path

  • Loading branch information...
1 parent 29e93d5 commit 00f2ef8c0e40bba745790e4774b44855588cb429 @xlc committed May 17, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 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')

0 comments on commit 00f2ef8

Please sign in to comment.