public WO_Switch(DB_WorldObject data, ObjectsMgr manager) : base(data, manager) { if (!DataMgr.Select(data.Data01, out m_map)) { ServerLogger.LogError($"Map Switch {data.Guid} map {data.Data01} doesn't exist"); } else { m_view = _server.Room.SceneViewManager.CreateNetworkedSceneObjectView(_data.Guid); m_view.SubscribeToRpc(1, RPC_001); OnDestroy += WO_Switch_OnDestroy; } Spawn(); }
protected override void OnInitialize() { base.OnInitialize(); m_view = m_manager.CreateSceneObject(m_data.Guid); m_view.SubscribeToRpc(1, RPC_001); }