ordered renderers register components with world builder

pull/2/head
thatcosmonaut 2020-01-28 14:05:11 -08:00
parent 4f75aeebf1
commit c1e1f7f5ca
1 changed files with 2 additions and 0 deletions

View File

@ -196,6 +196,8 @@ namespace Encompass
/// </summary>
public OrderedRenderer<TComponent> AddOrderedRenderer<TComponent>(OrderedRenderer<TComponent> renderer) where TComponent : struct, IComponent, IDrawableComponent
{
RegisterComponentType<TComponent>();
componentTypesToRegister.Add(typeof(TComponent));
renderer.AssignEntityManager(entityManager);
renderer.AssignComponentManager(componentManager);
renderManager.RegisterOrderedRenderer<TComponent>(renderer.InternalRender);