public void LateUpdate() { if (modelDirty && !base.IsBusy) { modelDirty = false; startWork(); cleanup(); partViews.Clear(); List <KeyValuePair <TypedAssetContentKey <Texture2D>, Action <Texture2D> > > content = new List <KeyValuePair <TypedAssetContentKey <Texture2D>, Action <Texture2D> > >(); decalsRequest = outfitService.Load(content, outfitService.DecalCache); } }
private void cleanup() { partView.CleanUp(base.gameObject); if (eqRequest != null) { loadingService.Unload(eqRequest); eqRequest = null; } if (decalRequest != null) { loadingService.Unload(decalRequest); decalRequest = null; } }
public void Update() { if (combineRequest == null) { if (partsRequest == null || !partsRequest.Finished || decalsRequest == null || !decalsRequest.Finished) { } } else if (combineRequest.Finished) { outfitService.Unload(partsRequest); partsRequest = null; outfitService.Unload(decalsRequest); decalsRequest = null; setupRenderer(); combineRequest = null; stopWork(); } }