Пример #1
0
    public static void CreateLuaFileWatcher(LuaEnv luaEnv)
    {
        var scriptPath = Path.Combine(Application.dataPath, PrePath);

        DirectoryWatcher.CreateWatch(scriptPath, new FileSystemEventHandler(OnLuaFileChanged));
        _reloadFunction           = luaEnv.Global.Get <ReloadDelegate>("hotfix");
        EditorApplication.update -= Reload;
        EditorApplication.update += Reload;
    }