Skip to content

版本的两个错误的地方 #52

@KervenGame

Description

@KervenGame

这个版本应该有两个错误的地方:
1.资源热更新不成功,Util.cs中GetRelativePath方法原来是
public static string GetRelativePath() { if (Application.isEditor) return "file://" + System.Environment.CurrentDirectory.Replace("\\", "/") + "/Assets/" + AppConst.AssetDir + "/"; else if (Application.isMobilePlatform || Application.isConsolePlatform) return "file:///" + DataPath; else // For standalone player. return "file://" + Application.streamingAssetsPath + "/"; }
应该改为如下:
public static string GetRelativePath() { if (AppConst.UpdateMode) { return "file:///" + DataPath; } if (Application.isEditor) return "file://" + System.Environment.CurrentDirectory.Replace("\\", "/") + "/Assets/" + AppConst.AssetDir + "/"; else if (Application.isMobilePlatform || Application.isConsolePlatform) return "file:///" + DataPath; else // For standalone player. return "file://" + Application.streamingAssetsPath + "/"; }
2.打开更新模式和不以ab方式读取时,路径出错
public const bool UpdateMode = false; //更新模式-默认关闭
public const bool LuaByteMode = false; //Lua字节码模式-默认关闭
public const bool LuaBundleMode = false; //Lua代码AssetBundle模式
//LuaBundleMode修改为false,这样代码文件便不会以AssetBundle模式读取,会直接生效,以方便调试。
LuaConst.cs中,lua逻辑代码目录改为如下:
//public static string luaDir = Application.dataPath + "/Lua"; //lua逻辑代码目录
public static string luaDir = Application.dataPath + "/LuaFramework/Lua";
===》》》初次提issues,如有误请多见谅。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions