Example #1
0
 /// <summary>
 /// Calls character updated and/or created events.
 /// </summary>
 public void FireUpdatedEvent(bool cancelled)
 {
     this.cancelled = cancelled;
     if (!this.cancelled && !isOfficiallyCreated)
     {
         isOfficiallyCreated = true;
         if (CharacterCreated != null)
         {
             CharacterCreated.Invoke(this);
         }
     }
     if (CharacterUpdated != null)
     {
         CharacterUpdated.Invoke(this);
     }
     dirty = false;
 }
Example #2
0
 void OnDestroy()
 {
     if (isOfficiallyCreated)
     {
         if (CharacterDestroyed != null)
         {
             CharacterDestroyed.Invoke(this);
         }
         isOfficiallyCreated = false;
     }
     if (umaRoot != null)
     {
         CleanTextures();
         CleanMesh(true);
         CleanAvatar();
         Destroy(umaRoot);
     }
 }
Example #3
0
 void OnDestroy()
 {
     if (isOfficiallyCreated)
     {
         if (CharacterDestroyed != null)
         {
             CharacterDestroyed.Invoke(this);
         }
         isOfficiallyCreated = false;
     }
     if (_hasUpdatedBefore)
     {
         cleanTextures();
         if (!onQuit)
         {
             cleanMesh(true);
             cleanAvatar();
         }
     }
 }