Пример #1
0
        protected override void Setup()
        {
            dependenciesCollection.Add(new Dependency {
                Type = typeof(ExampleDependencyMonoBehaviour), Factory = DependencyFactory.FromGameObject(exampleDependency), IsSingleton = true
            });

            dependenciesCollection.Add(new Dependency {
                Type = typeof(ExampleDependencyPlainClass), Factory = DependencyFactory.FromClass <ExampleDependencyPlainClass>(), IsSingleton = false
            });

            dependenciesCollection.Add(new Dependency {
                Type = typeof(ExampleDependencyNested), Factory = DependencyFactory.FromPrefab(exampleDependencyNested), IsSingleton = true
            });
        }