/// <summary> /// Get application external data path (read & write) /// Path ends with '/' /// </summary> /// <returns></returns> public static string GetExternalDataPath() { if (m_externalDataPath == null) { if (Application.isEditor) { m_externalDataPath = dataPath; } else if (Application.isMobilePlatform || Application.isConsolePlatform) { #if UNITY_ANDROID m_externalDataPath = SDKManager.CallAliya <string>("GetExternalDataPath", "kzwg"); if (string.IsNullOrEmpty(m_externalDataPath)) #endif m_externalDataPath = Application.persistentDataPath; } else { m_externalDataPath = Application.dataPath; // For standalone player. } m_externalDataPath = m_externalDataPath.Replace("\\", "/"); if (!m_externalDataPath.EndsWith("/")) { m_externalDataPath += "/"; } Logger.LogInfo("External data path set to: <color=#00DDFF><b>{0}</b></color>", m_externalDataPath); } return(m_externalDataPath); }