/// <summary>
 /// Destroys the given binding
 /// </summary>
 /// <param name="binding">Binding</param>
 void DestroyBindingInternal(MLContentBinding binding)
 {
     if (binding != null)
     {
         MLPersistentStore.DeleteBinding(binding);
     }
 }
示例#2
0
 /// <summary>
 /// Destroys the given binding
 /// </summary>
 /// <param name="binding">Binding</param>
 void DestroyBindingInternal(MLContentBinding binding)
 {
     if (binding != null)
     {
         NotifyChangeOfStatus(Status.BINDING_DESTROYED, MLResult.ResultOk);
         MLPersistentStore.DeleteBinding(binding);
     }
 }
示例#3
0
 /// <summary>
 /// Handler for binding restore
 /// </summary>
 /// <param name="contentBinding">Content binding.</param>
 /// <param name="resultCode">Result code.</param>
 void HandleBindingRestore(MLContentBinding contentBinding, MLResult result)
 {
     _state = State.BindingComplete;
     Debug.Log("binding result : " + contentBinding.PCF.CurrentResult);
     if (!result.IsOk)
     {
         MLPersistentStore.DeleteBinding(contentBinding);
         Debug.LogFormat("Failed to restore : {0} - {1}. Result code:", gameObject.name, contentBinding.PCF.CFUID, result.Code);
     }
 }
示例#4
0
 /// <summary>
 /// Handler for binding restore
 /// </summary>
 /// <param name="contentBinding">Content binding.</param>
 /// <param name="resultCode">Result code.</param>
 void HandleBindingRestore(MLContentBinding contentBinding, MLResult result)
 {
     if (!result.IsOk)
     {
         if (NumRetriesForRestore > 0)
         {
             NumRetriesForRestore--;
             Debug.LogWarningFormat("Failed to restore: {0} - {1}. Retries left: {2}. Result Code: {3}",
                                    gameObject.name, contentBinding.PCF.CFUID, NumRetriesForRestore, result);
             StartCoroutine(TryRestore());
         }
         else
         {
             Debug.LogErrorFormat("Failed to restore : {0} - {1}. Deleting Binding. Result code: {2}",
                                  gameObject.name, contentBinding.PCF.CFUID, result);
             MLPersistentStore.DeleteBinding(contentBinding);
             SetComplete(false);
         }
     }
     else
     {
         SetComplete(true);
     }
 }
 /// <summary>
 /// Destroys the binding
 /// Note: Game Object is still alive. It is the responsibility
 /// of the caller to deal with the Game Object
 /// </summary>
 public void DestroyBinding()
 {
     MLPersistentStore.DeleteBinding(Binding);
 }