/// <summary> /// Returns the script package path for the currently loaded level /// </summary> /// <returns></returns> public string CurrentScriptDir() { //We can get the path 3 ways. if (ZoneManager.Instance.CurrentGround != null) { return(LuaEngine.MakeMapScriptPath(ZoneManager.Instance.CurrentGround.AssetName)); } else if (ZoneManager.Instance.CurrentMap != null) { return(LuaEngine.MakeDungeonMapScriptPath(ZoneManager.Instance.CurrentMap.AssetName)); } else { throw new Exception("ScriptServices.CurrentScriptDir(): No map lua package currently loaded! And no map currently loaded either! Cannot assemble the current package path!"); } }