public void LoadDataComponents() { RaiseOnLoading(); if (SyncLayer.AutoRegisterGameEvents) { SyncLayer.RegisterGameEvents(); } Sync.Clients.SetLocalSteamId(Sync.MyId, createLocalClient: !(MyMultiplayer.Static is MyMultiplayerClient)); Sync.Players.RegisterEvents(); SetAsNotReady(); HashSet <MySessionComponentBase> processedComponents = new HashSet <MySessionComponentBase>(); do { m_sessionComponents.ApplyChanges(); foreach (var comp in m_sessionComponents.Values) { if (processedComponents.Contains(comp)) { continue; } LoadComponent(comp); processedComponents.Add(comp); } } while (m_sessionComponents.HasChanges()); }
public void RegisterEvents() { if (SyncLayer.AutoRegisterGameEvents) { SyncLayer.RegisterGameEvents(); } Sync.Clients.SetLocalSteamId(Sync.MyId, createLocalClient: !(MyMultiplayer.Static is MyMultiplayerClient)); Sync.Players.RegisterEvents(); SetAsNotReady(); }