Assets/Watson/Scripts/Services/RetrieveAndRank/RetrieveAndRank.cs
/// <summary>
/// Saves the config zip to the file system.
/// </summary>
/// <param name="callback"></param>
/// <param name="configData">Byte array of the config data.</param>
/// <param name="configFileName">Where to save the zip file in the file system.</param>
/// <param name="customData"></param>
Saves the config zip to the file system.
Saves the config zip to the file system .
public void SaveConfig(OnSaveClusterConfig callback, byte[] configData, string configFileName, string customData)
        {
            bool success = true;
            if(configData != null)
            {
                try
                {
                    if (SaveFile != null)
                        SaveFile(configFileName, configData);
                    else
                    {
#if !UNITY_WEBPLAYER
                        File.WriteAllBytes(configFileName, configData);
#endif
                    }
                }
                catch (Exception e)
                {
                    success = false;
                    Log.Error("RetrieveAndRank", "Caught exception: {0}", e.ToString());
                }
            }
            if (callback != null)
                callback(success, customData);
        }
public void SaveConfig ( OnSaveClusterConfig callback , byte [ ] configData , string configFileName , string customData ) { bool success = true ; if ( configData != null ) { try { if ( SaveFile != null ) SaveFile ( configFileName , configData ) ; else { if ! UNITY_WEBPLAYER File . WriteAllBytes ( configFileName , configData ) ; endif } } catch ( Exception e ) { success = false ; Log . Error ( " " , " " , e . ToString ( ) ) ; } } if ( callback != null ) callback ( success , customData ) ; }
Saves the config zip to the file system.
Saves the config zip to the file system .
callback
OnSaveClusterConfig
None
configData
byte[]
Byte array of the config data.
Byte array of the config data .
configFileName
string
None
customData
string
None