Skip to content

Commit

Permalink
修复IOS上面加载luabundle大小写问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
jarjin committed Mar 12, 2016
1 parent c3c0c0e commit 71e0fe7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Assets/LuaFramework/Scripts/Common/LuaLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public LuaLoader() {
/// </summary>
/// <param name="bundle"></param>
public void AddBundle(string bundleName) {
string url = Util.DataPath +bundleName;
string url = Util.DataPath + bundleName.ToLower(); ;
if (File.Exists(url)) {
AssetBundle bundle = AssetBundle.CreateFromFile(url);
if (bundle != null)
Expand Down
2 changes: 1 addition & 1 deletion Assets/LuaFramework/Scripts/ConstDefine/AppConst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class AppConst {
/// </summary>
public const bool UpdateMode = false; //更新模式-默认关闭
public const bool LuaByteMode = false; //Lua字节码模式-默认关闭
public const bool LuaBundleMode = false; //Lua代码AssetBundle模式-默认关闭
public const bool LuaBundleMode = true; //Lua代码AssetBundle模式-默认关闭

public const int TimerInterval = 1;
public const int GameFrameRate = 30; //游戏帧频
Expand Down
6 changes: 3 additions & 3 deletions Assets/LuaFramework/ToLua/Editor/ToLuaMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -667,10 +667,10 @@ static void BuildLuaBundle(string dir)
string path = "Assets/" + AppConst.LuaTempDir + dir;
string[] files = Directory.GetFiles(path, "*.lua.bytes");
List<Object> list = new List<Object>();
string bundleName = "Lua.unity3d";
string bundleName = "lua.unity3d";
if (dir != null) {
dir = dir.Replace('\\', '_').Replace('/', '_');
bundleName = "Lua_" + dir + AppConst.ExtName;
bundleName = "lua_" + dir.ToLower() + AppConst.ExtName;
}
for (int i = 0; i < files.Length; i++)
{
Expand Down Expand Up @@ -842,7 +842,7 @@ public static void CopyLuaFilesToPersistent()
public static void BuildNotJitBundles()
{
ClearAllLuaFiles();
CreateStreamDir("Lua/");
CreateStreamDir("lua/");
CreateStreamDir(AppConst.LuaTempDir);

string dir = Application.persistentDataPath;
Expand Down
1 change: 1 addition & 0 deletions ReadMe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ tolua#底层库 https://github.com/topameng/tolua_runtime

//-------------2016-03-12-------------
(1)修复LuaLoop协同功能。
(2)修复IOS上面加载luabundle大小写问题。

//-------------2016-03-06-------------
(1)更新tolua #到1.03版本
Expand Down

0 comments on commit 71e0fe7

Please sign in to comment.