public ConfigData LoadConfigData(string platformDirectory)
        {
            var configFilePath = ResourceStreamingLocation.GetVirtualConfigFullFilePath(platformDirectory);
            var configData     = CocoData.LoadFromJsonFile <ConfigData> (configFilePath) ?? new ConfigData();

            configData.Init();
            return(configData);
        }
        public void SaveConfigData(ConfigData configData, string platformDirectory)
        {
            if (configData == null)
            {
                return;
            }

            var configFilePath = ResourceStreamingLocation.GetVirtualConfigFullFilePath(platformDirectory);

            CocoData.SaveToJsonFile(configData, configFilePath, true);
        }
        public bool CopyConfigToTarget(string targetPlatform)
        {
            var originPath = ResourceStreamingLocation.GetVirtualConfigFullFilePath(targetPlatform);

            if (!File.Exists(originPath))
            {
                return(false);
            }

            var targetPath      = ResourceStreamingLocation.GetConfigFullFilePath(targetPlatform);
            var targetDirectory = Path.GetDirectoryName(targetPath);

            if (targetDirectory == null)
            {
                return(false);
            }
            if (!Directory.Exists(targetDirectory))
            {
                Directory.CreateDirectory(targetDirectory);
            }

            File.Copy(originPath, targetPath, true);
            return(true);
        }