public EntityInspectorElement(Session session, NativeList <Entity> targets)
        {
            m_Session       = session;
            m_Targets       = targets;
            m_Components    = new List <IComponentDataElement>();
            m_WorldManager  = m_Session.GetManager <IWorldManagerInternal>();
            m_ChangeManager = m_Session.GetManager <IChangeManager>();

            var entityManager = m_Session.GetManager <IWorldManager>().EntityManager;

            var firstTarget = m_Targets[0];
            var container   = new EntityContainer(entityManager, firstTarget);

            var visitor = new InspectorVisitor <Entity>(m_Session, m_Targets);

            visitor.AddAdapter(new EntityContainerAdapter(visitor));
            visitor.AddAdapter(new PrimitivesAdapter <Entity>(visitor));

            visitor.Context.PushParent(this);

            StronglyTypedVisit(visitor, ref container);

            m_EntityHeader = this.Q <EntityHeaderElement>();
            m_Components   = Children().OfType <IComponentDataElement>().ToList();
            OrderComponentsFromComponentOrder();
        }
        public VisitStatus Visit <TProperty>(IPropertyVisitor visitor, TProperty property, ref EntityContainer container,
                                             ref Entity value, ref ChangeTracker changeTracker) where TProperty : IProperty <EntityContainer, Entity>
        {
            var header = new EntityHeaderElement(Session, Targets);

            header.BuildFromInspector(visitor, property, ref container, ref value, Context);
            return(VisitStatus.Override);
        }