public void RebakeAppearance(Action <string> logOutput = null) { lock (m_DataLock) { if (m_BakeCache == null) { m_BakeCache = new BakeCache(AssetService); } } try { m_BakeCache.LoadFromCurrentOutfit(Owner, InventoryService, AssetService, logOutput); Appearance = m_BakeCache.Bake(SceneAssetService, logOutput); #if DEBUG logOutput?.Invoke(string.Format("Appearance for {0} at version {1}", Owner.ToString(), Appearance.Serial)); #endif } catch (AlreadyBakedException) { /* ignore exception */ } catch (Exception e) { m_Log.Error("Rebake appearance failed for " + Owner.ToString(), e); } }
protected override AppearanceInfo RunBake() { m_Log.Info("Setup baking"); var bakeCache = new BakeCache(m_AssetService); bakeCache.LoadFromCurrentOutfit(m_AgentOwner, m_InventoryService, m_AssetService, m_Log.Info); m_Log.Info("Run baking"); return(bakeCache.Bake(m_AssetService, m_Log.Info)); }