Esempio n. 1
0
        public void CleanUp(GameObject go)
        {
            Renderer component = go.GetComponent <Renderer>();

            if (component != null)
            {
                ComponentExtensions.DestroyIfInstance(component.sharedMaterial);
                if (MeshDef != null)
                {
                    MeshDef.CleanUp(go);
                }
            }
        }
Esempio n. 2
0
 protected override void cleanup()
 {
     meshDef.CleanUp(base.gameObject);
     ComponentExtensions.DestroyIfInstance(rend.sharedMaterial);
     rend.enabled = false;
     if (partsRequest != null)
     {
         outfitService.Unload(partsRequest);
         partsRequest = null;
     }
     if (decalsRequest != null)
     {
         outfitService.Unload(decalsRequest);
         decalsRequest = null;
     }
     combineRequest = null;
 }