protected override void OnCreateManager()
        {
            _renderData = new List <InstanceRendererData>();
            EntityManager.GetAllUniqueSharedComponentData(_renderData);
            List <float> cullDistance = _renderData.ConvertAll(r => r.CullDistance);

            _cullDistance = new NativeArray <float>(cullDistance.ToArray(), Allocator.Persistent);
            _cullDistance.CopyFrom(cullDistance.ToArray());

            _batcher = new NativeMultiHashMap <int, Entity>(10000, Allocator.Persistent);

            _renderer = new InstanceRenderer(EntityManager);

            _queryGroup = EntityManager.CreateEntityQuery(typeof(InstanceRendererData),
                                                          typeof(InstanceRendererProperty), typeof(LocalToWorld));
        }
        protected override void OnCreate()
        {
            _renderData = new List <InstanceRendererData>();
            EntityManager.GetAllUniqueSharedComponentData(_renderData);
            List <float> cullDistance = _renderData.ConvertAll(r => r.CullDistance);

            _cullDistance = new NativeArray <float>(cullDistance.ToArray(), Allocator.Persistent);
            _cullDistance.CopyFrom(cullDistance.ToArray());

            _batcher = new NativeMultiHashMap <int, Entity>(10000, Allocator.Persistent);

            _renderer = new InstanceRenderer(EntityManager);

            _queryGroup = GetEntityQuery(new EntityQueryDesc()
            {
                All = new ComponentType[]
                {
                    ComponentType.ReadOnly <InstanceRendererData>(),
                    ComponentType.ReadWrite <InstanceRendererProperty>(),
                    ComponentType.ReadOnly <LocalToWorld>()
                },
                Options = EntityQueryOptions.FilterWriteGroup
            });
        }