public static bool TryGetComponentData <T>(this EntityInspectorContext context, out T component) where T : class, IComponentData { if (!context.TargetExists() || !context.EntityManager.HasComponent <T>(context.Entity)) { component = default; return(false); } component = context.EntityManager.GetComponentData <T>(context.Entity); return(true); }
void IBinding.PreUpdate() { if (!m_Context.TargetExists()) { m_Root.Clear(); return; } m_UpdateVisitor.Reset(); var container = m_Context.EntityContainer; PropertyContainer.Visit(ref container, m_UpdateVisitor); UpdateComponentOrder(m_UpdateVisitor.ComponentOrder); }