public void SetEntity(World world, Entity entity) { World = world; Entity = entity; EntityManager = world.EntityManager; Container = new EntityContainer(EntityManager, Entity); EditorUtility.SetDirty(this); OnEntitySelectionChanged?.Invoke(this); }
internal void SetEntitySelection(Entity newSelection, bool updateList) { if (updateList) { entityListView.SetEntitySelection(newSelection); } var world = WorldSelection ?? (SystemSelection as ComponentSystemBase)?.World; if (world != null && newSelection != Entity.Null) { selectionProxy.SetEntity(world, newSelection); Selection.activeObject = selectionProxy; OnEntitySelectionChanged?.Invoke(selectionProxy); } else if (Selection.activeObject == selectionProxy) { Selection.activeObject = null; OnEntitySelectionChanged?.Invoke(null); } }