Skip to content

Commit

Permalink
Fixed issue with Extenject bindings
Browse files Browse the repository at this point in the history
Someone pointed me in the right direction, all works now :D
  • Loading branch information
grofit committed Mar 12, 2020
1 parent 472abb8 commit 6226289
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Application : EcsRxApplicationBehaviour
// We override this to stop auto bindings
protected override void BindSystems()
{
Container.Bind<ISystem, RandomMovementSystem>();
Container.Bind<RandomMovementSystem>();
}

// We override this to manually control how systems start
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public void Bind(Type fromType, Type toType, BindingConfiguration configuration
bindingSetup.To(toType).AsSingle();
return;
}

if(!string.IsNullOrEmpty(configuration.WithName))
{ bindingSetup.WithId(configuration.WithName); }

if (configuration.ToInstance != null)
{
Expand All @@ -63,10 +66,7 @@ public void Bind(Type fromType, Type toType, BindingConfiguration configuration
}

var binding = bindingSetup.To(toType);

if(!string.IsNullOrEmpty(configuration.WithName))
{ binding.WithConcreteId(configuration.WithName); }


if(configuration.AsSingleton)
{ binding.AsSingle(); }

Expand Down
Binary file not shown.

0 comments on commit 6226289

Please sign in to comment.