Example #1
0
        protected override void OnCreateManager(int capacity)
        {
            base.OnCreateManager(capacity);

            worker = Worker.GetWorkerFromWorld(World);

            PopulateDefaultComponentReplicators();
        }
Example #2
0
        protected override void OnCreateManager(int capacity)
        {
            base.OnCreateManager(capacity);
            worker = Worker.GetWorkerFromWorld(World);

            var requestTracker = World.GetOrCreateManager <CommandRequestTrackerSystem>();

            createEntityStorage     = requestTracker.GetCommandStorageForType <WorldCommands.CreateEntity.Storage>();
            deleteEntityStorage     = requestTracker.GetCommandStorageForType <WorldCommands.DeleteEntity.Storage>();
            reserveEntityIdsStorage = requestTracker.GetCommandStorageForType <WorldCommands.ReserveEntityIds.Storage>();
            entityQueryStorage      = requestTracker.GetCommandStorageForType <WorldCommands.EntityQuery.Storage>();
        }
        protected override void OnCreateManager(int capacity)
        {
            base.OnCreateManager(capacity);

            worker = Worker.GetWorkerFromWorld(World);

            spatialOSSendSystem = World.GetOrCreateManager <SpatialOSSendSystem>();

            var component = new T();

            if (!spatialOSSendSystem.TryRegisterCustomReplicationSystem(component.ComponentId))
            {
                worker.LogDispatcher.HandleLog(LogType.Error, new LogEvent(CustomReplicationSystemAlreadyExists)
                                               .WithField(LoggingUtils.LoggerName, LoggerName)
                                               .WithField("ComponentType", typeof(T)));
            }
        }