diff --git a/Build/python/mtm/zen/CreateRelease.py b/Build/python/mtm/zen/CreateRelease.py index 4bebeda8a..8d6a67d31 100644 --- a/Build/python/mtm/zen/CreateRelease.py +++ b/Build/python/mtm/zen/CreateRelease.py @@ -139,14 +139,14 @@ def _createPackage(self, useDll, includeSample, outputPath): self._sys.copyDirectory('[ZenjectDir]', '[ZenTempDir]') self._log.info('Cleaning up Zenject directory') - self._zipHelper.createZipFile('[ZenTempDir]/Extras/ZenjectUnitTests', '[ZenTempDir]/Extras/ZenjectUnitTests.zip') - self._sys.deleteDirectory('[ZenTempDir]/Extras/ZenjectUnitTests') + self._zipHelper.createZipFile('[ZenTempDir]/OptionalExtras/UnitTests', '[ZenTempDir]/OptionalExtras/UnitTests.zip') + self._sys.deleteDirectory('[ZenTempDir]/OptionalExtras/UnitTests') - self._zipHelper.createZipFile('[ZenTempDir]/Extras/ZenjectAutoMocking', '[ZenTempDir]/Extras/ZenjectAutoMocking.zip') - self._sys.deleteDirectory('[ZenTempDir]/Extras/ZenjectAutoMocking') + self._zipHelper.createZipFile('[ZenTempDir]/OptionalExtras/AutoMocking', '[ZenTempDir]/OptionalExtras/AutoMocking.zip') + self._sys.deleteDirectory('[ZenTempDir]/OptionalExtras/AutoMocking') if not includeSample: - self._sys.deleteDirectory('[ZenTempDir]/Extras/SampleGame') + self._sys.deleteDirectory('[ZenTempDir]/OptionalExtras/SampleGame') self._sys.copyFile('[BuildDir]/UnityPackager/UnityPackageUtil.cs', '[PackageTempDir]/Assets/Editor/UnityPackageUtil.cs') diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Binders/CommandBinder.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Binders/CommandBinder.cs deleted file mode 100644 index 7777bbb84..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Binders/CommandBinder.cs +++ /dev/null @@ -1,393 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using ModestTree; -using ModestTree.Util; -using System.Linq; - -namespace Zenject.Commands -{ - [System.Diagnostics.DebuggerStepThrough] - public class CommandBinderBase : BinderBase - where TCommand : ICommand - { - readonly SingletonProviderMap _singletonMap; - - public CommandBinderBase( - DiContainer container, string identifier, SingletonProviderMap singletonMap) - : base(container, typeof(TCommand), identifier) - { - _singletonMap = singletonMap; - } - - public BindingConditionSetter HandleWithStaticMethod(Func methodGetter) - { - return ToProvider(new CommandProviderStatic(methodGetter)); - } - - protected ProviderBase CreateSingletonProvider(string concreteIdentifier) - { - return _singletonMap.CreateProviderFromType(concreteIdentifier, typeof(THandler)); - } - } - - // Zero parameters - [System.Diagnostics.DebuggerStepThrough] - public class CommandBinder : CommandBinderBase - where TCommand : Command - { - public CommandBinder( - DiContainer container, string identifier, SingletonProviderMap singletonMap) - : base(container, identifier, singletonMap) - { - } - - public BindingConditionSetter HandleWithTransient( - Func methodGetter) - { - return ToProvider( - new CommandProviderMethodTransient( - methodGetter)); - } - - public BindingConditionSetter HandleWithTransient() - where THandler : ICommandHandler - { - return ToProvider( - new CommandProviderHandlerTransient()); - } - - public BindingConditionSetter HandleWithSingle() - where THandler : ICommandHandler - { - return HandleWithSingle((string)null); - } - - public BindingConditionSetter HandleWithSingle(string concreteIdentifier) - where THandler : ICommandHandler - { - return ToProvider( - new CommandProviderHandlerSingle( - CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle( - string concreteIdentifier, Func methodGetter) - { - return ToProvider(new CommandProviderMethodSingle( - methodGetter, CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle(Func methodGetter) - { - return HandleWithSingle(null, methodGetter); - } - } - - // One parameter - [System.Diagnostics.DebuggerStepThrough] - public class CommandBinder : CommandBinderBase> - where TCommand : Command - { - public CommandBinder( - DiContainer container, string identifier, SingletonProviderMap singletonMap) - : base(container, identifier, singletonMap) - { - } - - public BindingConditionSetter HandleWithTransient( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider( - new CommandProviderMethodTransient( - methodGetter)); - } - - public BindingConditionSetter HandleWithTransient(Func> methodGetter) - { - return HandleWithTransient(null, methodGetter); - } - - public BindingConditionSetter HandleWithSingle() - where THandler : ICommandHandler - { - return HandleWithSingle((string)null); - } - - public BindingConditionSetter HandleWithSingle(string concreteIdentifier) - where THandler : ICommandHandler - { - return ToProvider( - new CommandProviderHandlerSingle( - CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider(new CommandProviderMethodSingle( - methodGetter, CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle(Func> methodGetter) - { - return HandleWithSingle(null, methodGetter); - } - } - - // Two parameters - [System.Diagnostics.DebuggerStepThrough] - public class CommandBinder : CommandBinderBase> - where TCommand : Command - { - public CommandBinder( - DiContainer container, string identifier, SingletonProviderMap singletonMap) - : base(container, identifier, singletonMap) - { - } - - public BindingConditionSetter HandleWithTransient( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider( - new CommandProviderMethodTransient( - methodGetter)); - } - - public BindingConditionSetter HandleWithTransient(Func> methodGetter) - { - return HandleWithTransient(null, methodGetter); - } - - public BindingConditionSetter HandleWithSingle() - where THandler : ICommandHandler - { - return HandleWithSingle((string)null); - } - - public BindingConditionSetter HandleWithSingle(string concreteIdentifier) - where THandler : ICommandHandler - { - return ToProvider( - new CommandProviderHandlerSingle( - CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider(new CommandProviderMethodSingle( - methodGetter, CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle(Func> methodGetter) - { - return HandleWithSingle(null, methodGetter); - } - } - - // Three parameters - [System.Diagnostics.DebuggerStepThrough] - public class CommandBinder : CommandBinderBase> - where TCommand : Command - { - public CommandBinder( - DiContainer container, string identifier, SingletonProviderMap singletonMap) - : base(container, identifier, singletonMap) - { - } - - public BindingConditionSetter HandleWithTransient( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider( - new CommandProviderMethodTransient( - methodGetter)); - } - - public BindingConditionSetter HandleWithTransient(Func> methodGetter) - { - return HandleWithTransient(null, methodGetter); - } - - public BindingConditionSetter HandleWithSingle() - where THandler : ICommandHandler - { - return HandleWithSingle((string)null); - } - - public BindingConditionSetter HandleWithSingle(string concreteIdentifier) - where THandler : ICommandHandler - { - return ToProvider( - new CommandProviderHandlerSingle( - CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider(new CommandProviderMethodSingle( - methodGetter, CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle(Func> methodGetter) - { - return HandleWithSingle(null, methodGetter); - } - } - - // Four parameters - [System.Diagnostics.DebuggerStepThrough] - public class CommandBinder : CommandBinderBase> - where TCommand : Command - { - public CommandBinder( - DiContainer container, string identifier, SingletonProviderMap singletonMap) - : base(container, identifier, singletonMap) - { - } - - public BindingConditionSetter HandleWithTransient( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider( - new CommandProviderMethodTransient( - methodGetter)); - } - - public BindingConditionSetter HandleWithTransient(Func> methodGetter) - { - return HandleWithTransient(null, methodGetter); - } - - public BindingConditionSetter HandleWithSingle() - where THandler : ICommandHandler - { - return HandleWithSingle((string)null); - } - - public BindingConditionSetter HandleWithSingle(string concreteIdentifier) - where THandler : ICommandHandler - { - return ToProvider( - new CommandProviderHandlerSingle( - CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider(new CommandProviderMethodSingle( - methodGetter, CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle(Func> methodGetter) - { - return HandleWithSingle(null, methodGetter); - } - } - - // Five parameters - [System.Diagnostics.DebuggerStepThrough] - public class CommandBinder : CommandBinderBase> - where TCommand : Command - { - public CommandBinder( - DiContainer container, string identifier, SingletonProviderMap singletonMap) - : base(container, identifier, singletonMap) - { - } - - public BindingConditionSetter HandleWithTransient( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider( - new CommandProviderMethodTransient( - methodGetter)); - } - - public BindingConditionSetter HandleWithTransient(Func> methodGetter) - { - return HandleWithTransient(null, methodGetter); - } - - public BindingConditionSetter HandleWithSingle() - where THandler : ICommandHandler - { - return HandleWithSingle((string)null); - } - - public BindingConditionSetter HandleWithSingle(string concreteIdentifier) - where THandler : ICommandHandler - { - return ToProvider( - new CommandProviderHandlerSingle( - CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider(new CommandProviderMethodSingle( - methodGetter, CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle(Func> methodGetter) - { - return HandleWithSingle(null, methodGetter); - } - } - - // Six parameters - [System.Diagnostics.DebuggerStepThrough] - public class CommandBinder : CommandBinderBase> - where TCommand : Command - { - public CommandBinder( - DiContainer container, string identifier, SingletonProviderMap singletonMap) - : base(container, identifier, singletonMap) - { - } - - public BindingConditionSetter HandleWithTransient( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider( - new CommandProviderMethodTransient( - methodGetter)); - } - - public BindingConditionSetter HandleWithTransient(Func> methodGetter) - { - return HandleWithTransient(null, methodGetter); - } - - public BindingConditionSetter HandleWithSingle() - where THandler : ICommandHandler - { - return HandleWithSingle((string)null); - } - - public BindingConditionSetter HandleWithSingle(string concreteIdentifier) - where THandler : ICommandHandler - { - return ToProvider( - new CommandProviderHandlerSingle( - CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle( - string concreteIdentifier, Func> methodGetter) - { - return ToProvider(new CommandProviderMethodSingle( - methodGetter, CreateSingletonProvider(concreteIdentifier))); - } - - public BindingConditionSetter HandleWithSingle(Func> methodGetter) - { - return HandleWithSingle(null, methodGetter); - } - } - -} diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command.meta deleted file mode 100644 index 79834b321..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 2b501b629974b4f40b462fd4813fafbd -folderAsset: yes -timeCreated: 1450373896 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/Command.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/Command.cs deleted file mode 100644 index 1fbf49502..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/Command.cs +++ /dev/null @@ -1,128 +0,0 @@ -using ModestTree.Util; -using System; - -namespace Zenject.Commands -{ - public interface ICommand - { - } - - // Zero params - public abstract class Command : ICommand - { - Action _handler; - - [PostInject] - public void Construct(Action handler) - { - _handler = handler; - } - - public void Execute() - { - _handler(); - } - } - - // One param - public abstract class Command : ICommand - { - Action _handler; - - [PostInject] - public void Construct(Action handler) - { - _handler = handler; - } - - public void Execute(TParam1 param1) - { - _handler(param1); - } - } - - // Two params - public abstract class Command : ICommand - { - Action _handler; - - [PostInject] - public void Construct(Action handler) - { - _handler = handler; - } - - public void Execute(TParam1 param1, TParam2 param2) - { - _handler(param1, param2); - } - } - - // Three params - public abstract class Command : ICommand - { - Action _handler; - - [PostInject] - public void Construct(Action handler) - { - _handler = handler; - } - - public void Execute(TParam1 param1, TParam2 param2, TParam3 param3) - { - _handler(param1, param2, param3); - } - } - - // Four params - public abstract class Command : ICommand - { - Action _handler; - - [PostInject] - public void Construct(Action handler) - { - _handler = handler; - } - - public void Execute(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4) - { - _handler(param1, param2, param3, param4); - } - } - - // Five params - public abstract class Command : ICommand - { - ModestTree.Util.Action _handler; - - [PostInject] - public void Construct(ModestTree.Util.Action handler) - { - _handler = handler; - } - - public void Execute(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5) - { - _handler(param1, param2, param3, param4, param5); - } - } - - // Six params - public abstract class Command : ICommand - { - ModestTree.Util.Action _handler; - - [PostInject] - public void Construct(ModestTree.Util.Action handler) - { - _handler = handler; - } - - public void Execute(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6) - { - _handler(param1, param2, param3, param4, param5, param6); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/CommandExtensions.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/CommandExtensions.cs deleted file mode 100644 index d49994f5d..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/CommandExtensions.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using ModestTree; -using ModestTree.Util; - -namespace Zenject.Commands -{ - public static class CommandExtensions - { - // Zero parameters - public static CommandBinder BindCommand(this IBinder binder, string identifier) - where TCommand : Command - { - var container = (DiContainer)binder; - return new CommandBinder(container, identifier, container.SingletonProviderMap); - } - - public static CommandBinder BindCommand(this IBinder container) - where TCommand : Command - { - return BindCommand((DiContainer)container, null); - } - - // One parameter - public static CommandBinder BindCommand(this IBinder binder, string identifier) - where TCommand : Command - { - var container = (DiContainer)binder; - return new CommandBinder(container, identifier, container.SingletonProviderMap); - } - - public static CommandBinder BindCommand(this IBinder container) - where TCommand : Command - { - return BindCommand((DiContainer)container, null); - } - - // Two parameters - public static CommandBinder BindCommand(this IBinder binder, string identifier) - where TCommand : Command - { - var container = (DiContainer)binder; - return new CommandBinder(container, identifier, container.SingletonProviderMap); - } - - public static CommandBinder BindCommand(this IBinder container) - where TCommand : Command - { - return BindCommand((DiContainer)container, null); - } - - // Three parameters - public static CommandBinder BindCommand(this IBinder binder, string identifier) - where TCommand : Command - { - var container = (DiContainer)binder; - return new CommandBinder(container, identifier, container.SingletonProviderMap); - } - - public static CommandBinder BindCommand(this IBinder container) - where TCommand : Command - { - return BindCommand((DiContainer)container, null); - } - - // Four parameters - public static CommandBinder BindCommand(this IBinder binder, string identifier) - where TCommand : Command - { - var container = (DiContainer)binder; - return new CommandBinder(container, identifier, container.SingletonProviderMap); - } - - public static CommandBinder BindCommand(this IBinder container) - where TCommand : Command - { - return BindCommand((DiContainer)container, null); - } - - // Five parameters - public static CommandBinder BindCommand(this IBinder binder, string identifier) - where TCommand : Command - { - var container = (DiContainer)binder; - return new CommandBinder(container, identifier, container.SingletonProviderMap); - } - - public static CommandBinder BindCommand(this IBinder container) - where TCommand : Command - { - return BindCommand((DiContainer)container, null); - } - - // Six parameters - public static CommandBinder BindCommand(this IBinder binder, string identifier) - where TCommand : Command - { - var container = (DiContainer)binder; - return new CommandBinder(container, identifier, container.SingletonProviderMap); - } - - public static CommandBinder BindCommand(this IBinder container) - where TCommand : Command - { - return BindCommand((DiContainer)container, null); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/ICommandHandler.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/ICommandHandler.cs deleted file mode 100644 index cdaa50378..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/ICommandHandler.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; - -namespace Zenject.Commands -{ - public interface ICommandHandlerBase - { - } - - // Zero params - public interface ICommandHandler : ICommandHandlerBase - { - void Execute(); - } - - // One param - public interface ICommandHandler : ICommandHandlerBase - { - void Execute(TParam1 p1); - } - - // Two params - public interface ICommandHandler : ICommandHandlerBase - { - void Execute(TParam1 p1, TParam2 p2); - } - - // Three params - public interface ICommandHandler : ICommandHandlerBase - { - void Execute(TParam1 p1, TParam2 p2, TParam3 p3); - } - - // Four params - public interface ICommandHandler : ICommandHandlerBase - { - void Execute(TParam1 p1, TParam2 p2, TParam3 p3, TParam4 p4); - } - - // Five params - public interface ICommandHandler : ICommandHandlerBase - { - void Execute(TParam1 p1, TParam2 p2, TParam3 p3, TParam4 p4, TParam5 p5); - } - - // Six params - public interface ICommandHandler : ICommandHandlerBase - { - void Execute(TParam1 p1, TParam2 p2, TParam3 p3, TParam4 p4, TParam5 p5, TParam6 p6); - } -} diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers.meta deleted file mode 100644 index ef4136aea..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 8ce73b0c57bf94b46b3110b9ff897d6f -folderAsset: yes -timeCreated: 1450373896 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderBase.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderBase.cs deleted file mode 100644 index 44d79638a..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderBase.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using ModestTree; -using System.Linq; - -namespace Zenject.Commands -{ - public abstract class CommandProviderBase : ProviderBase - where TCommand : ICommand - { - public override Type GetInstanceType() - { - return typeof(TCommand); - } - - public override object GetInstance(InjectContext context) - { - var obj = context.Container.Instantiate(GetCommandAction(context)); - Assert.That(obj != null); - return obj; - } - - protected abstract TAction GetCommandAction(InjectContext context); - - public override IEnumerable ValidateBinding(InjectContext context) - { - return context.Container.ValidateObjectGraph(context, typeof(TAction)); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderBase.cs.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderBase.cs.meta deleted file mode 100644 index d7c867071..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderBase.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 36f2a4a570405cd409aee81f9671d054 -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerSingle.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerSingle.cs deleted file mode 100644 index 4373d46dc..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerSingle.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using ModestTree; -using ModestTree.Util; -using System.Linq; - -namespace Zenject.Commands -{ - // Zero params - public class CommandProviderHandlerSingle - : CommandProviderSingle - where TCommand : Command - where THandler : ICommandHandler - { - public CommandProviderHandlerSingle(ProviderBase singletonProvider) - : base(singletonProvider) - { - } - - protected override Action GetCommandAction(InjectContext context) - { - return () => - { - GetSingleton(context).Execute(); - }; - } - } - - // One param - public class CommandProviderHandlerSingle - : CommandProviderSingle> - where TCommand : Command - where THandler : ICommandHandler - { - public CommandProviderHandlerSingle(ProviderBase singletonProvider) - : base(singletonProvider) - { - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1) => - { - GetSingleton(context).Execute(p1); - }; - } - } - - // Two params - public class CommandProviderHandlerSingle - : CommandProviderSingle> - where TCommand : Command - where THandler : ICommandHandler - { - public CommandProviderHandlerSingle(ProviderBase singletonProvider) - : base(singletonProvider) - { - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1, p2) => - { - GetSingleton(context).Execute(p1, p2); - }; - } - } - - // Three params - public class CommandProviderHandlerSingle - : CommandProviderSingle> - where TCommand : Command - where THandler : ICommandHandler - { - public CommandProviderHandlerSingle(ProviderBase singletonProvider) - : base(singletonProvider) - { - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3) => - { - GetSingleton(context).Execute(p1, p2, p3); - }; - } - } - - // Four params - public class CommandProviderHandlerSingle - : CommandProviderSingle> - where TCommand : Command - where THandler : ICommandHandler - { - public CommandProviderHandlerSingle(ProviderBase singletonProvider) - : base(singletonProvider) - { - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3, p4) => - { - GetSingleton(context).Execute(p1, p2, p3, p4); - }; - } - } - - // Five params - public class CommandProviderHandlerSingle - : CommandProviderSingle> - where TCommand : Command - where THandler : ICommandHandler - { - public CommandProviderHandlerSingle(ProviderBase singletonProvider) - : base(singletonProvider) - { - } - - protected override ModestTree.Util.Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3, p4, p5) => - { - GetSingleton(context).Execute(p1, p2, p3, p4, p5); - }; - } - } - - // Six params - public class CommandProviderHandlerSingle - : CommandProviderSingle> - where TCommand : Command - where THandler : ICommandHandler - { - public CommandProviderHandlerSingle(ProviderBase singletonProvider) - : base(singletonProvider) - { - } - - protected override ModestTree.Util.Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3, p4, p5, p6) => - { - GetSingleton(context).Execute(p1, p2, p3, p4, p5, p6); - }; - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerSingle.cs.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerSingle.cs.meta deleted file mode 100644 index 69258de88..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerSingle.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 63fab11a9a4a65641b272346f65b9e24 -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerTransient.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerTransient.cs deleted file mode 100644 index 07d85c7e1..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerTransient.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using ModestTree; -using System.Linq; - -namespace Zenject.Commands -{ - public class CommandProviderHandlerTransient - : CommandProviderTransient - where TCommand : Command - where THandler : ICommandHandler - { - protected override Action GetCommandAction(InjectContext context) - { - return () => - { - CreateHandler(context).Execute(); - }; - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerTransient.cs.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerTransient.cs.meta deleted file mode 100644 index 3fbcb57bf..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderHandlerTransient.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4900e46ded174e44aa4fe6d02fd3c25c -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodSingle.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodSingle.cs deleted file mode 100644 index e022b1466..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodSingle.cs +++ /dev/null @@ -1,189 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using ModestTree; -using ModestTree.Util; -using System.Linq; - -namespace Zenject.Commands -{ - // Zero params - public class CommandProviderMethodSingle - : CommandProviderSingle - where TCommand : Command - { - readonly Func _methodGetter; - - public CommandProviderMethodSingle( - Func methodGetter, ProviderBase singletonProvider) - : base(singletonProvider) - { - _methodGetter = methodGetter; - } - - protected override Action GetCommandAction(InjectContext context) - { - return () => - { - var singleton = GetSingleton(context); - Assert.IsNotNull(singleton); - _methodGetter(singleton)(); - }; - } - } - - // One param - public class CommandProviderMethodSingle - : CommandProviderSingle> - where TCommand : Command - { - readonly Func> _methodGetter; - - public CommandProviderMethodSingle( - Func> methodGetter, ProviderBase singletonProvider) - : base(singletonProvider) - { - _methodGetter = methodGetter; - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1) => - { - var singleton = GetSingleton(context); - Assert.IsNotNull(singleton); - _methodGetter(singleton)(p1); - }; - } - } - - // Two params - public class CommandProviderMethodSingle - : CommandProviderSingle> - where TCommand : Command - { - readonly Func> _methodGetter; - - public CommandProviderMethodSingle( - Func> methodGetter, - ProviderBase singletonProvider) - : base(singletonProvider) - { - _methodGetter = methodGetter; - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1, p2) => - { - var singleton = GetSingleton(context); - Assert.IsNotNull(singleton); - _methodGetter(singleton)(p1, p2); - }; - } - } - - // Three params - public class CommandProviderMethodSingle - : CommandProviderSingle> - where TCommand : Command - { - readonly Func> _methodGetter; - - public CommandProviderMethodSingle( - Func> methodGetter, - ProviderBase singletonProvider) - : base(singletonProvider) - { - _methodGetter = methodGetter; - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3) => - { - var singleton = GetSingleton(context); - Assert.IsNotNull(singleton); - _methodGetter(singleton)(p1, p2, p3); - }; - } - } - - // Four params - public class CommandProviderMethodSingle - : CommandProviderSingle> - where TCommand : Command - { - readonly Func> _methodGetter; - - public CommandProviderMethodSingle( - Func> methodGetter, - ProviderBase singletonProvider) - : base(singletonProvider) - { - _methodGetter = methodGetter; - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3, p4) => - { - var singleton = GetSingleton(context); - Assert.IsNotNull(singleton); - _methodGetter(singleton)(p1, p2, p3, p4); - }; - } - } - - // Five params - public class CommandProviderMethodSingle - : CommandProviderSingle> - where TCommand : Command - { - readonly Func> _methodGetter; - - public CommandProviderMethodSingle( - Func> methodGetter, - ProviderBase singletonProvider) - : base(singletonProvider) - { - _methodGetter = methodGetter; - } - - protected override ModestTree.Util.Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3, p4, p5) => - { - var singleton = GetSingleton(context); - Assert.IsNotNull(singleton); - _methodGetter(singleton)(p1, p2, p3, p4, p5); - }; - } - } - - // Six params - public class CommandProviderMethodSingle - : CommandProviderSingle> - where TCommand : Command - { - readonly Func> _methodGetter; - - public CommandProviderMethodSingle( - Func> methodGetter, - ProviderBase singletonProvider) - : base(singletonProvider) - { - _methodGetter = methodGetter; - } - - protected override ModestTree.Util.Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3, p4, p5, p6) => - { - var singleton = GetSingleton(context); - Assert.IsNotNull(singleton); - _methodGetter(singleton)(p1, p2, p3, p4, p5, p6); - }; - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodSingle.cs.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodSingle.cs.meta deleted file mode 100644 index 8f69dd58b..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodSingle.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: dc164cce5c44d79498a144d5df561e56 -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodTransient.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodTransient.cs deleted file mode 100644 index ba0f1cbe6..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodTransient.cs +++ /dev/null @@ -1,167 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using ModestTree; -using ModestTree.Util; -using System.Linq; - -namespace Zenject.Commands -{ - // Common - public abstract class CommandProviderMethodTransientBase - : CommandProviderTransient - where TCommand : ICommand - { - readonly Func _methodGetter; - - public CommandProviderMethodTransientBase(Func methodGetter) - { - _methodGetter = methodGetter; - } - - protected TAction GetHandlerMethod(InjectContext context) - { - return _methodGetter(CreateHandler(context)); - } - } - - // Zero Parameters - public class CommandProviderMethodTransient - : CommandProviderMethodTransientBase - where TCommand : Command - { - public CommandProviderMethodTransient(Func methodGetter) - : base(methodGetter) - { - } - - protected override Action GetCommandAction(InjectContext context) - { - return () => - { - GetHandlerMethod(context)(); - }; - } - } - - // One Parameter - public class CommandProviderMethodTransient - : CommandProviderMethodTransientBase> - where TCommand : Command - { - public CommandProviderMethodTransient( - Func> methodGetter) - : base(methodGetter) - { - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1) => - { - GetHandlerMethod(context)(p1); - }; - } - } - - // Two Parameters - public class CommandProviderMethodTransient - : CommandProviderMethodTransientBase> - where TCommand : Command - { - public CommandProviderMethodTransient( - Func> methodGetter) - : base(methodGetter) - { - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1, p2) => - { - GetHandlerMethod(context)(p1, p2); - }; - } - } - - // Three Parameters - public class CommandProviderMethodTransient - : CommandProviderMethodTransientBase> - where TCommand : Command - { - public CommandProviderMethodTransient( - Func> methodGetter) - : base(methodGetter) - { - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3) => - { - GetHandlerMethod(context)(p1, p2, p3); - }; - } - } - - // Four Parameters - public class CommandProviderMethodTransient - : CommandProviderMethodTransientBase> - where TCommand : Command - { - public CommandProviderMethodTransient( - Func> methodGetter) - : base(methodGetter) - { - } - - protected override Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3, p4) => - { - GetHandlerMethod(context)(p1, p2, p3, p4); - }; - } - } - - // Five Parameters - public class CommandProviderMethodTransient - : CommandProviderMethodTransientBase> - where TCommand : Command - { - public CommandProviderMethodTransient( - Func> methodGetter) - : base(methodGetter) - { - } - - protected override ModestTree.Util.Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3, p4, p5) => - { - GetHandlerMethod(context)(p1, p2, p3, p4, p5); - }; - } - } - - // Six Parameters - public class CommandProviderMethodTransient - : CommandProviderMethodTransientBase> - where TCommand : Command - { - public CommandProviderMethodTransient( - Func> methodGetter) - : base(methodGetter) - { - } - - protected override ModestTree.Util.Action GetCommandAction(InjectContext context) - { - return (p1, p2, p3, p4, p5, p6) => - { - GetHandlerMethod(context)(p1, p2, p3, p4, p5, p6); - }; - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodTransient.cs.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodTransient.cs.meta deleted file mode 100644 index b5b0c5732..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderMethodTransient.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 614a9a0931e6dbf49aabc0c6dc682c79 -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderSingle.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderSingle.cs deleted file mode 100644 index 1fe69c737..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderSingle.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using ModestTree; -using System.Linq; - -namespace Zenject.Commands -{ - public abstract class CommandProviderSingle - : CommandProviderBase - where TCommand : ICommand - { - readonly ProviderBase _singletonProvider; - - public CommandProviderSingle(ProviderBase singletonProvider) - { - _singletonProvider = singletonProvider; - } - - public override void Dispose() - { - _singletonProvider.Dispose(); - } - - protected THandler GetSingleton(InjectContext c) - { - var newContext = new InjectContext( - c.Container, typeof(THandler), null, false, c.ObjectType, - c.ObjectInstance, c.MemberName, c.ParentContext, c.ConcreteIdentifier, - null, c.LocalOnly); - - return (THandler)_singletonProvider.GetInstance(newContext); - } - - public override IEnumerable ValidateBinding(InjectContext context) - { - return base.ValidateBinding(context) - .Concat(_singletonProvider.ValidateBinding(context)); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderSingle.cs.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderSingle.cs.meta deleted file mode 100644 index e79f56b3e..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderSingle.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 24b61e46265ccb148a414adc59166364 -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderStatic.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderStatic.cs deleted file mode 100644 index c87e144cb..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderStatic.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using ModestTree; -using System.Linq; - -namespace Zenject.Commands -{ - public class CommandProviderStatic : ProviderBase - where TCommand : ICommand - { - readonly Func _methodGetter; - - public CommandProviderStatic(Func methodGetter) - { - _methodGetter = methodGetter; - } - - public override Type GetInstanceType() - { - return typeof(TCommand); - } - - public override object GetInstance(InjectContext context) - { - var obj = context.Container.Instantiate(_methodGetter()); - Assert.That(obj != null); - return obj; - } - - public override IEnumerable ValidateBinding(InjectContext context) - { - return context.Container.ValidateObjectGraph(context, typeof(TAction)); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderStatic.cs.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderStatic.cs.meta deleted file mode 100644 index 27668f361..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderStatic.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ea8bfac417c7d5342a64a62a74d99bb0 -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderTransient.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderTransient.cs deleted file mode 100644 index a8a5efefb..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderTransient.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using ModestTree; -using System.Linq; - -namespace Zenject.Commands -{ - public abstract class CommandProviderTransient - : CommandProviderBase - where TCommand : ICommand - { - protected THandler CreateHandler(InjectContext c) - { - var newContext = new InjectContext( - c.Container, typeof(THandler), null, false, c.ObjectType, - c.ObjectInstance, c.MemberName, c.ParentContext, c.ConcreteIdentifier, - null, c.LocalOnly); - - return c.Container.InstantiateExplicit(new List(), newContext); - } - - public override IEnumerable ValidateBinding(InjectContext context) - { - return base.ValidateBinding(context) - .Concat(context.Container.ValidateObjectGraph(context)); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderTransient.cs.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderTransient.cs.meta deleted file mode 100644 index 03a0a7fc2..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Providers/CommandProviderTransient.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b474cbd970a1fd44ead7218b29a6dc14 -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal.meta deleted file mode 100644 index 2ccb46fd7..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 87defa503c6be2e488889bb4aa6e8993 -folderAsset: yes -timeCreated: 1450373896 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/Signal.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/Signal.cs deleted file mode 100644 index 02dfcaad2..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/Signal.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using ModestTree.Util; - -namespace Zenject.Commands -{ - public interface ISignal - { - } - - // Zero Parameters - public class Signal : ISignal - { - public event Action Event = delegate {}; - - public class TriggerBase - { - [Inject] - Signal _signal = null; - - public void Fire() - { - _signal.Event(); - } - } - } - - // One Parameter - public class Signal : ISignal - { - public event Action Event = delegate {}; - - public class TriggerBase - { - [Inject] - Signal _signal = null; - - public void Fire(TParam1 arg1) - { - _signal.Event(arg1); - } - } - } - - // Two Parameters - public class Signal : ISignal - { - public event Action Event = delegate {}; - - public class TriggerBase - { - [Inject] - Signal _signal = null; - - public void Fire(TParam1 arg1, TParam2 arg2) - { - _signal.Event(arg1, arg2); - } - } - } - - // Three Parameters - public class Signal : ISignal - { - public event Action Event = delegate {}; - - public class TriggerBase - { - [Inject] - Signal _signal = null; - - public void Fire(TParam1 arg1, TParam2 arg2, TParam3 arg3) - { - _signal.Event(arg1, arg2, arg3); - } - } - } - - // Four Parameters - public class Signal : ISignal - { - public event Action Event = delegate {}; - - public class TriggerBase - { - [Inject] - Signal _signal = null; - - public void Fire(TParam1 arg1, TParam2 arg2, TParam3 arg3, TParam4 arg4) - { - _signal.Event(arg1, arg2, arg3, arg4); - } - } - } - - // Five Parameters - public class Signal : ISignal - { - public event ModestTree.Util.Action Event = delegate {}; - - public class TriggerBase - { - [Inject] - Signal _signal = null; - - public void Fire(TParam1 arg1, TParam2 arg2, TParam3 arg3, TParam4 arg4, TParam5 arg5) - { - _signal.Event(arg1, arg2, arg3, arg4, arg5); - } - } - } - - // Six Parameters - public class Signal : ISignal - { - public event ModestTree.Util.Action Event = delegate {}; - - public class TriggerBase - { - [Inject] - Signal _signal = null; - - public void Fire(TParam1 arg1, TParam2 arg2, TParam3 arg3, TParam4 arg4, TParam5 arg5, TParam6 arg6) - { - _signal.Event(arg1, arg2, arg3, arg4, arg5, arg6); - } - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/Signal.cs.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/Signal.cs.meta deleted file mode 100644 index 26dedadf9..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/Signal.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8af895aa7b25ba24f89adc02c57f8b40 -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/SignalExtensions.cs b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/SignalExtensions.cs deleted file mode 100644 index 96408a4ed..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/SignalExtensions.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using ModestTree; -using ModestTree.Util; - -namespace Zenject.Commands -{ - public static class SignalExtensions - { - // Zero Parameters - public static BindingConditionSetter BindSignalTrigger(this IBinder binder, string identifier) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - var container = (DiContainer)binder; - container.Bind().ToSingle(); - container.Bind().ToSingle().WhenInjectedInto(); - return container.Bind().ToSingle(); - } - - public static BindingConditionSetter BindSignalTrigger(this IBinder container) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - return BindSignalTrigger((DiContainer)container, null); - } - - // One Parameter - public static BindingConditionSetter BindSignalTrigger(this IBinder binder, string identifier) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - var container = (DiContainer)binder; - container.Bind().ToSingle(); - container.Bind>().ToSingle().WhenInjectedInto(); - return container.Bind().ToSingle(); - } - - public static BindingConditionSetter BindSignalTrigger(this IBinder container) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - return BindSignalTrigger((DiContainer)container, null); - } - - // Two Parameters - public static BindingConditionSetter BindSignalTrigger(this IBinder binder, string identifier) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - var container = (DiContainer)binder; - container.Bind().ToSingle(); - container.Bind>().ToSingle().WhenInjectedInto(); - return container.Bind().ToSingle(); - } - - public static BindingConditionSetter BindSignalTrigger(this IBinder container) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - return BindSignalTrigger((DiContainer)container, null); - } - - // Three Parameters - public static BindingConditionSetter BindSignalTrigger(this IBinder binder, string identifier) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - var container = (DiContainer)binder; - container.Bind().ToSingle(); - container.Bind>().ToSingle().WhenInjectedInto(); - return container.Bind().ToSingle(); - } - - public static BindingConditionSetter BindSignalTrigger(this IBinder container) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - return BindSignalTrigger((DiContainer)container, null); - } - - // Four Parameters - public static BindingConditionSetter BindSignalTrigger(this IBinder binder, string identifier) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - var container = (DiContainer)binder; - container.Bind().ToSingle(); - container.Bind>().ToSingle().WhenInjectedInto(); - return container.Bind().ToSingle(); - } - - public static BindingConditionSetter BindSignalTrigger(this IBinder container) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - return BindSignalTrigger((DiContainer)container, null); - } - - // Five Parameters - public static BindingConditionSetter BindSignalTrigger(this IBinder binder, string identifier) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - var container = (DiContainer)binder; - container.Bind().ToSingle(); - container.Bind>().ToSingle().WhenInjectedInto(); - return container.Bind().ToSingle(); - } - - public static BindingConditionSetter BindSignalTrigger(this IBinder container) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - return BindSignalTrigger((DiContainer)container, null); - } - - // Six Parameters - public static BindingConditionSetter BindSignalTrigger(this IBinder binder, string identifier) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - var container = (DiContainer)binder; - container.Bind().ToSingle(); - container.Bind>().ToSingle().WhenInjectedInto(); - return container.Bind().ToSingle(); - } - - public static BindingConditionSetter BindSignalTrigger(this IBinder container) - where TSignal : Signal - where TTrigger : Signal.TriggerBase - { - return BindSignalTrigger((DiContainer)container, null); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/SignalExtensions.cs.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/SignalExtensions.cs.meta deleted file mode 100644 index 4db01fe25..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Signal/SignalExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b977e62b9e678de4597b1fdb5d3e25ab -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj deleted file mode 100644 index 54f83099f..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj +++ /dev/null @@ -1,101 +0,0 @@ - - - - - Debug - AnyCPU - {B543A0B8-2630-424E-B628-53457BE4884B} - Library - Properties - Zenject - Zenject.Commands - v3.5 - 512 - - - - true - full - false - ..\..\..\..\..\AssemblyBuild\Temp\Debug\ - ..\..\..\..\..\AssemblyBuild\Temp\Debug\ - ..\..\..\..\..\AssemblyBuild\Bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\..\..\..\AssemblyBuild\Temp\Release\ - ..\..\..\..\..\AssemblyBuild\Temp\Release\ - ..\..\..\..\..\AssemblyBuild\Bin\Release\ - TRACE - prompt - 4 - - - true - ..\..\..\..\..\AssemblyBuild\Bin\Not Unity Debug\ - TRACE;DEBUG;ZEN_NOT_UNITY3D - full - ..\..\..\..\..\AssemblyBuild\Temp\Not Unity Debug\ - ..\..\..\..\..\AssemblyBuild\Temp\Not Unity Debug\ - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - ..\..\..\..\..\AssemblyBuild\Bin\Not Unity Release\ - TRACE;ZEN_NOT_UNITY3D;ZEN_MULTITHREADING - true - ..\..\..\..\..\AssemblyBuild\Temp\Not Unity Release\ - ..\..\..\..\..\AssemblyBuild\Temp\Not Unity Release\ - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - - - - - - - False - ..\..\..\..\..\AssemblyBuild\Libraries\Unity\UnityEngine.dll - - - - - - - - - - - - - - - - - - - - - {46f25a62-2e29-48cb-95f3-bdbcb0976ddc} - Zenject - - - - - \ No newline at end of file diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj.meta deleted file mode 100644 index 7e89c469e..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f2b54bdfd47321845b25d754caa923e8 -timeCreated: 1450537622 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj.user b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj.user deleted file mode 100644 index fe7dc2232..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - ShowAllFiles - - \ No newline at end of file diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj.user.meta b/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj.user.meta deleted file mode 100644 index c0a788a34..000000000 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Zenject.Commands.csproj.user.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 20a9d17c1543508499ebaa01023dbce8 -timeCreated: 1450537622 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Asteroids.unity b/UnityProject/Assets/Zenject/Extras/SampleGame/Asteroids.unity deleted file mode 100644 index 10f7b8194..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Asteroids.unity +++ /dev/null @@ -1,793 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -SceneSettings: - m_ObjectHideFlags: 0 - m_PVSData: - m_PVSObjectsArray: [] - m_PVSPortalsArray: [] - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 6 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.52205884, g: 0.52205884, b: 0.52205884, a: 1} - m_AmbientEquatorColor: {r: 0.52205884, g: 0.52205884, b: 0.52205884, a: 1} - m_AmbientGroundColor: {r: 0.52205884, g: 0.52205884, b: 0.52205884, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 6 - m_GIWorkflowMode: 1 - m_LightmapsMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 3 - m_Resolution: 1 - m_BakeResolution: 50 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AOMaxDistance: 1 - m_Padding: 2 - m_CompAOExponent: 0 - m_LightmapParameters: {fileID: 0} - m_TextureCompression: 0 - m_FinalGather: 0 - m_FinalGatherRayCount: 1024 - m_ReflectionCompression: 2 - m_LightingDataAsset: {fileID: 0} - m_RuntimeCPUUsage: 25 ---- !u!196 &5 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - accuratePlacement: 0 - minRegionArea: 2 - cellSize: 0.16666666 - manualCellSize: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &374077285 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 374077286} - m_Layer: 0 - m_Name: Scene - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &374077286 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 374077285} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1907929669} - - {fileID: 1495790307} - - {fileID: 539277935} - m_Father: {fileID: 0} - m_RootOrder: 2 ---- !u!1 &539277933 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 539277935} - - 108: {fileID: 539277934} - m_Layer: 0 - m_Name: Directional light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &539277934 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 539277933} - m_Enabled: 1 - serializedVersion: 6 - m_Type: 1 - m_Color: {r: 0.099913515, g: 0.5112159, b: 0.64705884, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 0 - m_Resolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 1 - m_BounceIntensity: 1 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_AreaSize: {x: 1, y: 1} ---- !u!4 &539277935 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 539277933} - m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.10938166, w: 0.8754261} - m_LocalPosition: {x: -2.5247688, y: 0.1344086, z: 2.1533628} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 374077286} - m_RootOrder: 2 ---- !u!1 &805392154 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 805392155} - - 114: {fileID: 805392156} - - 114: {fileID: 805392157} - m_Layer: 0 - m_Name: CompositionRoot - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &805392155 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 805392154} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 ---- !u!114 &805392156 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 805392154} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 89715ad69b973a14899afa2c6730b30b, type: 3} - m_Name: - m_EditorClassIdentifier: - OnlyInjectWhenActive: 1 - Installers: - - {fileID: 805392157} ---- !u!114 &805392157 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 805392154} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ac59283f2813c5643a2495056b74c1c0, type: 3} - m_Name: - m_EditorClassIdentifier: - _settings: - MainCamera: {fileID: 1495790306} - Ship: - Prefab: {fileID: 100008, guid: f4cdd74364fb9d6448ecf7663dd0cfe9, type: 2} - StateMoving: - moveSpeed: 15 - rotateSpeed: 1 - speedForMaxEmisssion: 30 - maxEmission: 500 - oscillationFrequency: 1 - oscillationAmplitude: 0.1 - StateDead: - brokenTemplate: {fileID: 100010, guid: 5b84466ca2cdf93418bd1e3234edb0e1, type: 2} - explosionTemplate: {fileID: 100000, guid: 185972cb8011a1449b7360c07a62fdf2, - type: 2} - explosionForce: 15 - StateStarting: - blinkRate: 1 - Asteroid: - Prefab: {fileID: 100000, guid: 972561acbe31e7147b76d1a430caf37d, type: 2} - Spawner: - minSpeed: 5 - maxSpeed: 8 - minScale: 0.7 - maxScale: 2.5 - startingSpawns: 13 - maxSpawns: 36 - maxSpawnTime: 60 - maxMass: 7 - minMass: 3 - General: - massScaleFactor: 0.1 - maxSpeed: 18 ---- !u!1 &1194014231 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1194014232} - - 114: {fileID: 1194014233} - m_Layer: 0 - m_Name: Gui - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1194014232 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1194014231} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.0068893, y: -1.6959872, z: 7.0009694} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 ---- !u!114 &1194014233 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1194014231} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 79984cb687438fd469b84d7e916d0574, type: 3} - m_Name: - m_EditorClassIdentifier: - titleStyle: - m_Name: - m_Normal: - m_Background: {fileID: 0} - m_TextColor: {r: 1, g: 1, b: 1, a: 1} - m_Hover: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Active: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Focused: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnNormal: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnHover: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnActive: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnFocused: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Border: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Margin: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Overflow: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Font: {fileID: 12800000, guid: fd8f821504719f7459be663fb8591ada, type: 3} - m_FontSize: 100 - m_FontStyle: 1 - m_Alignment: 0 - m_WordWrap: 0 - m_RichText: 1 - m_TextClipping: 0 - m_ImagePosition: 0 - m_ContentOffset: {x: 0, y: 0} - m_FixedWidth: 0 - m_FixedHeight: 0 - m_StretchWidth: 1 - m_StretchHeight: 0 - instructionsStyle: - m_Name: - m_Normal: - m_Background: {fileID: 0} - m_TextColor: {r: 1, g: 1, b: 1, a: 1} - m_Hover: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Active: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Focused: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnNormal: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnHover: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnActive: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnFocused: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Border: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Margin: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Overflow: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Font: {fileID: 12800000, guid: fd8f821504719f7459be663fb8591ada, type: 3} - m_FontSize: 50 - m_FontStyle: 0 - m_Alignment: 0 - m_WordWrap: 0 - m_RichText: 1 - m_TextClipping: 0 - m_ImagePosition: 0 - m_ContentOffset: {x: 0, y: 0} - m_FixedWidth: 0 - m_FixedHeight: 0 - m_StretchWidth: 1 - m_StretchHeight: 0 - gameOverStyle: - m_Name: - m_Normal: - m_Background: {fileID: 0} - m_TextColor: {r: 1, g: 1, b: 1, a: 1} - m_Hover: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Active: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Focused: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnNormal: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnHover: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnActive: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnFocused: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Border: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Margin: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Overflow: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Font: {fileID: 12800000, guid: fd8f821504719f7459be663fb8591ada, type: 3} - m_FontSize: 20 - m_FontStyle: 0 - m_Alignment: 0 - m_WordWrap: 0 - m_RichText: 1 - m_TextClipping: 0 - m_ImagePosition: 0 - m_ContentOffset: {x: 0, y: 0} - m_FixedWidth: 0 - m_FixedHeight: 0 - m_StretchWidth: 1 - m_StretchHeight: 0 - timeStyle: - m_Name: - m_Normal: - m_Background: {fileID: 0} - m_TextColor: {r: 1, g: 1, b: 1, a: 1} - m_Hover: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Active: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Focused: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnNormal: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnHover: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnActive: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_OnFocused: - m_Background: {fileID: 0} - m_TextColor: {r: 0, g: 0, b: 0, a: 1} - m_Border: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Margin: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Overflow: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_Font: {fileID: 12800000, guid: fd8f821504719f7459be663fb8591ada, type: 3} - m_FontSize: 20 - m_FontStyle: 0 - m_Alignment: 0 - m_WordWrap: 0 - m_RichText: 1 - m_TextClipping: 0 - m_ImagePosition: 0 - m_ContentOffset: {x: 0, y: 0} - m_FixedWidth: 0 - m_FixedHeight: 0 - m_StretchWidth: 1 - m_StretchHeight: 0 - gameOverFadeInTime: 3 - gameOverStartFadeTime: 2 - restartTextStartFadeTime: 5 - restartTextFadeInTime: 2 ---- !u!1 &1495790302 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1495790307} - - 20: {fileID: 1495790306} - - 92: {fileID: 1495790305} - - 124: {fileID: 1495790304} - - 81: {fileID: 1495790303} - - 82: {fileID: 1495790308} - m_Layer: 0 - m_Name: Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1495790303 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1495790302} - m_Enabled: 1 ---- !u!124 &1495790304 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1495790302} - m_Enabled: 1 ---- !u!92 &1495790305 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1495790302} - m_Enabled: 1 ---- !u!20 &1495790306 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1495790302} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 1 - orthographic size: 10 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 - m_StereoMirrorMode: 0 ---- !u!4 &1495790307 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1495790302} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -11.627775} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 374077286} - m_RootOrder: 1 ---- !u!82 &1495790308 -AudioSource: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1495790302} - m_Enabled: 1 - serializedVersion: 4 - OutputAudioMixerGroup: {fileID: 0} - m_audioClip: {fileID: 8300000, guid: 60ec6240aa857114083057aae79a65d9, type: 3} - m_PlayOnAwake: 1 - m_Volume: 0.106 - m_Pitch: 1 - Loop: 1 - Mute: 0 - Spatialize: 0 - Priority: 128 - DopplerLevel: 1 - MinDistance: 1 - MaxDistance: 500 - Pan2D: 0 - rolloffMode: 0 - BypassEffects: 0 - BypassListenerEffects: 0 - BypassReverbZones: 0 - rolloffCustomCurve: - serializedVersion: 2 - m_Curve: - - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - panLevelCustomCurve: - serializedVersion: 2 - m_Curve: - - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - spreadCustomCurve: - serializedVersion: 2 - m_Curve: - - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - reverbZoneMixCustomCurve: - serializedVersion: 2 - m_Curve: - - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 ---- !u!1 &1907929665 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1907929669} - - 33: {fileID: 1907929668} - - 64: {fileID: 1907929667} - - 23: {fileID: 1907929666} - - 114: {fileID: 1907929670} - m_Layer: 0 - m_Name: Background - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1907929666 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1907929665} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: f96f18654fcb0a742b51183dab201105, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!64 &1907929667 -MeshCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1907929665} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Convex: 0 - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &1907929668 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1907929665} - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1907929669 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1907929665} - m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 0, z: 6.5125256} - m_LocalScale: {x: 5.9777775, y: 2.2373586, z: 4} - m_Children: [] - m_Father: {fileID: 374077286} - m_RootOrder: 0 ---- !u!114 &1907929670 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1907929665} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d72ecc6be0485ff4f96c39e24aea61f3, type: 3} - m_Name: - m_EditorClassIdentifier: - Speed: -0.01 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Asteroids.unity.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Asteroids.unity.meta deleted file mode 100644 index 3422a80a6..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Asteroids.unity.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 1fbbab4d6f8dcbd4eb46075a8f4a68e4 -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/AsteroidsDecoratorExample.unity b/UnityProject/Assets/Zenject/Extras/SampleGame/AsteroidsDecoratorExample.unity deleted file mode 100644 index 0a8506f61..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/AsteroidsDecoratorExample.unity +++ /dev/null @@ -1,150 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -SceneSettings: - m_ObjectHideFlags: 0 - m_PVSData: - m_PVSObjectsArray: [] - m_PVSPortalsArray: [] - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: .25 - backfaceThreshold: 100 ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 6 - m_Fog: 0 - m_FogColor: {r: .5, g: .5, b: .5, a: 1} - m_FogMode: 3 - m_FogDensity: .00999999978 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: .522058845, g: .522058845, b: .522058845, a: 1} - m_AmbientEquatorColor: {r: .522058845, g: .522058845, b: .522058845, a: 1} - m_AmbientGroundColor: {r: .522058845, g: .522058845, b: .522058845, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: .5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 5 - m_GIWorkflowMode: 1 - m_LightmapsMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 3 - m_Resolution: 1 - m_BakeResolution: 50 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AOMaxDistance: 1 - m_Padding: 2 - m_CompAOExponent: 0 - m_LightmapParameters: {fileID: 0} - m_TextureCompression: 0 - m_FinalGather: 0 - m_FinalGatherRayCount: 1024 - m_ReflectionCompression: 2 - m_LightmapSnapshot: {fileID: 0} - m_RuntimeCPUUsage: 25 ---- !u!196 &5 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentRadius: .5 - agentHeight: 2 - agentSlope: 45 - agentClimb: .400000006 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - accuratePlacement: 0 - minRegionArea: 2 - cellSize: .166666657 - manualCellSize: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &805392154 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 805392155} - - 114: {fileID: 805392156} - - 114: {fileID: 805392157} - m_Layer: 0 - m_Name: CompositionRoot - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &805392155 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 805392154} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 ---- !u!114 &805392156 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 805392154} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ed7323e8fdd8c26438c6485f2060dad0, type: 3} - m_Name: - m_EditorClassIdentifier: - SceneName: Asteroids - DecoratorInstallers: - - {fileID: 805392157} - PreInstallers: [] - PostInstallers: [] ---- !u!114 &805392157 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 805392154} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f5efd89f29bfcd141907dd60701bc741, type: 3} - m_Name: - m_EditorClassIdentifier: - OverrideMoveSettings: - moveSpeed: 2 - rotateSpeed: 1 - speedForMaxEmisssion: 30 - maxEmission: 500 - oscillationFrequency: 1 - oscillationAmplitude: .100000001 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/AsteroidsDecoratorExample.unity.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/AsteroidsDecoratorExample.unity.meta deleted file mode 100644 index f574fb1f9..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/AsteroidsDecoratorExample.unity.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 95ac5444582470e47867d1534fc4c800 -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media.meta deleted file mode 100644 index 1cb909e6a..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: c5cb7331a4436e74d9a3528bd7b6132b -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts.meta deleted file mode 100644 index 60bb41191..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 0958372920e5ce947b09867c51119580 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/Space.txt b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/Space.txt deleted file mode 100644 index 2bee88e29..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/Space.txt +++ /dev/null @@ -1,37 +0,0 @@ -SPACE AGE v1.0; November 5, 2002 -Windows TrueType font, free for personal use -http://go.to/disneyfonts - -Please include this Space.txt file with any redistribution. - -INSTALLATION ------------- -To install any TrueType font, simply copy it to your Windows\Fonts folder. - - ---------- -SPACE AGE is an original font based on the logotype for Epcot's "Mission: Space" attraction. Version 1.0 contains capitals, alternate capitals, numerals, most punctuation, and some extended characters. - - -SPECIAL CHARACTERS ------------------- -The tilde and underscore characters contain horizontal lines useful for creating ligatures. -To create a ligature connected at the top, use the tilde character ~ (example: s~p). -To create a ligature connected at the bottom, use the underscore character _ (example: c_s). - -ALTERNATE CHARACTERS --------------------- -| (bar): oversize A -[ (left bracket): alternate A -] (right bracket): alternate A - -DINGBATS --------- -{ (left brace): SPACE logotype -} (right brace): MISSION: SPACE logotype - - - -CONTACT -------- -Comments, questions, complaints, love notes - please send them to jcmagic@yahoo.com. \ No newline at end of file diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/Space.txt.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/Space.txt.meta deleted file mode 100644 index bcc423328..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/Space.txt.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: d3282156ad562e6449e0593138e10594 -TextScriptImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/space age.ttf b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/space age.ttf deleted file mode 100644 index 85a62a8f6..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/space age.ttf and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/space age.ttf.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/space age.ttf.meta deleted file mode 100644 index f74ecc612..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Fonts/space age.ttf.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: fd8f821504719f7459be663fb8591ada -TrueTypeFontImporter: - serializedVersion: 2 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 1 - characterPadding: 0 - includeFontData: 1 - use2xBehaviour: 0 - fontNames: [] - customCharacters: - fontRenderingMode: 0 - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported.meta deleted file mode 100644 index 998b502dd..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 48f6a1e1e8f9eef4a8767261db8c5e40 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials.meta deleted file mode 100644 index 4940fa6cc..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: a67e7502f6453ae48929b6da89c7a8e3 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/CampFire_Smoke.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/CampFire_Smoke.mat deleted file mode 100644 index 3ffcad358..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/CampFire_Smoke.mat +++ /dev/null @@ -1,43 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: CampFire_Smoke - m_Shader: {fileID: 203, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 2800000, guid: 67f9b9363b45b4d3fb7b466648fe8fd1, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _InvFade - second: 3 - m_Colors: - data: - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} - data: - first: - name: _TintColor - second: {r: .74626863, g: .787078679, b: 1, a: .0980392173} - data: - first: - name: _EmisColor - second: {r: .200000003, g: .200000003, b: .200000003, a: 0} ---- !u!1002 &2100001 -EditorExtensionImpl: - serializedVersion: 6 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/CampFire_Smoke.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/CampFire_Smoke.mat.meta deleted file mode 100644 index 1709b1e5b..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/CampFire_Smoke.mat.meta +++ /dev/null @@ -1,6 +0,0 @@ -fileFormatVersion: 2 -guid: edd0d4a6265d34cbea0dc848ce7114af -labels: -- Particles -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/FireA.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/FireA.mat deleted file mode 100644 index 040f1a1f0..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/FireA.mat +++ /dev/null @@ -1,43 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: FireA - m_Shader: {fileID: 4800000, guid: 36de5f3f364314127bce48eea23438c3, type: 3} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 2800000, guid: 590e5ca5d888e4258ac16b80a33e024d, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _Cutoff - second: .292452842 - data: - first: - name: _InvFade - second: 1 - m_Colors: - data: - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} - data: - first: - name: _TintColor - second: {r: 1, g: .430122018, b: .216417909, a: 1} ---- !u!1002 &2100001 -EditorExtensionImpl: - serializedVersion: 6 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/FireA.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/FireA.mat.meta deleted file mode 100644 index 981b4b9ac..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/FireA.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 0babe53ca63bb49209164496ab5e4231 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/Glow.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/Glow.mat deleted file mode 100644 index e84179676..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/Glow.mat +++ /dev/null @@ -1,39 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Glow - m_Shader: {fileID: 4800000, guid: 36de5f3f364314127bce48eea23438c3, type: 3} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 2800000, guid: 9fd0803556af44591a2d3be1bd49a003, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _InvFade - second: .00999999978 - m_Colors: - data: - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} - data: - first: - name: _TintColor - second: {r: .5, g: .5, b: .5, a: .5} ---- !u!1002 &2100001 -EditorExtensionImpl: - serializedVersion: 6 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/Glow.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/Glow.mat.meta deleted file mode 100644 index e7b542f18..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/Glow.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 209ea2f17ebe64e85a177a9bbad10476 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/OilSmoke.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/OilSmoke.mat deleted file mode 100644 index f99d2c8d3..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/OilSmoke.mat +++ /dev/null @@ -1,43 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: OilSmoke - m_Shader: {fileID: 4800000, guid: 7072050308ffe4cc1a908ac897583e2e, type: 3} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 2800000, guid: 67f9b9363b45b4d3fb7b466648fe8fd1, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _InvFade - second: 3 - m_Colors: - data: - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} - data: - first: - name: _TintColor - second: {r: .503452837, g: .54472363, b: .597014904, a: 1} - data: - first: - name: _EmisColor - second: {r: .200000003, g: .200000003, b: .200000003, a: 0} ---- !u!1002 &2100001 -EditorExtensionImpl: - serializedVersion: 6 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/OilSmoke.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/OilSmoke.mat.meta deleted file mode 100644 index 141da300d..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Materials/OilSmoke.mat.meta +++ /dev/null @@ -1,6 +0,0 @@ -fileFormatVersion: 2 -guid: eb5315e2f77c540b6bf545720e84d3a5 -labels: -- Particles -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks.meta deleted file mode 100644 index 19dc68a61..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: ccd95c6f13e1b8141adfc0a77f660e19 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes.meta deleted file mode 100644 index 2d2b89803..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 54ece40b2bc071747b609dbf0fe68db6 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials.meta deleted file mode 100644 index 12129758a..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 9548b46e8c1bd7e48ad86c65eae66828 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/No Name.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/No Name.mat deleted file mode 100644 index 96603094b..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/No Name.mat +++ /dev/null @@ -1,28 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: No Name - m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: {} - m_Colors: - data: - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/No Name.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/No Name.mat.meta deleted file mode 100644 index c83423bdb..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/No Name.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: d9ac87544b6e60b4f93bb932aec2fa1c -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/rock_01Mat.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/rock_01Mat.mat deleted file mode 100644 index c8cd72395..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/rock_01Mat.mat +++ /dev/null @@ -1,54 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: rock_01Mat - m_Shader: {fileID: 4, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 2800000, guid: abd916b1dc28a7e4caffa584a9f2ee35, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _BumpMap - second: - m_Texture: {fileID: 2800000, guid: 853943b2b36a4624ab8455cd26861c46, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _ParallaxMap - second: - m_Texture: {fileID: 2800000, guid: 19e074901b3e57c4d895d944ee1841a8, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _Shininess - second: .0300000031 - data: - first: - name: _Parallax - second: .0199999996 - m_Colors: - data: - first: - name: _Color - second: {r: .669117689, g: .669117689, b: .669117689, a: 1} - data: - first: - name: _SpecColor - second: {r: 1, g: 1, b: 1, a: 1} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/rock_01Mat.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/rock_01Mat.mat.meta deleted file mode 100644 index be391e864..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/Materials/rock_01Mat.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: a1f30c6b2183c3f4a9ffa3cb444d6ddc -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/rock_01.fbx b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/rock_01.fbx deleted file mode 100644 index 8feaab1bb..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/rock_01.fbx and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/rock_01.fbx.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/rock_01.fbx.meta deleted file mode 100644 index fadd5479f..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/meshes/rock_01.fbx.meta +++ /dev/null @@ -1,63 +0,0 @@ -fileFormatVersion: 2 -guid: 0aee836645b89374583afeb4ca36b969 -ModelImporter: - serializedVersion: 15 - fileIDToRecycleName: - 100000: //RootNode - 400000: //RootNode - 2300000: //RootNode - 3300000: //RootNode - 4300000: rock_01 - 11100000: //RootNode - materials: - importMaterials: 1 - materialName: 0 - materialSearch: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - optimizeGameObjects: 0 - animationCompression: 1 - animationRotationError: .5 - animationPositionError: .5 - animationScaleError: .5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - clipAnimations: [] - isReadable: 1 - meshes: - lODScreenPercentages: [] - globalScale: .00999999978 - meshCompression: 0 - addColliders: 0 - importBlendShapes: 1 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - optimizeMeshForGPU: 1 - weldVertices: 1 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVPackMargin: 4 - tangentSpace: - normalSmoothAngle: 60 - splitTangentsAcrossUV: 1 - normalImportMode: 0 - tangentImportMode: 1 - importAnimation: 1 - copyAvatar: 0 - humanDescription: - human: [] - skeleton: [] - armTwist: .5 - foreArmTwist: .5 - upperLegTwist: .5 - legTwist: .5 - armStretch: .0500000007 - legStretch: .0500000007 - feetSpacing: 0 - rootMotionBoneName: - lastHumanDescriptionAvatarSource: {instanceID: 0} - animationType: 1 - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures.meta deleted file mode 100644 index 874af1729..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 6fb1e67857c38f74cbe251871b9f34f7 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/diffuse.tga b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/diffuse.tga deleted file mode 100644 index 199ccd8ee..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/diffuse.tga and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/diffuse.tga.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/diffuse.tga.meta deleted file mode 100644 index 0884ca67b..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/diffuse.tga.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: abd916b1dc28a7e4caffa584a9f2ee35 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/normal.jpg b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/normal.jpg deleted file mode 100644 index 8b55adddc..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/normal.jpg and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/normal.jpg.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/normal.jpg.meta deleted file mode 100644 index 7fea5731b..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Rocks/textures/normal.jpg.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 853943b2b36a4624ab8455cd26861c46 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 1 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders.meta deleted file mode 100644 index e269e05d4..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 974698baa23a34ddd97ac702be0de49d -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/AddSmooth_Layer.shader b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/AddSmooth_Layer.shader deleted file mode 100644 index bda7bc3ac..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/AddSmooth_Layer.shader +++ /dev/null @@ -1,104 +0,0 @@ -Shader "Particles/Additive_Layer (Soft)" { -Properties { - _MainTex ("Particle Texture", 2D) = "white" {} - _InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0 -} - -Category { - Tags { "Queue"="Transparent+1" "IgnoreProjector"="True" "RenderType"="Transparent" } - Blend One OneMinusSrcColor - ColorMask RGB - Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) } - BindChannels { - Bind "Color", color - Bind "Vertex", vertex - Bind "TexCoord", texcoord - } - - // ---- Fragment program cards - SubShader { - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - #pragma fragmentoption ARB_precision_hint_fastest - #pragma multi_compile_particles - - #include "UnityCG.cginc" - - sampler2D _MainTex; - float4 _TintColor; - - struct appdata_t { - float4 vertex : POSITION; - float4 color : COLOR; - float2 texcoord : TEXCOORD0; - }; - - struct v2f { - float4 vertex : POSITION; - float4 color : COLOR; - float2 texcoord : TEXCOORD0; - #ifdef SOFTPARTICLES_ON - float4 projPos : TEXCOORD1; - #endif - }; - - float4 _MainTex_ST; - - v2f vert (appdata_t v) - { - v2f o; - o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); - #ifdef SOFTPARTICLES_ON - o.projPos = ComputeScreenPos (o.vertex); - COMPUTE_EYEDEPTH(o.projPos.z); - #endif - o.color = v.color; - o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); - return o; - } - - sampler2D _CameraDepthTexture; - float _InvFade; - - half4 frag (v2f i) : COLOR - { - #ifdef SOFTPARTICLES_ON - float sceneZ = LinearEyeDepth (tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)).r); - float partZ = i.projPos.z; - float fade = saturate (_InvFade * (sceneZ-partZ)); - i.color.a *= fade; - #endif - - half4 prev = i.color * tex2D(_MainTex, i.texcoord); - prev.rgb *= prev.a; - return prev; - } - ENDCG - } - } - - // ---- Dual texture cards - SubShader { - Pass { - SetTexture [_MainTex] { - combine texture * primary - } - SetTexture [_MainTex] { - combine previous * previous alpha, previous - } - } - } - - // ---- Single texture cards (does not do particle colors) - SubShader { - Pass { - SetTexture [_MainTex] { - combine texture * texture alpha, texture - } - } - } -} -} \ No newline at end of file diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/AddSmooth_Layer.shader.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/AddSmooth_Layer.shader.meta deleted file mode 100644 index d80d74ab0..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/AddSmooth_Layer.shader.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: e10518acdaf774d528297b6d5b3a5839 -ShaderImporter: - defaultTextures: [] - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Add_Layer.shader b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Add_Layer.shader deleted file mode 100644 index cc0b26e65..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Add_Layer.shader +++ /dev/null @@ -1,105 +0,0 @@ -Shader "Particles/Additive_Layer" { -Properties { - _TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5) - _MainTex ("Particle Texture", 2D) = "white" {} - _InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0 -} - -Category { - Tags { "Queue"="Transparent+1" "IgnoreProjector"="True" "RenderType"="Transparent" } - Blend SrcAlpha One - AlphaTest Greater .01 - ColorMask RGB - Cull Off Lighting Off ZWrite Off Fog { Mode Off } - BindChannels { - Bind "Color", color - Bind "Vertex", vertex - Bind "TexCoord", texcoord - } - - // ---- Fragment program cards - SubShader { - Pass { - - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - #pragma fragmentoption ARB_precision_hint_fastest - #pragma multi_compile_particles - - #include "UnityCG.cginc" - - sampler2D _MainTex; - float4 _TintColor; - - struct appdata_t { - float4 vertex : POSITION; - float4 color : COLOR; - float2 texcoord : TEXCOORD0; - }; - - struct v2f { - float4 vertex : POSITION; - float4 color : COLOR; - float2 texcoord : TEXCOORD0; - #ifdef SOFTPARTICLES_ON - float4 projPos : TEXCOORD1; - #endif - }; - - float4 _MainTex_ST; - - v2f vert (appdata_t v) - { - v2f o; - o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); - #ifdef SOFTPARTICLES_ON - o.projPos = ComputeScreenPos (o.vertex); - COMPUTE_EYEDEPTH(o.projPos.z); - #endif - o.color = v.color; - o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); - return o; - } - - sampler2D _CameraDepthTexture; - float _InvFade; - - half4 frag (v2f i) : COLOR - { - #ifdef SOFTPARTICLES_ON - float sceneZ = LinearEyeDepth (tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)).r); - float partZ = i.projPos.z; - float fade = saturate (_InvFade * (sceneZ-partZ)); - i.color.a *= fade; - #endif - - return 2.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord); - } - ENDCG - } - } - - // ---- Dual texture cards - SubShader { - Pass { - SetTexture [_MainTex] { - constantColor [_TintColor] - combine constant * primary - } - SetTexture [_MainTex] { - combine texture * previous DOUBLE - } - } - } - - // ---- Single texture cards (does not do color tint) - SubShader { - Pass { - SetTexture [_MainTex] { - combine texture * primary - } - } - } -} -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Add_Layer.shader.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Add_Layer.shader.meta deleted file mode 100644 index 2b00c4a80..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Add_Layer.shader.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 36de5f3f364314127bce48eea23438c3 -ShaderImporter: - defaultTextures: [] - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Particle Alpha Blend_IgnoreFog.shader b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Particle Alpha Blend_IgnoreFog.shader deleted file mode 100644 index 5356c72a8..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Particle Alpha Blend_IgnoreFog.shader +++ /dev/null @@ -1,41 +0,0 @@ -Shader "Particles/Alpha Blended_IgnoreFog" { -Properties { - _TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5) - _MainTex ("Particle Texture", 2D) = "white" {} -} - -Category { - Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } - Blend SrcAlpha OneMinusSrcAlpha - AlphaTest Greater .01 - ColorMask RGB - Cull Off Lighting Off ZWrite Off Fog { Mode Off } - BindChannels { - Bind "Color", color - Bind "Vertex", vertex - Bind "TexCoord", texcoord - } - - // ---- Dual texture cards - SubShader { - Pass { - SetTexture [_MainTex] { - constantColor [_TintColor] - combine constant * primary - } - SetTexture [_MainTex] { - combine texture * previous DOUBLE - } - } - } - - // ---- Single texture cards (does not do color tint) - SubShader { - Pass { - SetTexture [_MainTex] { - combine texture * primary - } - } - } -} -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Particle Alpha Blend_IgnoreFog.shader.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Particle Alpha Blend_IgnoreFog.shader.meta deleted file mode 100644 index 1ccb51f34..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Shaders/Particle Alpha Blend_IgnoreFog.shader.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 7072050308ffe4cc1a908ac897583e2e -ShaderImporter: - defaultTextures: [] - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip.meta deleted file mode 100644 index e695ccb6a..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: b635bf5d7ac4eea4bab863a562c416e2 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials.meta deleted file mode 100644 index 8bf43ba18..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 0f211c9ea30df4247accbca0280a94ec -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/1K_Body-TXTR.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/1K_Body-TXTR.mat deleted file mode 100644 index f00657299..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/1K_Body-TXTR.mat +++ /dev/null @@ -1,35 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: 1K_Body-TXTR - m_Shader: {fileID: 2, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 2800000, guid: edc2b3bfe412721409008df82ad98102, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _BumpMap - second: - m_Texture: {fileID: 2800000, guid: b425f3d4e800e284e90bfeccc7276fba, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: {} - m_Colors: - data: - first: - name: _Color - second: {r: .647058845, g: .647058845, b: .647058845, a: 1} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/1K_Body-TXTR.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/1K_Body-TXTR.mat.meta deleted file mode 100644 index 6c4a1f315..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/1K_Body-TXTR.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: a0e138ce6cd06f74d83cf3884415be92 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/Space_Shooter_Material.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/Space_Shooter_Material.mat deleted file mode 100644 index 436572a16..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/Space_Shooter_Material.mat +++ /dev/null @@ -1,46 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Space_Shooter_Material - m_Shader: {fileID: 4, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 2800000, guid: d502334f478d23c4baaa4781df176eaf, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _BumpMap - second: - m_Texture: {fileID: 2800000, guid: b425f3d4e800e284e90bfeccc7276fba, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _Shininess - second: .078125 - m_Colors: - data: - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} - data: - first: - name: _SpecColor - second: {r: .5, g: .5, b: .5, a: 1} ---- !u!1002 &2100001 -EditorExtensionImpl: - serializedVersion: 6 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/Space_Shooter_Material.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/Space_Shooter_Material.mat.meta deleted file mode 100644 index 58940942e..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Materials/Space_Shooter_Material.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: a514b444dba54df418424449041a3aa6 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm.meta deleted file mode 100644 index 3a2c8b834..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b9830f5b22545c44fbbc0f12db3c0591 -folderAsset: yes -timeCreated: 1430212991 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-NM.jpg b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-NM.jpg deleted file mode 100644 index 8cf7deb22..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-NM.jpg and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-NM.jpg.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-NM.jpg.meta deleted file mode 100644 index c727a585b..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-NM.jpg.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: 9d1afd1910615b04c85c97274b296bb9 -timeCreated: 1430212992 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-TXTR.jpg b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-TXTR.jpg deleted file mode 100644 index 1495b766f..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-TXTR.jpg and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-TXTR.jpg.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-TXTR.jpg.meta deleted file mode 100644 index 0a5d3876e..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Body-TXTR.jpg.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: 01e65fb55683f1f4182f15ee0a5057ad -timeCreated: 1430212991 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Spec.jpg b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Spec.jpg deleted file mode 100644 index 3028511f6..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Spec.jpg and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Spec.jpg.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Spec.jpg.meta deleted file mode 100644 index c4203baad..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbm/1K_Spec.jpg.meta +++ /dev/null @@ -1,55 +0,0 @@ -fileFormatVersion: 2 -guid: 655ab62be1e02e34e88e39ed8c91a0c4 -timeCreated: 1430212992 -licenseType: Free -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 2048 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbx b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbx deleted file mode 100644 index e22a26c5f..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbx and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbx.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbx.meta deleted file mode 100644 index 4ba3a1543..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Space_Shooter.fbx.meta +++ /dev/null @@ -1,68 +0,0 @@ -fileFormatVersion: 2 -guid: 564c86c1543c6eb4e8525374599f15cc -labels: -- Space -- Shooter -- Jet -- Sci-fi -ModelImporter: - serializedVersion: 15 - fileIDToRecycleName: - 100000: //RootNode - 400000: //RootNode - 2300000: //RootNode - 3300000: //RootNode - 4300000: polySurface1 - 11100000: //RootNode - materials: - importMaterials: 1 - materialName: 3 - materialSearch: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - optimizeGameObjects: 0 - animationCompression: 1 - animationRotationError: .5 - animationPositionError: .5 - animationScaleError: .5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - clipAnimations: [] - isReadable: 1 - meshes: - lODScreenPercentages: [] - globalScale: 1 - meshCompression: 0 - addColliders: 0 - importBlendShapes: 1 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - optimizeMeshForGPU: 1 - weldVertices: 1 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVPackMargin: 4 - tangentSpace: - normalSmoothAngle: 60 - splitTangentsAcrossUV: 1 - normalImportMode: 0 - tangentImportMode: 1 - importAnimation: 1 - copyAvatar: 0 - humanDescription: - human: [] - skeleton: [] - armTwist: .5 - foreArmTwist: .5 - upperLegTwist: .5 - legTwist: .5 - armStretch: .0500000007 - legStretch: .0500000007 - feetSpacing: 0 - rootMotionBoneName: - lastHumanDescriptionAvatarSource: {instanceID: 0} - animationType: 1 - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures.meta deleted file mode 100644 index 7e9759fef..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 6febdc7b43fbd0c49b13fec14b9be50b -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-NM.jpg b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-NM.jpg deleted file mode 100644 index 8cf7deb22..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-NM.jpg and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-NM.jpg.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-NM.jpg.meta deleted file mode 100644 index 59fc4f30e..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-NM.jpg.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: b425f3d4e800e284e90bfeccc7276fba -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 1 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-TXTR.jpg b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-TXTR.jpg deleted file mode 100644 index 1495b766f..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-TXTR.jpg and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-TXTR.jpg.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-TXTR.jpg.meta deleted file mode 100644 index ba895cb6a..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Body-TXTR.jpg.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: edc2b3bfe412721409008df82ad98102 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Spec.jpg b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Spec.jpg deleted file mode 100644 index 3028511f6..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Spec.jpg and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Spec.jpg.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Spec.jpg.meta deleted file mode 100644 index 0a01493fb..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_Spec.jpg.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 0ea2ae5c475a8224f9f6c107611afe7b -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_TXTR+Spec.tif b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_TXTR+Spec.tif deleted file mode 100644 index d6c598e6b..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_TXTR+Spec.tif and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_TXTR+Spec.tif.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_TXTR+Spec.tif.meta deleted file mode 100644 index 17342c742..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/1K_TXTR+Spec.tif.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: d502334f478d23c4baaa4781df176eaf -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/512_TXTR+Spec.tif b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/512_TXTR+Spec.tif deleted file mode 100644 index 2eebb5a60..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/512_TXTR+Spec.tif and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/512_TXTR+Spec.tif.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/512_TXTR+Spec.tif.meta deleted file mode 100644 index 37cdd0764..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/SpaceShip/Textures/512_TXTR+Spec.tif.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 96dace51c0add3a46a111a286f8455a6 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures.meta deleted file mode 100644 index aebe6b123..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: db4b9202f2958462296463fc55b34572 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/CampfireLeft.psd b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/CampfireLeft.psd deleted file mode 100644 index ef782ae0f..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/CampfireLeft.psd and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/CampfireLeft.psd.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/CampfireLeft.psd.meta deleted file mode 100644 index 5b6701f40..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/CampfireLeft.psd.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: a72df340b82eb4fd2afbb9dbe634f4bc -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 0 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Campfireright.psd b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Campfireright.psd deleted file mode 100644 index 393120a0c..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Campfireright.psd and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Campfireright.psd.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Campfireright.psd.meta deleted file mode 100644 index 294c3837b..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Campfireright.psd.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: f6a7e4120ea5b4ca39d145c3f3b9669d -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Candle.psd b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Candle.psd deleted file mode 100644 index b3364f8b6..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Candle.psd and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Candle.psd.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Candle.psd.meta deleted file mode 100644 index e8f67d082..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Candle.psd.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: ea3fc985fb308433eb7ea824447f0426 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 0 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Glow.png b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Glow.png deleted file mode 100644 index 0dc9bc843..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Glow.png and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Glow.png.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Glow.png.meta deleted file mode 100644 index bac13d197..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Glow.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 9fd0803556af44591a2d3be1bd49a003 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 1 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 0 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/SmokeB.psd b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/SmokeB.psd deleted file mode 100644 index cb697548d..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/SmokeB.psd and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/SmokeB.psd.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/SmokeB.psd.meta deleted file mode 100644 index b302725b2..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/SmokeB.psd.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 67f9b9363b45b4d3fb7b466648fe8fd1 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Spark.png b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Spark.png deleted file mode 100644 index 784e4f212..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Spark.png and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Spark.png.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Spark.png.meta deleted file mode 100644 index 7513d045d..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/Spark.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 21bf9efbdbbbd4e34af72f1de5e334f6 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 2 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 64 - textureSettings: - filterMode: 1 - aniso: 9 - mipBias: -1 - wrapMode: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 0 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire.png b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire.png deleted file mode 100644 index f6d12806f..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire.png and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire.png.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire.png.meta deleted file mode 100644 index 2cf1eefa1..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: d1f484f58ddfa4341a6e72ce14adc083 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire2.png b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire2.png deleted file mode 100644 index 565f2a74e..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire2.png and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire2.png.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire2.png.meta deleted file mode 100644 index baec04985..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Imported/Textures/fire2.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 590e5ca5d888e4258ac16b80a33e024d -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 1 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: 1 - aniso: 9 - mipBias: -1 - wrapMode: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: 0 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials.meta deleted file mode 100644 index 957048a4a..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 03afdaf21f20e5543aafee9c467a61bc -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/stars.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/stars.mat deleted file mode 100644 index 7b5dff0bd..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/stars.mat +++ /dev/null @@ -1,46 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: stars - m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 2800000, guid: d1e4a3e1339b0c84197ec2fe60c41ed6, type: 3} - m_Scale: {x: 5, y: 5} - m_Offset: {x: 0, y: 0} - data: - first: - name: _BumpMap - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _ParallaxMap - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _Parallax - second: .0199999996 - m_Colors: - data: - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/stars.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/stars.mat.meta deleted file mode 100644 index 42590abcc..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/stars.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: c0f447361fb4285458bb4b25e0cbbff5 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/target.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/target.mat deleted file mode 100644 index f2ea74728..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/target.mat +++ /dev/null @@ -1,32 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: target - m_Shader: {fileID: 30, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 2800000, guid: be34ee1d3a3899d49a43310b45415ed3, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _Cutoff - second: .5 - m_Colors: - data: - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 0} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/target.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/target.mat.meta deleted file mode 100644 index 23ec70223..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Materials/target.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 6337eec4e613a6c44b441bb6b4ffbfa0 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes.meta deleted file mode 100644 index 2ffacb89d..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 83f84a6a87a8a0d43ad8c6460dd38acc -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials.meta deleted file mode 100644 index 75d35e610..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: f31de9209466a124a979ef5667e4ee75 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/Material.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/Material.mat deleted file mode 100644 index 703a39cce..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/Material.mat +++ /dev/null @@ -1,39 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Material - m_Shader: {fileID: 30, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _Illum - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _EmissionLM - second: 0 - m_Colors: - data: - first: - name: _Color - second: {r: .486274511, g: .501960814, b: .486274511, a: 1} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/Material.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/Material.mat.meta deleted file mode 100644 index 0c965f353..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/Material.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 62155033a16c4eb4ab0878b56d98970f -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/shipdoor.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/shipdoor.mat deleted file mode 100644 index 0b01576e0..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/shipdoor.mat +++ /dev/null @@ -1,39 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: shipdoor - m_Shader: {fileID: 30, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - data: - first: - name: _Illum - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _EmissionLM - second: 0 - m_Colors: - data: - first: - name: _Color - second: {r: .474509805, g: .627451003, b: .643137276, a: 1} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/shipdoor.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/shipdoor.mat.meta deleted file mode 100644 index 078816f5f..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/Materials/shipdoor.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 02f272d5e8ff508428baf80fadda022a -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/ship.fbx b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/ship.fbx deleted file mode 100644 index d44a35b88..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/ship.fbx +++ /dev/null @@ -1,2036 +0,0 @@ -; FBX 6.1.0 project file -; Created by Blender FBX Exporter -; for support mail: ideasman42@gmail.com -; ---------------------------------------------------- - -FBXHeaderExtension: { - FBXHeaderVersion: 1003 - FBXVersion: 6100 - CreationTimeStamp: { - Version: 1000 - Year: 2013 - Month: 08 - Day: 14 - Hour: 20 - Minute: 03 - Second: 49 - Millisecond: 0 - } - Creator: "FBX SDK/FBX Plugins build 20070228" - OtherFlags: { - FlagPLE: 0 - } -} -CreationTime: "2013-08-14 20:03:49:000" -Creator: "Blender version 2.67 (sub 0)" - -; Object definitions -;------------------------------------------------------------------ - -Definitions: { - Version: 100 - Count: 14 - ObjectType: "Model" { - Count: 11 - } - ObjectType: "Geometry" { - Count: 1 - } - ObjectType: "Material" { - Count: 2 - } - ObjectType: "Pose" { - Count: 1 - } - ObjectType: "GlobalSettings" { - Count: 1 - } -} - -; Object properties -;------------------------------------------------------------------ - -Objects: { - Model: "Model::Camera Switcher", "CameraSwitcher" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Camera Index", "Integer", "A+",100 - } - MultiLayer: 0 - MultiTake: 1 - Hidden: "True" - Shading: W - Culling: "CullingOff" - Version: 101 - Name: "Model::Camera Switcher" - CameraId: 0 - CameraName: 100 - CameraIndexName: - } - Model: "Model::Camera", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",-195.229202270507812,-224.433944702148438,160.309951782226562 - Property: "Lcl Rotation", "Lcl Rotation", "A+",90.692160214458610,26.439033899677728,47.000136773245160 - Property: "Lcl Scaling", "Lcl Scaling", "A+",30.000001907348633,30.000001907348633,29.999998092651367 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Size", "double", "",100 - Property: "Look", "enum", "",1 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",28.841546 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "FocalLength", "Number", "A+",35.000000 - Property: "FilmOffsetX", "Number", "A+",0.000000 - Property: "FilmOffsetY", "Number", "A+",0.000000 - Property: "BackgroundColor", "Color", "A+",0,0,0 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",3 - Property: "GateFit", "enum", "",2 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",1920 - Property: "AspectH", "double", "",1080 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",3.000000 - Property: "FarPlane", "double", "",2999.999809 - Property: "FilmWidth", "double", "",1.259843 - Property: "FilmHeight", "double", "",0.708661 - Property: "FilmAspectRatio", "double", "",1.777778 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",0 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.777778 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",0 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: -195.229202,-224.433945,160.309952 - Up: 0.312469,0.317370,0.895343 - LookAt: -0.727634,0.685881,0.010817 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Lamp", "Light" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",30.163618087768555,-122.287361145019531,177.115859985351562 - Property: "Lcl Rotation", "Lcl Rotation", "A+",127.261054502356870,3.163707551608806,16.936319773499580 - Property: "Lcl Scaling", "Lcl Scaling", "A+",29.999998092651367,30.000000000000000,29.999996185302734 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Size", "double", "",100 - Property: "Look", "enum", "",1 - Property: "LightType", "enum", "",0 - Property: "CastLightOnObject", "bool", "",1 - Property: "DrawVolumetricLight", "bool", "",1 - Property: "DrawGroundProjection", "bool", "",1 - Property: "DrawFrontFacingVolumetricLight", "bool", "",0 - Property: "GoboProperty", "object", "" - Property: "Color", "Color", "A+",1,1,1 - Property: "Intensity", "Intensity", "A+",100.00 - Property: "Fog", "Fog", "A+",50 - Property: "Color", "Color", "A",1.00,1.00,1.00 - Property: "Intensity", "Intensity", "A+",100.00 - Property: "Fog", "Fog", "A+",50 - Property: "LightType", "enum", "",0 - Property: "CastLightOnObject", "bool", "",1 - Property: "DrawGroundProjection", "bool", "",1 - Property: "DrawFrontFacingVolumetricLight", "bool", "",0 - Property: "DrawVolumetricLight", "bool", "",1 - Property: "GoboProperty", "object", "" - Property: "DecayType", "enum", "",0 - Property: "DecayStart", "double", "",30.00 - Property: "EnableNearAttenuation", "bool", "",0 - Property: "NearAttenuationStart", "double", "",0 - Property: "NearAttenuationEnd", "double", "",0 - Property: "EnableFarAttenuation", "bool", "",0 - Property: "FarAttenuationStart", "double", "",0 - Property: "FarAttenuationEnd", "double", "",0 - Property: "CastShadows", "bool", "",1 - Property: "ShadowColor", "ColorRGBA", "",0,0,0,1 - } - MultiLayer: 0 - MultiTake: 0 - Shading: Y - Culling: "CullingOff" - TypeFlags: "Light" - GeometryVersion: 124 - } - Model: "Model::Cube", "Mesh" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",179.999882065292638,89.999961523213827,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",34.729896545410156,34.729896545410156,34.729896545410156 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Size", "double", "",100 - Property: "Look", "enum", "",1 - } - MultiLayer: 0 - MultiTake: 1 - Shading: Y - Culling: "CullingOff" - Vertices: 1.000000,-0.000000,-0.255428,-1.000000,-1.000000,-0.255428,-1.000000,1.000000,-0.255428,1.000000,-0.000001,0.390680,-1.000000,-1.000000,0.390680,-1.000000,1.000000,0.390680,-1.000000,0.785078,0.390680 - ,-0.628042,0.578876,0.390680,-1.000000,0.785078,-0.255428,-0.628042,0.578876,-0.255428,-0.629731,-0.633902,0.390680,-0.982798,-0.802656,0.390680,-0.629731,-0.633902,-0.255428,-0.982798,-0.802656,-0.255428 - PolygonVertexIndex: 0,3,4,-2,0,8,-3,0,9,-9,0,12,-10,0,1,-13,1,13,-13,5,2,-9,6,5,-9,6,8,-10,7,6,-10,7,9,-13,10,7,-13,10,12,-14 - ,11,10,-14,1,11,-14,1,4,-12,3,0,2,-6,3,5,-7,3,6,-8,3,7,-11,3,10,-5,10,11,-5 - Edges: - GeometryVersion: 124 - LayerElementNormal: 0 { - Version: 101 - Name: "" - MappingInformationType: "ByVertice" - ReferenceInformationType: "Direct" - Normals: 0.834589660167694,0.000000000000000,-0.550828576087952,-0.447279274463654,-0.723715960979462,-0.525498211383820 - ,-0.436689347028732,0.706564545631409,-0.556779682636261,0.834589660167694,0.000000000000000,0.550828576087952 - ,-0.447279274463654,-0.723715960979462,0.525498211383820,-0.436689347028732,0.706564545631409,0.556779682636261 - ,-0.707083344459534,0.000000000000000,0.707083344459534,-0.707083344459534,0.000000000000000,0.707083344459534 - ,-0.707083344459534,0.000000000000000,-0.707083344459534,-0.707083344459534,0.000000000000000,-0.707083344459534 - ,-0.707083344459534,0.000000000000000,0.707083344459534,-0.707083344459534,0.000000000000000,0.707083344459534 - ,-0.707083344459534,0.000000000000000,-0.707083344459534,-0.707083344459534,0.000000000000000,-0.707083344459534 - } - LayerElementSmoothing: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByPolygon" - ReferenceInformationType: "Direct" - Smoothing: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - } - LayerElementMaterial: 0 { - Version: 101 - Name: "" - MappingInformationType: "AllSame" - ReferenceInformationType: "IndexToDirect" - Materials: 0 - } - Layer: 0 { - Version: 100 - LayerElement: { - Type: "LayerElementNormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementMaterial" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementSmoothing" - TypedIndex: 0 - } - } - } - Model: "Model::Producer Perspective", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,71.299999999999997,287.500000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",10.000000 - Property: "FarPlane", "double", "",4000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",0 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 0.000000,71.300000,287.500000 - Up: 0,1,0 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Top", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,4000.000000000000000,0.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 0.000000,4000.000000,0.000000 - Up: 0,0,-1 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Bottom", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,-4000.000000000000000,0.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 0.000000,-4000.000000,0.000000 - Up: 0,0,-1 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Front", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,0.000000000000000,4000.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 0.000000,0.000000,4000.000000 - Up: 0,1,0 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Back", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,0.000000000000000,-4000.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 0.000000,0.000000,-4000.000000 - Up: 0,1,0 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Right", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",4000.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 4000.000000,0.000000,0.000000 - Up: 0,1,0 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Left", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",-4000.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: -4000.000000,0.000000,0.000000 - Up: 0,1,0 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Material: "Material::Material", "" { - Version: 102 - ShadingModel: "lambert" - MultiLayer: 0 - Properties60: { - Property: "ShadingModel", "KString", "", "Lambert" - Property: "MultiLayer", "bool", "",0 - Property: "EmissiveColor", "ColorRGB", "",0.8000,0.8000,0.8000 - Property: "EmissiveFactor", "double", "",0.0000 - Property: "AmbientColor", "ColorRGB", "",0.0000,0.0000,0.0000 - Property: "AmbientFactor", "double", "",1.0000 - Property: "DiffuseColor", "ColorRGB", "",0.8000,0.8000,0.8000 - Property: "DiffuseFactor", "double", "",0.8000 - Property: "Bump", "Vector3D", "",0,0,0 - Property: "TransparentColor", "ColorRGB", "",1,1,1 - Property: "TransparencyFactor", "double", "",0.0000 - Property: "SpecularColor", "ColorRGB", "",1.0000,1.0000,1.0000 - Property: "SpecularFactor", "double", "",0.2500 - Property: "ShininessExponent", "double", "",80.0 - Property: "ReflectionColor", "ColorRGB", "",0,0,0 - Property: "ReflectionFactor", "double", "",1 - Property: "Emissive", "ColorRGB", "",0,0,0 - Property: "Ambient", "ColorRGB", "",0.0,0.0,0.0 - Property: "Diffuse", "ColorRGB", "",0.8,0.8,0.8 - Property: "Specular", "ColorRGB", "",1.0,1.0,1.0 - Property: "Shininess", "double", "",9.6 - Property: "Opacity", "double", "",1.0 - Property: "Reflectivity", "double", "",0 - } - } - Material: "Material::unnamed", "" { - Version: 102 - ShadingModel: "phong" - MultiLayer: 0 - Properties60: { - Property: "ShadingModel", "KString", "", "Phong" - Property: "MultiLayer", "bool", "",0 - Property: "EmissiveColor", "ColorRGB", "",0.8000,0.8000,0.8000 - Property: "EmissiveFactor", "double", "",0.0000 - Property: "AmbientColor", "ColorRGB", "",0.0000,0.0000,0.0000 - Property: "AmbientFactor", "double", "",0.5000 - Property: "DiffuseColor", "ColorRGB", "",0.8000,0.8000,0.8000 - Property: "DiffuseFactor", "double", "",1.0000 - Property: "Bump", "Vector3D", "",0,0,0 - Property: "TransparentColor", "ColorRGB", "",1,1,1 - Property: "TransparencyFactor", "double", "",0.0000 - Property: "SpecularColor", "ColorRGB", "",0.8000,0.8000,0.8000 - Property: "SpecularFactor", "double", "",0.2000 - Property: "ShininessExponent", "double", "",80.0 - Property: "ReflectionColor", "ColorRGB", "",0,0,0 - Property: "ReflectionFactor", "double", "",1 - Property: "Emissive", "ColorRGB", "",0,0,0 - Property: "Ambient", "ColorRGB", "",0.0,0.0,0.0 - Property: "Diffuse", "ColorRGB", "",0.8,0.8,0.8 - Property: "Specular", "ColorRGB", "",0.8,0.8,0.8 - Property: "Shininess", "double", "",20.0 - Property: "Opacity", "double", "",1.0 - Property: "Reflectivity", "double", "",0 - } - } - Pose: "Pose::BIND_POSES", "BindPose" { - Type: "BindPose" - Version: 100 - Properties60: { - } - NbPoseNodes: 1 - PoseNode: { - Node: "Model::Cube" - Matrix: -0.000022218722734,-34.729896545410156,-0.000070382149715,0.000000000000000,-0.000000000001677,-0.000070382149715,34.729896545410156,0.000000000000000,-34.729896545410156,0.000022218722734,0.000000000043350,0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000,1.000000000000000 - } - } - GlobalSettings: { - Version: 1000 - Properties60: { - Property: "UpAxis", "int", "",1 - Property: "UpAxisSign", "int", "",1 - Property: "FrontAxis", "int", "",2 - Property: "FrontAxisSign", "int", "",1 - Property: "CoordAxis", "int", "",0 - Property: "CoordAxisSign", "int", "",1 - Property: "UnitScaleFactor", "double", "",1 - } - } -} - -; Object relations -;------------------------------------------------------------------ - -Relations: { - Model: "Model::Cube", "Mesh" { - } - Model: "Model::Camera", "Camera" { - } - Model: "Model::Lamp", "Light" { - } - Model: "Model::Producer Perspective", "Camera" { - } - Model: "Model::Producer Top", "Camera" { - } - Model: "Model::Producer Bottom", "Camera" { - } - Model: "Model::Producer Front", "Camera" { - } - Model: "Model::Producer Back", "Camera" { - } - Model: "Model::Producer Right", "Camera" { - } - Model: "Model::Producer Left", "Camera" { - } - Model: "Model::Camera Switcher", "CameraSwitcher" { - } - Material: "Material::Material", "" { - } - Material: "Material::unnamed", "" { - } -} - -; Object connections -;------------------------------------------------------------------ - -Connections: { - Connect: "OO", "Model::Cube", "Model::Scene" - Connect: "OO", "Model::Lamp", "Model::Scene" - Connect: "OO", "Model::Camera", "Model::Scene" - Connect: "OO", "Material::Material", "Model::Cube" -} -;Takes and animation section -;---------------------------------------------------- - -Takes: { - Current: "Default Take" - Take: "Default Take" { - FileName: "Default_Take.tak" - LocalTime: 0,479181389250 - ReferenceTime: 0,479181389250 - - ;Models animation - ;---------------------------------------------------- - Model: "Model::Cube" { - Version: 1.1 - Channel: "Transform" { - Channel: "T" { - Channel: "X" { - Default: 0.000000000000000 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,0.000000000000000,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 0.000000000000000 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,0.000000000000000,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 0.000000000000000 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,0.000000000000000,L - Color: 0,0,1 - } - LayerType: 1 - } - Channel: "R" { - Channel: "X" { - Default: -89.999961523213827 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-89.999961523213827,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 89.999886391132961 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,89.999886391132961,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 90.000002504348856 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,90.000002504348856,L - Color: 0,0,1 - } - LayerType: 2 - } - Channel: "S" { - Channel: "X" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,0,1 - } - LayerType: 3 - } - } - } - Model: "Model::Camera" { - Version: 1.1 - Channel: "Transform" { - Channel: "T" { - Channel: "X" { - Default: -195.229202270507812 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-195.229202270507812,L - Color: 1,0,0 - } - Channel: "Y" { - Default: -224.433944702148438 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-224.433944702148438,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 160.309951782226562 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,160.309951782226562,L - Color: 0,0,1 - } - LayerType: 1 - } - Channel: "R" { - Channel: "X" { - Default: 90.692167044647775 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,90.692167044647775,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 26.439037314772314 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,26.439037314772314,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 47.000136773245160 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,47.000136773245160,L - Color: 0,0,1 - } - LayerType: 2 - } - Channel: "S" { - Channel: "X" { - Default: 30.000001907348633 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,30.000001907348633,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 30.000001907348633 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,30.000001907348633,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 29.999998092651367 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,29.999998092651367,L - Color: 0,0,1 - } - LayerType: 3 - } - } - } - Model: "Model::Lamp" { - Version: 1.1 - Channel: "Transform" { - Channel: "T" { - Channel: "X" { - Default: 30.163618087768555 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,30.163618087768555,L - Color: 1,0,0 - } - Channel: "Y" { - Default: -122.287361145019531 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-122.287361145019531,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 177.115859985351562 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,177.115859985351562,L - Color: 0,0,1 - } - LayerType: 1 - } - Channel: "R" { - Channel: "X" { - Default: 127.261040841978527 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,127.261040841978527,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 3.163707551608806 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,3.163707551608806,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 16.936319773499580 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,16.936319773499580,L - Color: 0,0,1 - } - LayerType: 2 - } - Channel: "S" { - Channel: "X" { - Default: 29.999998092651367 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,29.999998092651367,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 30.000000000000000 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,30.000000000000000,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 29.999996185302734 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,29.999996185302734,L - Color: 0,0,1 - } - LayerType: 3 - } - } - } - } -} -;Version 5 settings -;------------------------------------------------------------------ - -Version5: { - AmbientRenderSettings: { - Version: 101 - AmbientLightColor: 0.0,0.0,0.0,0 - } - FogOptions: { - FogEnable: 0 - FogMode: 0 - FogDensity: 0.000 - FogStart: 5.000 - FogEnd: 25.000 - FogColor: 0.1,0.1,0.1,1 - } - Settings: { - FrameRate: "24" - TimeFormat: 1 - SnapOnFrames: 0 - ReferenceTimeIndex: -1 - TimeLineStartTime: 0 - TimeLineStopTime: 479181389250 - } - RendererSetting: { - DefaultCamera: "Producer Perspective" - DefaultViewingMode: 0 - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/ship.fbx.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/ship.fbx.meta deleted file mode 100644 index c871c1819..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/ship.fbx.meta +++ /dev/null @@ -1,70 +0,0 @@ -fileFormatVersion: 2 -guid: aad20efdfba4b7c418eea1794edbb9f0 -ModelImporter: - serializedVersion: 15 - fileIDToRecycleName: - 100000: Camera - 100002: Cube - 100004: Lamp - 100006: //RootNode - 400000: Camera - 400002: Cube - 400004: Lamp - 400006: //RootNode - 2300000: Cube - 3300000: Cube - 4300000: Cube - 7400000: Default Take - 9500000: //RootNode - materials: - importMaterials: 1 - materialName: 0 - materialSearch: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - optimizeGameObjects: 0 - animationCompression: 1 - animationRotationError: .5 - animationPositionError: .5 - animationScaleError: .5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - clipAnimations: [] - isReadable: 1 - meshes: - lODScreenPercentages: [] - globalScale: .00999999978 - meshCompression: 0 - addColliders: 0 - importBlendShapes: 1 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - optimizeMeshForGPU: 1 - weldVertices: 1 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVPackMargin: 4 - tangentSpace: - normalSmoothAngle: 60 - splitTangentsAcrossUV: 1 - normalImportMode: 1 - tangentImportMode: 1 - importAnimation: 1 - copyAvatar: 0 - humanDescription: - human: [] - skeleton: [] - armTwist: .5 - foreArmTwist: .5 - upperLegTwist: .5 - legTwist: .5 - armStretch: .0500000007 - legStretch: .0500000007 - feetSpacing: 0 - rootMotionBoneName: - lastHumanDescriptionAvatarSource: {instanceID: 0} - animationType: 2 - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/shipfractured.fbx b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/shipfractured.fbx deleted file mode 100644 index 7b78bf3f2..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/shipfractured.fbx +++ /dev/null @@ -1,3112 +0,0 @@ -; FBX 6.1.0 project file -; Created by Blender FBX Exporter -; for support mail: ideasman42@gmail.com -; ---------------------------------------------------- - -FBXHeaderExtension: { - FBXHeaderVersion: 1003 - FBXVersion: 6100 - CreationTimeStamp: { - Version: 1000 - Year: 2013 - Month: 08 - Day: 14 - Hour: 20 - Minute: 40 - Second: 22 - Millisecond: 0 - } - Creator: "FBX SDK/FBX Plugins build 20070228" - OtherFlags: { - FlagPLE: 0 - } -} -CreationTime: "2013-08-14 20:40:22:000" -Creator: "Blender version 2.67 (sub 0)" - -; Object definitions -;------------------------------------------------------------------ - -Definitions: { - Version: 100 - Count: 17 - ObjectType: "Model" { - Count: 15 - } - ObjectType: "Geometry" { - Count: 5 - } - ObjectType: "Material" { - Count: 1 - } - ObjectType: "Pose" { - Count: 1 - } - ObjectType: "GlobalSettings" { - Count: 1 - } -} - -; Object properties -;------------------------------------------------------------------ - -Objects: { - Model: "Model::Camera Switcher", "CameraSwitcher" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Camera Index", "Integer", "A+",100 - } - MultiLayer: 0 - MultiTake: 1 - Hidden: "True" - Shading: W - Culling: "CullingOff" - Version: 101 - Name: "Model::Camera Switcher" - CameraId: 0 - CameraName: 100 - CameraIndexName: - } - Model: "Model::Camera", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",-195.229202270507812,-224.433944702148438,160.309951782226562 - Property: "Lcl Rotation", "Lcl Rotation", "A+",90.692160214458610,26.439033899677728,47.000136773245160 - Property: "Lcl Scaling", "Lcl Scaling", "A+",30.000001907348633,30.000001907348633,29.999998092651367 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Size", "double", "",100 - Property: "Look", "enum", "",1 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",28.841546 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "FocalLength", "Number", "A+",35.000000 - Property: "FilmOffsetX", "Number", "A+",0.000000 - Property: "FilmOffsetY", "Number", "A+",0.000000 - Property: "BackgroundColor", "Color", "A+",0,0,0 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",3 - Property: "GateFit", "enum", "",2 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",1920 - Property: "AspectH", "double", "",1080 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",3.000000 - Property: "FarPlane", "double", "",2999.999809 - Property: "FilmWidth", "double", "",1.259843 - Property: "FilmHeight", "double", "",0.708661 - Property: "FilmAspectRatio", "double", "",1.777778 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",0 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.777778 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",0 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: -195.229202,-224.433945,160.309952 - Up: 0.312469,0.317370,0.895343 - LookAt: -0.727634,0.685881,0.010817 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Lamp", "Light" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",30.163618087768555,-122.287361145019531,177.115859985351562 - Property: "Lcl Rotation", "Lcl Rotation", "A+",127.261054502356870,3.163707551608806,16.936319773499580 - Property: "Lcl Scaling", "Lcl Scaling", "A+",29.999998092651367,30.000000000000000,29.999996185302734 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Size", "double", "",100 - Property: "Look", "enum", "",1 - Property: "LightType", "enum", "",0 - Property: "CastLightOnObject", "bool", "",1 - Property: "DrawVolumetricLight", "bool", "",1 - Property: "DrawGroundProjection", "bool", "",1 - Property: "DrawFrontFacingVolumetricLight", "bool", "",0 - Property: "GoboProperty", "object", "" - Property: "Color", "Color", "A+",1,1,1 - Property: "Intensity", "Intensity", "A+",100.00 - Property: "Fog", "Fog", "A+",50 - Property: "Color", "Color", "A",1.00,1.00,1.00 - Property: "Intensity", "Intensity", "A+",100.00 - Property: "Fog", "Fog", "A+",50 - Property: "LightType", "enum", "",0 - Property: "CastLightOnObject", "bool", "",1 - Property: "DrawGroundProjection", "bool", "",1 - Property: "DrawFrontFacingVolumetricLight", "bool", "",0 - Property: "DrawVolumetricLight", "bool", "",1 - Property: "GoboProperty", "object", "" - Property: "DecayType", "enum", "",0 - Property: "DecayStart", "double", "",30.00 - Property: "EnableNearAttenuation", "bool", "",0 - Property: "NearAttenuationStart", "double", "",0 - Property: "NearAttenuationEnd", "double", "",0 - Property: "EnableFarAttenuation", "bool", "",0 - Property: "FarAttenuationStart", "double", "",0 - Property: "FarAttenuationEnd", "double", "",0 - Property: "CastShadows", "bool", "",1 - Property: "ShadowColor", "ColorRGBA", "",0,0,0,1 - } - MultiLayer: 0 - MultiTake: 0 - Shading: Y - Culling: "CullingOff" - TypeFlags: "Light" - GeometryVersion: 124 - } - Model: "Model::Cube_012", "Mesh" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.283237457275391,2.413097381591797,0.465340465307236 - Property: "Lcl Rotation", "Lcl Rotation", "A+",179.999882065292638,89.999961523213827,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",34.729896545410156,34.729896545410156,34.729896545410156 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Size", "double", "",100 - Property: "Look", "enum", "",1 - } - MultiLayer: 0 - MultiTake: 1 - Shading: Y - Culling: "CullingOff" - Vertices: -0.335174,-0.604804,-0.149168,1.013399,0.069481,0.398836,-0.369798,-0.622116,0.398836,-0.377317,-0.471452,0.398836,1.013399,0.069482,-0.247273,-0.328975,-0.601705,-0.247273,-0.381720,-0.021452,0.120040 - ,-0.405414,0.091563,0.398836,-0.336563,-0.455601,-0.242698,-0.335833,-0.464291,-0.247273,-0.322939,-0.450302,-0.247273,0.291003,0.430680,-0.143612,0.100123,0.526119,0.398836,0.426569,0.362897,-0.247273 - ,-0.008429,0.432809,0.398836,-0.347254,-0.328314,-0.175694,-0.370050,-0.077113,-0.017270,0.367731,0.299059,-0.247273,0.021743,0.458745,0.398836,0.383888,0.316589,-0.247273,0.243287,0.392890,-0.136867 - ,-0.367220,-0.090610,-0.050566,0.225466,0.378776,-0.134348,0.200079,0.358671,-0.130759 - PolygonVertexIndex: 0,1,-3,0,5,4,-2,13,4,-20,19,4,-18,17,4,-11,10,4,5,-10,4,13,11,-2,11,12,-2,18,1,-13,14,1,-19,3,1,14,-8,2,1,-4,15,17,10,-9 - ,8,10,-10,22,19,17,-24,17,15,21,-24,11,13,19,-21,20,19,-23,21,15,-17,15,0,6,-17,8,0,-16,6,0,3,-8,5,0,8,-10,0,2,-4,20,22,23,-19,23,21,16,-19 - ,18,12,11,-21,16,6,14,-19,6,7,-15 - Edges: - GeometryVersion: 124 - LayerElementNormal: 0 { - Version: 101 - Name: "" - MappingInformationType: "ByVertice" - ReferenceInformationType: "Direct" - Normals: -0.502090513706207,-0.862788796424866,-0.058961760252714,0.834589660167694,0.000000000000000,0.550828576087952 - ,-0.439741194248199,-0.720053732395172,0.536729037761688,-0.728659927845001,-0.036347545683384,0.683889269828796 - ,0.834589660167694,0.000000000000000,-0.550828576087952,-0.395641952753067,-0.712118923664093,-0.579912722110748 - ,-0.900448620319366,0.371013522148132,-0.226905122399330,-0.754722714424133,0.399273663759232,0.520493149757385 - ,-0.833338439464569,0.201025426387787,-0.514847278594971,-0.679891347885132,0.052003540098667,-0.731437087059021 - ,-0.223822742700577,0.206274598836899,-0.952513217926025,-0.113681450486183,0.882045984268188,-0.457197785377502 - ,-0.188879057765007,0.840540766716003,0.507705926895142,0.137821584939957,0.682638049125671,-0.717612206935883 - ,-0.533768713474274,0.620960116386414,0.573992133140564,-0.833338439464569,0.201025426387787,-0.514847278594971 - ,-0.900448620319366,0.371013522148132,-0.226905122399330,-0.223822742700577,0.206274598836899,-0.952513217926025 - ,-0.533768713474274,0.620960116386414,0.573992133140564,-0.223822742700577,0.206305116415024,-0.952513217926025 - ,-0.544785916805267,0.579729616641998,-0.605853438377380,-0.823969244956970,0.340769678354263,-0.452681064605713 - ,-0.544785916805267,0.579729616641998,-0.605853438377380,-0.544785916805267,0.579729616641998,-0.605853438377380 - } - LayerElementSmoothing: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByPolygon" - ReferenceInformationType: "Direct" - Smoothing: 0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - LayerElementUV: 0 { - Version: 101 - Name: "UVMap" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "IndexToDirect" - UV: 0.151840,0.000000,1.000000,-0.000000,1.000000,0.691598,0.151840,0.151840,0.155738,0.000000,1.000000,0.000000,1.000000,1.000000 - ,0.000000,0.000000,1.000000,0.000000,1.000000,1.000000,0.000000,0.000000,1.000000,0.000000,1.000002,1.000002,0.000000,0.000000 - ,1.000000,0.000000,1.000000,1.000000,-0.000000,0.000000,1.000000,0.000000,1.000000,0.844261,0.050831,0.050832,1.000000,-0.000000 - ,1.000000,1.000000,0.839562,1.000000,0.000000,-0.000000,0.839562,1.000000,0.000000,0.637851,0.000000,-0.000000,0.354364,-0.000000 - ,1.000000,-0.000000,0.999999,0.637851,0.351366,-0.000002,0.999999,-0.000001,0.999998,0.645634,0.146660,0.000000,1.000000,-0.000000 - ,0.999999,0.648632,0.602431,0.489339,0.691598,0.691598,-0.000000,-0.000000,0.853340,-0.000000,0.534935,0.609659,0.523151,0.397622 - ,0.564946,0.620619,0.563758,0.623816,0.563758,0.623816,0.564946,0.620619,0.565726,0.624782,0.482092,0.413879,0.522173,0.392406 - ,0.523151,0.397622,0.482050,0.421133,0.523151,0.397622,0.534935,0.609659,0.481108,0.583223,0.482050,0.421133,0.482201,0.395154 - ,0.519590,0.378625,0.522173,0.392406,0.482122,0.408787,0.482122,0.408787,0.522173,0.392406,0.482092,0.413879,0.483039,0.504095 - ,0.431930,0.472724,0.490974,0.502908,0.431930,0.472724,0.405547,0.416733,0.523697,0.498012,0.490973,0.502908,0.404562,0.455925 - ,0.405547,0.416733,0.431930,0.472724,0.523697,0.498012,0.405547,0.416733,0.526036,0.380180,0.590138,0.488073,0.387048,0.428445 - ,0.405547,0.416733,0.404562,0.455925,0.402694,0.454778,0.405547,0.416733,0.508882,0.351308,0.526036,0.380180,0.356866,0.480674 - ,0.363564,0.482751,0.373104,0.485710,0.462857,0.336590,0.373104,0.485710,0.586304,0.551833,0.588850,0.541082,0.462857,0.336590 - ,0.462857,0.336590,0.433900,0.323722,0.338934,0.475113,0.356866,0.480674,0.588850,0.541082,0.599349,0.496743,0.474004,0.341543 - ,0.462857,0.336590,0.599349,0.496743,0.620668,0.406718,0.474004,0.341543 - UVIndex: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54 - ,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101 - } - LayerElementTexture: 0 { - Version: 101 - Name: "" - MappingInformationType: "NoMappingInformation" - ReferenceInformationType: "IndexToDirect" - BlendMode: "Translucent" - TextureAlpha: 1 - TextureId: - } - LayerElementMaterial: 0 { - Version: 101 - Name: "" - MappingInformationType: "AllSame" - ReferenceInformationType: "IndexToDirect" - Materials: 0 - } - Layer: 0 { - Version: 100 - LayerElement: { - Type: "LayerElementNormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementMaterial" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementSmoothing" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementUV" - TypedIndex: 0 - } - } - } - Model: "Model::Cube_011", "Mesh" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",-6.522933959960938,-11.611951828002930,6.640708446502686 - Property: "Lcl Rotation", "Lcl Rotation", "A+",179.999882065292638,89.999961523213827,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",34.729896545410156,34.729896545410156,34.729896545410156 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Size", "double", "",100 - Property: "Look", "enum", "",1 - } - MultiLayer: 0 - MultiTake: 1 - Shading: Y - Culling: "CullingOff" - Vertices: 0.468816,0.026848,-0.339586,-0.240589,0.381550,0.202862,0.277935,0.122287,0.202862,0.421099,-0.010942,-0.332841,-0.261116,0.359279,0.202862,0.199555,0.054913,0.202862,-0.254828,0.233276,0.202862 - ,-0.250386,0.231532,0.135615,0.403278,-0.025056,-0.330322,-0.252111,0.178846,0.202862,0.169383,0.028977,0.202862,-0.245771,0.176592,0.106694,0.377891,-0.045161,-0.326733,-0.227602,-0.312269,0.202862 - ,-0.189408,-0.494442,-0.246540,-0.192238,-0.480945,-0.213245,-0.203908,-0.425284,-0.075934 - PolygonVertexIndex: 0,1,-3,1,4,5,-3,4,6,-6,5,6,9,-11,10,9,-14,11,7,8,-13,14,11,-13,1,0,3,-5,7,4,3,-9,15,9,11,-15,9,7,-12,16,9,-16,9,6,-8 - ,13,9,-17,6,4,-8,12,8,3,-6,5,10,15,-13,15,14,-13,0,2,5,-4,10,13,16,-16 - Edges: - GeometryVersion: 124 - LayerElementNormal: 0 { - Version: 101 - Name: "" - MappingInformationType: "ByVertice" - ReferenceInformationType: "Direct" - Normals: 0.763267934322357,0.065614797174931,-0.642719805240631,-0.358378857374191,0.892056047916412,0.275185406208038 - ,0.723258137702942,0.195593133568764,0.662282168865204,0.310007005929947,-0.532059669494629,-0.787896335124969 - ,-0.821680366992950,0.487166970968246,0.295724362134933,0.374156922101974,-0.435254991054535,0.818842113018036 - ,-0.728659927845001,-0.036347545683384,0.683889269828796,-0.833338439464569,0.201025426387787,-0.514847278594971 - ,0.310007005929947,-0.532059669494629,-0.787896335124969,-0.728659927845001,-0.036347545683384,0.683889269828796 - ,0.374156922101974,-0.435254991054535,0.818842113018036,-0.833338439464569,0.201025426387787,-0.514847278594971 - ,0.310007005929947,-0.532059669494629,-0.787896335124969,-0.412671297788620,-0.636066794395447,0.651966929435730 - ,-0.301828056573868,-0.792474150657654,-0.529923379421234,-0.427747428417206,-0.849726855754852,0.308084338903427 - ,-0.427747428417206,-0.849726855754852,0.308084338903427 - } - LayerElementSmoothing: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByPolygon" - ReferenceInformationType: "Direct" - Smoothing: 0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - LayerElementUV: 0 { - Version: 101 - Name: "UVMap" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "IndexToDirect" - UV: 0.839562,1.000000,-0.000000,1.000000,0.000000,0.637851,1.000000,1.000000,0.802888,0.802888,0.354364,-0.000000,0.999999,0.637851 - ,0.802888,0.802888,0.058529,-0.000001,0.354364,-0.000000,0.999998,0.645634,0.999997,0.941467,0.083811,-0.000002,0.351366,-0.000002 - ,0.999999,0.648632,0.999999,0.916187,0.602431,0.489339,0.329155,0.508592,0.316714,0.502482,0.482092,0.413879,0.482050,0.421133 - ,0.481108,0.583223,0.329155,0.508592,0.482050,0.421133,0.286545,0.481647,0.482201,0.395154,0.482122,0.408787,0.287787,0.488274 - ,0.316714,0.502482,0.287787,0.488274,0.482122,0.408787,0.482092,0.413879,0.490974,0.502908,0.646054,0.582187,0.627318,0.592654 - ,0.483039,0.504095,0.646054,0.582187,0.639130,0.599905,0.627318,0.592654,0.523697,0.498012,0.646054,0.582187,0.490973,0.502908 - ,0.646054,0.582187,0.652251,0.592618,0.639130,0.599905,0.590138,0.488073,0.646054,0.582187,0.523697,0.498012,0.652251,0.592618 - ,0.666597,0.616764,0.639130,0.599905,0.373104,0.485710,0.363564,0.482751,0.356866,0.480674,0.462857,0.336590,0.462857,0.336590 - ,0.474004,0.341543,0.588850,0.541082,0.373104,0.485710,0.588850,0.541082,0.586304,0.551833,0.373104,0.485710,0.338934,0.475113 - ,0.433900,0.323722,0.462857,0.336590,0.356866,0.480674,0.474004,0.341543,0.620668,0.406718,0.599349,0.496743,0.588850,0.541082 - UVIndex: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54 - ,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69 - } - LayerElementTexture: 0 { - Version: 101 - Name: "" - MappingInformationType: "NoMappingInformation" - ReferenceInformationType: "IndexToDirect" - BlendMode: "Translucent" - TextureAlpha: 1 - TextureId: - } - LayerElementMaterial: 0 { - Version: 101 - Name: "" - MappingInformationType: "AllSame" - ReferenceInformationType: "IndexToDirect" - Materials: 0 - } - Layer: 0 { - Version: 100 - LayerElement: { - Type: "LayerElementNormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementMaterial" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementSmoothing" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementUV" - TypedIndex: 0 - } - } - } - Model: "Model::Cube_009", "Mesh" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",-0.709496498107910,-3.220736265182495,25.985172271728516 - Property: "Lcl Rotation", "Lcl Rotation", "A+",179.999882065292638,89.999961523213827,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",34.729896545410156,34.729896545410156,34.729896545410156 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Size", "double", "",100 - Property: "Look", "enum", "",1 - } - MultiLayer: 0 - MultiTake: 1 - Shading: Y - Culling: "CullingOff" - Vertices: -0.251792,-1.092735,-0.160148,-0.251792,-1.092735,-0.275857,0.158210,-0.887734,-0.275857,-0.248237,-1.051952,-0.142334,0.118477,-0.726637,-0.275857,0.192036,-0.698026,-0.275857,0.227946,-0.812072,-0.275857 - ,0.118477,-0.726637,-0.177340,-0.139476,-0.849930,-0.101800,-0.234590,-0.895391,-0.073946,-0.234590,-0.895391,-0.275857,0.231386,-0.627564,-0.188644,0.118840,-0.465563,-0.275857,0.251280,0.439521,0.315745 - ,0.172850,0.467408,0.370251,0.120165,0.486141,0.370251,0.120166,0.486141,0.150725,0.120060,0.410132,0.370251,0.251316,0.441439,0.316651,-0.251792,0.692342,0.370251,-0.026581,0.567493,-0.020951 - ,0.212271,0.510179,0.370251,0.252354,0.497109,0.342965,-0.251792,0.692342,-0.275857,-0.244473,0.688285,-0.275857,0.253430,0.554835,0.370251,0.216127,0.673305,0.370251,-0.251792,0.907265,0.370251 - ,-0.244898,0.689636,-0.275857,-0.251792,0.907265,-0.188509,-0.251792,0.711531,-0.275857 - PolygonVertexIndex: 0,1,-3,28,23,-31,24,23,-29,5,4,-13,6,2,4,-6,2,1,-5,1,10,-5,23,27,29,-31,19,27,-24,20,19,23,-25,15,19,20,-17,12,4,15,-17,17,15,4,-8 - ,4,10,8,-8,8,10,-10,10,1,3,-10,1,0,-4,29,27,-27,26,19,21,-26,26,27,-20,21,19,15,-15,14,15,-18,7,2,6,-12,14,7,13,-19,13,7,-12,14,17,-8 - ,8,3,2,-8,21,14,18,-23,3,0,-3,25,21,-23,8,9,-4,18,13,20,-23,11,12,16,-14,20,24,28,-23,13,16,-21,11,6,5,-13,28,30,25,-23,30,29,26,-26 - Edges: - GeometryVersion: 124 - LayerElementNormal: 0 { - Version: 101 - Name: "" - MappingInformationType: "ByVertice" - ReferenceInformationType: "Direct" - Normals: -0.441663861274719,-0.749809265136719,0.492599248886108,-0.468092888593674,-0.688589155673981,-0.553788900375366 - ,0.668324828147888,-0.679006338119507,-0.303750723600388,-0.547746181488037,-0.294320493936539,0.783135473728180 - ,-0.447309792041779,0.282387763261795,-0.848597645759583,0.448225349187851,0.141117587685585,-0.882686853408813 - ,0.836420774459839,-0.457869201898575,-0.301187157630920,-0.244666889309883,-0.024964140728116,0.969267845153809 - ,-0.005005035549402,0.530014932155609,0.847956776618958,-0.477675706148148,0.279946297407150,0.832697510719299 - ,-0.650898754596710,0.451002538204193,-0.610644876956940,0.972075581550598,-0.114841148257256,0.204596087336540 - ,-0.321573525667191,0.329538851976395,-0.887661337852478,0.972075581550598,-0.114841148257256,0.204596087336540 - ,0.223822742700577,-0.206274598836899,0.952513217926025,-0.466231256723404,-0.274178296327591,0.841090142726898 - ,0.203527942299843,-0.317117840051651,-0.926267266273499,-0.526902079582214,-0.276314586400986,0.803704917430878 - ,0.972075581550598,-0.114841148257256,0.204596087336540,-0.683584094047546,-0.402630686759949,0.608722209930420 - ,0.343302726745605,-0.700643956661224,-0.625476837158203,0.223822742700577,-0.206305116415024,0.952513217926025 - ,0.972075581550598,-0.114841148257256,0.204596087336540,-0.683584094047546,-0.402630686759949,-0.608722209930420 - ,0.209082305431366,-0.606067061424255,-0.767418444156647,0.871944308280945,0.116580709815025,0.475447863340378 - ,0.758171319961548,0.472396016120911,0.449415564537048,-0.436689347028732,0.706564545631409,0.556779682636261 - ,0.448225349187851,0.141117587685585,-0.882686853408813,-0.274422436952591,0.739921271800995,-0.614123940467834 - ,-0.321787178516388,0.328104496002197,-0.888119161128998 - } - LayerElementSmoothing: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByPolygon" - ReferenceInformationType: "Direct" - Smoothing: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - LayerElementUV: 0 { - Version: 101 - Name: "UVMap" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "IndexToDirect" - UV: 0.000000,0.000000,1.000000,0.000000,1.000000,1.000000,-0.000000,0.005030,-0.000000,0.000000,0.089280,0.000000,0.980322,0.000000 - ,1.000000,-0.000000,0.999996,0.005030,0.749281,0.000000,1.000000,-0.000000,1.000000,0.215270,-0.000000,0.274918,-0.000000,0.000000 - ,1.000000,1.000000,0.749281,1.000000,-0.000000,0.000000,0.999999,-0.000000,1.000000,1.000000,-0.000000,0.000000,1.000000,-0.000000 - ,1.000000,1.000000,1.000000,1.000000,-0.000000,0.000001,0.864809,-0.000000,1.000000,0.910721,-0.000000,0.000000,0.999999,-0.000000 - ,1.000000,1.000000,0.605474,0.605475,0.000000,0.000000,1.000000,0.000000,1.000000,0.019678,0.000000,0.000000,1.000000,0.000000 - ,1.000000,0.605474,0.339767,0.339767,1.000000,0.784730,1.000000,1.000000,0.000000,0.000000,0.339767,0.000000,0.000000,0.000000 - ,1.000000,0.000000,1.000000,1.000000,-0.000003,1.000002,-0.000000,0.000000,1.000000,0.000000,1.000000,1.000000,-0.000000,1.000000 - ,-0.000001,-0.000001,1.000000,0.000000,1.000000,1.000000,-0.000000,0.000000,1.000000,0.000000,1.000000,1.000000,-0.000000,1.000000 - ,1.000001,0.000002,0.999999,0.999998,0.000000,0.000000,0.135191,0.000000,1.000000,0.000000,1.000000,0.823512,0.176488,0.000000 - ,1.000000,1.000000,-0.000000,1.000000,-0.000000,0.604763,0.176488,0.000000,1.000000,0.000001,1.000000,1.000000,-0.000000,0.000001 - ,1.000004,0.000003,1.000006,1.000001,0.000003,1.000000,-0.000001,0.000000,1.000000,0.000001,0.999999,1.000000,0.539369,0.689457 - ,0.580295,0.702518,0.576076,0.680003,0.537508,0.655973,0.295232,0.527997,0.539369,0.689453,0.314459,0.516999,0.314058,0.516749 - ,0.314459,0.516999,0.539369,0.689453,0.537508,0.655969,0.295232,0.527997,0.298426,0.545042,0.539369,0.689457,0.521754,0.752891 - ,0.546164,0.798659,0.580295,0.702518,0.539369,0.689457,0.292846,0.515269,0.295232,0.527997,0.314058,0.516749,0.302422,0.509499 - ,0.546164,0.798659,0.554214,0.804489,0.580295,0.702518,0.290356,0.501980,0.292846,0.515269,0.302422,0.509499,0.521754,0.752891 - ,0.515259,0.776281,0.546164,0.798659,0.506641,0.361825,0.506439,0.362252,0.594531,0.412218,0.512526,0.349442,0.393634,0.599612 - ,0.441508,0.595920,0.546483,0.388820,0.506439,0.362252,0.594531,0.412218,0.665873,0.446961,0.666136,0.446787,0.512526,0.349442 - ,0.506439,0.362252,0.546483,0.388820,0.594531,0.412218,0.393634,0.599612,0.374129,0.640654,0.396305,0.625931,0.441508,0.595920 - ,0.666136,0.446787,0.670393,0.443960,0.518629,0.336602,0.512526,0.349442,0.670393,0.443960,0.692056,0.401442,0.541665,0.321307 - ,0.518629,0.336602 - UVIndex: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54 - ,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109 - ,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133 - } - LayerElementTexture: 0 { - Version: 101 - Name: "" - MappingInformationType: "NoMappingInformation" - ReferenceInformationType: "IndexToDirect" - BlendMode: "Translucent" - TextureAlpha: 1 - TextureId: - } - LayerElementMaterial: 0 { - Version: 101 - Name: "" - MappingInformationType: "AllSame" - ReferenceInformationType: "IndexToDirect" - Materials: 0 - } - Layer: 0 { - Version: 100 - LayerElement: { - Type: "LayerElementNormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementMaterial" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementSmoothing" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementUV" - TypedIndex: 0 - } - } - } - Model: "Model::Cube_008", "Mesh" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",1.613526225090027,-12.612447738647461,17.974212646484375 - Property: "Lcl Rotation", "Lcl Rotation", "A+",179.999882065292638,89.999961523213827,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",34.729896545410156,34.729896545410156,34.729896545410156 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Size", "double", "",100 - Property: "Look", "enum", "",1 - } - MultiLayer: 0 - MultiTake: 1 - Shading: Y - Culling: "CullingOff" - Vertices: -0.482456,0.441109,-0.208968,-0.482456,0.636843,-0.208968,0.930714,-0.069742,-0.208969,0.888033,-0.116050,-0.208968,-0.475562,0.419214,-0.208968,-0.482456,0.636843,-0.121620,0.085743,0.352743,0.437140 - ,-0.014537,0.402883,0.437140,0.021689,0.226687,0.409854,0.020652,0.171017,0.383540,0.871876,-0.133580,-0.208968,-0.110498,0.215719,-0.208968,-0.475137,0.417863,-0.208968,0.022766,0.284413,0.437140 - ,0.020616,0.169099,0.382633,0.181206,-0.882941,-0.208969,-0.111824,-0.735985,-0.208969,-0.038628,-0.968448,-0.208968,-0.257245,0.297071,0.045938,0.000722,-0.897986,-0.121755,-0.110499,0.215719,0.217613 - ,-0.002718,-1.082494,-0.208969 - PolygonVertexIndex: 0,2,3,-5,0,1,-3,4,3,11,-13,3,10,-12,16,11,15,-18,11,10,-16,17,15,-22,1,0,-6,12,11,-19,18,11,-21,20,11,-17,6,1,5,-8,6,2,-2 - ,13,6,-8,15,10,19,-22,10,9,14,-20,10,3,-10,9,3,2,-9,8,2,6,-14,9,8,18,-15,20,16,19,-15,8,13,4,-19,18,20,-15,17,21,19,-17,0,4,13,-8,4,12,-19 - ,5,0,-8 - Edges: - GeometryVersion: 124 - LayerElementNormal: 0 { - Version: 101 - Name: "" - MappingInformationType: "ByVertice" - ReferenceInformationType: "Direct" - Normals: -0.854731917381287,-0.223914310336113,-0.468214958906174,-0.436689347028732,0.706564545631409,-0.556779682636261 - ,0.973143696784973,0.011505478061736,-0.229773864150047,0.700399816036224,-0.645558059215546,-0.304391622543335 - ,-0.841944634914398,-0.265083760023117,-0.469924002885818,-0.565599560737610,0.734733104705811,0.374462097883224 - ,0.514969348907471,0.423139125108719,0.745475649833679,-0.231482893228531,0.607409894466400,0.759880363941193 - ,-0.234015926718712,-0.411877810955048,0.880642116069794,-0.234015926718712,-0.411877810955048,0.880642116069794 - ,0.700399816036224,-0.645558059215546,-0.304391622543335,-0.466231256723404,-0.274178296327591,-0.841090142726898 - ,-0.766502857208252,-0.456465333700180,-0.451765507459641,-0.224311038851738,-0.325998723506927,0.918332457542419 - ,-0.234015926718712,-0.411877810955048,0.880642116069794,0.700338780879974,-0.645496964454651,-0.304635763168335 - ,-0.854853987693787,-0.223578602075577,-0.468214958906174,-0.841944634914398,-0.265083760023117,-0.469924002885818 - ,-0.713034451007843,-0.627887785434723,0.311960190534592,-0.234015926718712,-0.411877810955048,0.880642116069794 - ,-0.852992355823517,-0.300363183021545,0.426770836114883,-0.158696249127388,-0.975188434123993,-0.154240548610687 - } - LayerElementSmoothing: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByPolygon" - ReferenceInformationType: "Direct" - Smoothing: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - LayerElementUV: 0 { - Version: 101 - Name: "UVMap" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "IndexToDirect" - UV: 0.089280,0.000000,1.000000,1.000000,0.000001,1.000000,-0.000000,0.005030,0.089280,0.000000,1.000001,-0.000000,1.000000,1.000000 - ,0.999996,0.005030,1.000002,1.000000,-0.000001,-0.000000,0.980322,0.000000,1.000002,1.000000,0.000000,1.000000,-0.000001,-0.000000 - ,1.000000,0.215270,1.000000,1.000000,-0.000000,-0.000000,0.749281,0.000000,1.000000,1.000000,0.000000,1.000000,-0.000000,-0.000000 - ,0.749281,1.000000,-0.000000,1.000000,-0.000000,0.274918,1.000000,-0.000000,1.000000,0.910721,0.864809,-0.000000,1.000000,0.019678 - ,1.000000,1.000000,0.605474,0.605475,1.000000,0.605474,1.000000,1.000000,0.339767,0.339767,0.339767,0.000000,1.000000,0.000000 - ,1.000000,0.784730,1.000000,1.000000,0.000000,0.000000,0.135191,0.000000,1.000000,0.823512,1.000000,1.000000,-0.000000,1.000000 - ,0.000000,0.000000,-0.000000,0.604763,-0.000000,0.000000,0.176488,0.000000,0.564946,0.620619,0.523151,0.397622,0.537508,0.655973 - ,0.576076,0.680003,0.523151,0.397622,0.314058,0.516749,0.314459,0.516999,0.537508,0.655969,0.523151,0.397622,0.522173,0.392406 - ,0.314058,0.516749,0.314058,0.516749,0.522173,0.392405,0.519590,0.378625,0.302422,0.509499,0.302422,0.509499,0.519590,0.378625 - ,0.286545,0.481647,0.290356,0.501980,0.506641,0.361825,0.512526,0.349442,0.594531,0.412218,0.506439,0.362252,0.546483,0.388820 - ,0.441508,0.595920,0.393634,0.599612,0.506439,0.362252,0.512526,0.349442,0.518629,0.336602,0.666136,0.446787,0.594531,0.412218 - ,0.594531,0.412218,0.546483,0.388820,0.506439,0.362252,0.396305,0.625931,0.374129,0.640654,0.393634,0.599612,0.441508,0.595920 - ,0.670393,0.443960,0.666136,0.446787,0.518629,0.336602,0.541665,0.321307,0.666136,0.446787,0.665873,0.446961,0.594531,0.412218 - ,0.692056,0.401442,0.670393,0.443960,0.541665,0.321307 - UVIndex: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54 - ,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93 - } - LayerElementTexture: 0 { - Version: 101 - Name: "" - MappingInformationType: "NoMappingInformation" - ReferenceInformationType: "IndexToDirect" - BlendMode: "Translucent" - TextureAlpha: 1 - TextureId: - } - LayerElementMaterial: 0 { - Version: 101 - Name: "" - MappingInformationType: "AllSame" - ReferenceInformationType: "IndexToDirect" - Materials: 0 - } - Layer: 0 { - Version: 100 - LayerElement: { - Type: "LayerElementNormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementMaterial" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementSmoothing" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementUV" - TypedIndex: 0 - } - } - } - Model: "Model::Cube_006", "Mesh" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",-4.346582412719727,9.987678527832031,20.524810791015625 - Property: "Lcl Rotation", "Lcl Rotation", "A+",179.999882065292638,89.999961523213827,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",34.729896545410156,34.729896545410156,34.729896545410156 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Size", "double", "",100 - Property: "Look", "enum", "",1 - } - MultiLayer: 0 - MultiTake: 1 - Shading: Y - Culling: "CullingOff" - Vertices: 0.207787,-0.404015,0.265526,-0.409017,-0.712417,0.265526,-0.409017,-0.712417,-0.264873,0.242411,-0.386704,-0.282477,0.000986,-0.507416,-0.380582,0.200268,-0.253351,0.265526,-0.038748,-0.346319,0.265526 - ,-0.391815,-0.515073,0.265526,-0.405462,-0.671635,-0.247059,0.248609,-0.383604,-0.380582,0.147661,0.800778,0.265526,0.015625,0.847726,0.265526,-0.037165,0.790450,0.265526,-0.391815,-0.515074,-0.178671 - ,-0.296701,-0.469612,-0.206525,-0.038748,-0.346319,-0.282065,0.241752,-0.246190,-0.380582,0.055047,0.890497,0.265526,0.144945,0.855209,0.265526,0.154001,0.798524,0.169359,0.230330,-0.110213,-0.309003 - ,0.241022,-0.237500,-0.376007,0.138657,0.981212,0.265526,0.149387,0.853465,0.198280 - PolygonVertexIndex: 3,0,2,-5,0,1,-3,3,4,-10,9,4,-17,15,6,-13,14,6,-16,7,6,14,-14,8,7,-14,1,7,8,-3,22,17,-19,17,11,10,-19,10,11,12,-6,12,6,-6 - ,0,5,6,-2,6,7,-2,21,15,-21,16,4,15,-22,19,11,17,-24,20,15,12,-20,12,11,-20,4,8,14,-16,23,17,-23,4,2,-9,8,13,-15,10,20,19,-24,10,3,21,-21 - ,23,18,-11,10,5,-4,3,9,16,-22,5,0,-4,23,22,-19 - Edges: - GeometryVersion: 124 - LayerElementNormal: 0 { - Version: 101 - Name: "" - MappingInformationType: "ByVertice" - ReferenceInformationType: "Direct" - Normals: 0.671559810638428,-0.411358982324600,0.616229772567749,-0.468092888593674,-0.688589155673981,0.553788900375366 - ,-0.510391533374786,-0.632343530654907,-0.582750916481018,0.862483620643616,-0.504562497138977,0.038544878363609 - ,0.046998504549265,-0.510238945484161,-0.858729839324951,0.683034777641296,0.034058656543493,0.729544997215271 - ,-0.447309792041779,0.282387763261795,0.848597645759583,-0.650898754596710,0.451002538204193,0.610644876956940 - ,-0.832819581031799,0.280892372131348,-0.476912736892700,0.706961274147034,-0.394055008888245,-0.587267696857452 - ,0.683034777641296,0.034058656543493,0.729544997215271,-0.700399816036224,0.645558059215546,0.304391622543335 - ,-0.806726276874542,0.510147392749786,0.298165827989578,-0.764763355255127,0.550401329994202,-0.334910124540329 - ,-0.488937050104141,0.738395333290100,-0.464400172233582,-0.609607219696045,0.498916596174240,-0.615955054759979 - ,0.544816434383392,0.320078134536743,-0.775048077106476,-0.700399816036224,0.645558059215546,0.304391622543335 - ,0.683034777641296,0.034058656543493,0.729544997215271,0.547624111175537,0.425275415182114,-0.720542013645172 - ,0.547715663909912,0.425275415182114,-0.720480978488922,0.547715663909912,0.425275415182114,-0.720480978488922 - ,0.213629573583603,0.961912870407104,0.170415356755257,0.547715663909912,0.425275415182114,-0.720480978488922 - } - LayerElementSmoothing: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByPolygon" - ReferenceInformationType: "Direct" - Smoothing: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - LayerElementUV: 0 { - Version: 101 - Name: "UVMap" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "IndexToDirect" - UV: 0.151840,0.000000,1.000000,0.691598,0.000000,1.000000,0.000000,0.000000,1.000000,0.691598,1.000000,1.000000,0.000000,1.000000 - ,0.151840,0.151840,0.000000,0.000000,0.155738,0.000000,1.000000,0.844262,1.000000,1.000000,0.050832,0.050832,0.000000,-0.000000 - ,1.000000,-0.000000,1.000000,1.000000,0.000000,0.000000,1.000000,-0.000000,1.000000,1.000000,0.000000,0.000000,1.000000,-0.000000 - ,1.000000,1.000000,0.000000,1.000000,0.000000,0.000000,1.000000,-0.000000,1.000000,1.000000,0.000000,0.000000,1.000000,0.000000 - ,1.000000,1.000000,0.000002,1.000000,0.802889,0.802889,0.000000,0.000000,0.058529,-0.000001,0.999999,0.999999,0.000000,0.000000 - ,0.083812,-0.000001,0.999998,0.941468,0.999999,0.916187,0.999999,1.000000,0.000001,1.000000,0.146660,0.000000,0.000001,1.000000 - ,0.000000,-0.000000,0.146660,0.000000,0.691598,0.691598,0.853340,-0.000000,1.000000,0.000000,1.000000,1.000000,0.000000,0.000000 - ,1.000000,0.000000,1.000000,1.000000,0.563758,0.623816,0.539369,0.689457,0.534935,0.609659,0.565726,0.624782,0.580295,0.702518 - ,0.539369,0.689457,0.563758,0.623816,0.329155,0.508592,0.295232,0.527997,0.292846,0.515269,0.316714,0.502482,0.534935,0.609659 - ,0.539369,0.689457,0.298426,0.545042,0.329156,0.508592,0.298426,0.545042,0.295232,0.527997,0.329156,0.508592,0.580295,0.702518 - ,0.546164,0.798659,0.521754,0.752891,0.539369,0.689457,0.316714,0.502482,0.292846,0.515269,0.287787,0.488274,0.580295,0.702518 - ,0.554214,0.804488,0.546164,0.798659,0.546164,0.798659,0.515259,0.776281,0.521754,0.752891,0.646054,0.582187,0.431930,0.472724 - ,0.627318,0.592654,0.639130,0.599905,0.646054,0.582187,0.405547,0.416733,0.404562,0.455925,0.431930,0.472724,0.639130,0.599905 - ,0.652251,0.592618,0.646054,0.582187,0.646054,0.582187,0.526036,0.380180,0.405547,0.416733,0.405547,0.416733,0.387048,0.428445 - ,0.402694,0.454778,0.404562,0.455925,0.526036,0.380180,0.508882,0.351308,0.405547,0.416733,0.639130,0.599905,0.666597,0.616764 - ,0.652251,0.592618 - UVIndex: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54 - ,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105 - } - LayerElementTexture: 0 { - Version: 101 - Name: "" - MappingInformationType: "NoMappingInformation" - ReferenceInformationType: "IndexToDirect" - BlendMode: "Translucent" - TextureAlpha: 1 - TextureId: - } - LayerElementMaterial: 0 { - Version: 101 - Name: "" - MappingInformationType: "AllSame" - ReferenceInformationType: "IndexToDirect" - Materials: 0 - } - Layer: 0 { - Version: 100 - LayerElement: { - Type: "LayerElementNormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementMaterial" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementSmoothing" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementUV" - TypedIndex: 0 - } - } - } - Model: "Model::Producer Perspective", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,71.299999999999997,287.500000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",10.000000 - Property: "FarPlane", "double", "",4000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",0 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 0.000000,71.300000,287.500000 - Up: 0,1,0 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Top", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,4000.000000000000000,0.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 0.000000,4000.000000,0.000000 - Up: 0,0,-1 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Bottom", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,-4000.000000000000000,0.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 0.000000,-4000.000000,0.000000 - Up: 0,0,-1 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Front", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,0.000000000000000,4000.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 0.000000,0.000000,4000.000000 - Up: 0,1,0 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Back", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",0.000000000000000,0.000000000000000,-4000.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 0.000000,0.000000,-4000.000000 - Up: 0,1,0 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Right", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",4000.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: 4000.000000,0.000000,0.000000 - Up: 0,1,0 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Model: "Model::Producer Left", "Camera" { - Version: 232 - Properties60: { - Property: "QuaternionInterpolate", "bool", "",0 - Property: "Visibility", "Visibility", "A+",1 - Property: "Lcl Translation", "Lcl Translation", "A+",-4000.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Rotation", "Lcl Rotation", "A+",0.000000000000000,0.000000000000000,0.000000000000000 - Property: "Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000 - Property: "RotationOffset", "Vector3D", "",0,0,0 - Property: "RotationPivot", "Vector3D", "",0,0,0 - Property: "ScalingOffset", "Vector3D", "",0,0,0 - Property: "ScalingPivot", "Vector3D", "",0,0,0 - Property: "TranslationActive", "bool", "",0 - Property: "TranslationMin", "Vector3D", "",0,0,0 - Property: "TranslationMax", "Vector3D", "",0,0,0 - Property: "TranslationMinX", "bool", "",0 - Property: "TranslationMinY", "bool", "",0 - Property: "TranslationMinZ", "bool", "",0 - Property: "TranslationMaxX", "bool", "",0 - Property: "TranslationMaxY", "bool", "",0 - Property: "TranslationMaxZ", "bool", "",0 - Property: "RotationOrder", "enum", "",0 - Property: "RotationSpaceForLimitOnly", "bool", "",0 - Property: "AxisLen", "double", "",10 - Property: "PreRotation", "Vector3D", "",0,0,0 - Property: "PostRotation", "Vector3D", "",0,0,0 - Property: "RotationActive", "bool", "",0 - Property: "RotationMin", "Vector3D", "",0,0,0 - Property: "RotationMax", "Vector3D", "",0,0,0 - Property: "RotationMinX", "bool", "",0 - Property: "RotationMinY", "bool", "",0 - Property: "RotationMinZ", "bool", "",0 - Property: "RotationMaxX", "bool", "",0 - Property: "RotationMaxY", "bool", "",0 - Property: "RotationMaxZ", "bool", "",0 - Property: "RotationStiffnessX", "double", "",0 - Property: "RotationStiffnessY", "double", "",0 - Property: "RotationStiffnessZ", "double", "",0 - Property: "MinDampRangeX", "double", "",0 - Property: "MinDampRangeY", "double", "",0 - Property: "MinDampRangeZ", "double", "",0 - Property: "MaxDampRangeX", "double", "",0 - Property: "MaxDampRangeY", "double", "",0 - Property: "MaxDampRangeZ", "double", "",0 - Property: "MinDampStrengthX", "double", "",0 - Property: "MinDampStrengthY", "double", "",0 - Property: "MinDampStrengthZ", "double", "",0 - Property: "MaxDampStrengthX", "double", "",0 - Property: "MaxDampStrengthY", "double", "",0 - Property: "MaxDampStrengthZ", "double", "",0 - Property: "PreferedAngleX", "double", "",0 - Property: "PreferedAngleY", "double", "",0 - Property: "PreferedAngleZ", "double", "",0 - Property: "InheritType", "enum", "",0 - Property: "ScalingActive", "bool", "",0 - Property: "ScalingMin", "Vector3D", "",1,1,1 - Property: "ScalingMax", "Vector3D", "",1,1,1 - Property: "ScalingMinX", "bool", "",0 - Property: "ScalingMinY", "bool", "",0 - Property: "ScalingMinZ", "bool", "",0 - Property: "ScalingMaxX", "bool", "",0 - Property: "ScalingMaxY", "bool", "",0 - Property: "ScalingMaxZ", "bool", "",0 - Property: "GeometricTranslation", "Vector3D", "",0,0,0 - Property: "GeometricRotation", "Vector3D", "",0,0,0 - Property: "GeometricScaling", "Vector3D", "",1,1,1 - Property: "LookAtProperty", "object", "" - Property: "UpVectorProperty", "object", "" - Property: "Show", "bool", "",1 - Property: "NegativePercentShapeSupport", "bool", "",1 - Property: "DefaultAttributeIndex", "int", "",0 - Property: "Color", "Color", "A",0.8,0.8,0.8 - Property: "Roll", "Roll", "A+",0 - Property: "FieldOfView", "FieldOfView", "A+",40 - Property: "FieldOfViewX", "FieldOfView", "A+",1 - Property: "FieldOfViewY", "FieldOfView", "A+",1 - Property: "OpticalCenterX", "Real", "A+",0 - Property: "OpticalCenterY", "Real", "A+",0 - Property: "BackgroundColor", "Color", "A+",0.63,0.63,0.63 - Property: "TurnTable", "Real", "A+",0 - Property: "DisplayTurnTableIcon", "bool", "",1 - Property: "Motion Blur Intensity", "Real", "A+",1 - Property: "UseMotionBlur", "bool", "",0 - Property: "UseRealTimeMotionBlur", "bool", "",1 - Property: "ResolutionMode", "enum", "",0 - Property: "ApertureMode", "enum", "",2 - Property: "GateFit", "enum", "",0 - Property: "FocalLength", "Real", "A+",21.3544940948486 - Property: "CameraFormat", "enum", "",0 - Property: "AspectW", "double", "",320 - Property: "AspectH", "double", "",200 - Property: "PixelAspectRatio", "double", "",1 - Property: "UseFrameColor", "bool", "",0 - Property: "FrameColor", "ColorRGB", "",0.3,0.3,0.3 - Property: "ShowName", "bool", "",1 - Property: "ShowGrid", "bool", "",1 - Property: "ShowOpticalCenter", "bool", "",0 - Property: "ShowAzimut", "bool", "",1 - Property: "ShowTimeCode", "bool", "",0 - Property: "NearPlane", "double", "",1.000000 - Property: "FarPlane", "double", "",30000.000000 - Property: "FilmWidth", "double", "",0.816 - Property: "FilmHeight", "double", "",0.612 - Property: "FilmAspectRatio", "double", "",1.33333333333333 - Property: "FilmSqueezeRatio", "double", "",1 - Property: "FilmFormatIndex", "enum", "",4 - Property: "ViewFrustum", "bool", "",1 - Property: "ViewFrustumNearFarPlane", "bool", "",0 - Property: "ViewFrustumBackPlaneMode", "enum", "",2 - Property: "BackPlaneDistance", "double", "",100 - Property: "BackPlaneDistanceMode", "enum", "",0 - Property: "ViewCameraToLookAt", "bool", "",1 - Property: "LockMode", "bool", "",0 - Property: "LockInterestNavigation", "bool", "",0 - Property: "FitImage", "bool", "",0 - Property: "Crop", "bool", "",0 - Property: "Center", "bool", "",1 - Property: "KeepRatio", "bool", "",1 - Property: "BackgroundMode", "enum", "",0 - Property: "BackgroundAlphaTreshold", "double", "",0.5 - Property: "ForegroundTransparent", "bool", "",1 - Property: "DisplaySafeArea", "bool", "",0 - Property: "SafeAreaDisplayStyle", "enum", "",1 - Property: "SafeAreaAspectRatio", "double", "",1.33333333333333 - Property: "Use2DMagnifierZoom", "bool", "",0 - Property: "2D Magnifier Zoom", "Real", "A+",100 - Property: "2D Magnifier X", "Real", "A+",50 - Property: "2D Magnifier Y", "Real", "A+",50 - Property: "CameraProjectionType", "enum", "",1 - Property: "UseRealTimeDOFAndAA", "bool", "",0 - Property: "UseDepthOfField", "bool", "",0 - Property: "FocusSource", "enum", "",0 - Property: "FocusAngle", "double", "",3.5 - Property: "FocusDistance", "double", "",200 - Property: "UseAntialiasing", "bool", "",0 - Property: "AntialiasingIntensity", "double", "",0.77777 - Property: "UseAccumulationBuffer", "bool", "",0 - Property: "FrameSamplingCount", "int", "",7 - } - MultiLayer: 0 - MultiTake: 0 - Hidden: "True" - Shading: Y - Culling: "CullingOff" - TypeFlags: "Camera" - GeometryVersion: 124 - Position: -4000.000000,0.000000,0.000000 - Up: 0,1,0 - LookAt: 0,0,0 - ShowInfoOnMoving: 1 - ShowAudio: 0 - AudioColor: 0,1,0 - CameraOrthoZoom: 1 - } - Material: "Material::Material", "" { - Version: 102 - ShadingModel: "lambert" - MultiLayer: 0 - Properties60: { - Property: "ShadingModel", "KString", "", "Lambert" - Property: "MultiLayer", "bool", "",0 - Property: "EmissiveColor", "ColorRGB", "",0.8000,0.8000,0.8000 - Property: "EmissiveFactor", "double", "",0.0000 - Property: "AmbientColor", "ColorRGB", "",0.0000,0.0000,0.0000 - Property: "AmbientFactor", "double", "",1.0000 - Property: "DiffuseColor", "ColorRGB", "",0.8000,0.8000,0.8000 - Property: "DiffuseFactor", "double", "",0.8000 - Property: "Bump", "Vector3D", "",0,0,0 - Property: "TransparentColor", "ColorRGB", "",1,1,1 - Property: "TransparencyFactor", "double", "",0.0000 - Property: "SpecularColor", "ColorRGB", "",1.0000,1.0000,1.0000 - Property: "SpecularFactor", "double", "",0.2500 - Property: "ShininessExponent", "double", "",80.0 - Property: "ReflectionColor", "ColorRGB", "",0,0,0 - Property: "ReflectionFactor", "double", "",1 - Property: "Emissive", "ColorRGB", "",0,0,0 - Property: "Ambient", "ColorRGB", "",0.0,0.0,0.0 - Property: "Diffuse", "ColorRGB", "",0.8,0.8,0.8 - Property: "Specular", "ColorRGB", "",1.0,1.0,1.0 - Property: "Shininess", "double", "",9.6 - Property: "Opacity", "double", "",1.0 - Property: "Reflectivity", "double", "",0 - } - } - Pose: "Pose::BIND_POSES", "BindPose" { - Type: "BindPose" - Version: 100 - Properties60: { - } - NbPoseNodes: 5 - PoseNode: { - Node: "Model::Cube_012" - Matrix: -0.000022218722734,-34.729896545410156,-0.000070382149715,0.000000000000000,-0.000000000001677,-0.000070382149715,34.729896545410156,0.000000000000000,-34.729896545410156,0.000022218722734,0.000000000043350,0.000000000000000,0.283237457275391,2.413097381591797,0.465340465307236,1.000000000000000 - } - PoseNode: { - Node: "Model::Cube_011" - Matrix: -0.000022218722734,-34.729896545410156,-0.000070382149715,0.000000000000000,-0.000000000001677,-0.000070382149715,34.729896545410156,0.000000000000000,-34.729896545410156,0.000022218722734,0.000000000043350,0.000000000000000,-6.522933959960938,-11.611951828002930,6.640708446502686,1.000000000000000 - } - PoseNode: { - Node: "Model::Cube_009" - Matrix: -0.000022218722734,-34.729896545410156,-0.000070382149715,0.000000000000000,-0.000000000001677,-0.000070382149715,34.729896545410156,0.000000000000000,-34.729896545410156,0.000022218722734,0.000000000043350,0.000000000000000,-0.709496498107910,-3.220736265182495,25.985172271728516,1.000000000000000 - } - PoseNode: { - Node: "Model::Cube_008" - Matrix: -0.000022218722734,-34.729896545410156,-0.000070382149715,0.000000000000000,-0.000000000001677,-0.000070382149715,34.729896545410156,0.000000000000000,-34.729896545410156,0.000022218722734,0.000000000043350,0.000000000000000,1.613526225090027,-12.612447738647461,17.974212646484375,1.000000000000000 - } - PoseNode: { - Node: "Model::Cube_006" - Matrix: -0.000022218722734,-34.729896545410156,-0.000070382149715,0.000000000000000,-0.000000000001677,-0.000070382149715,34.729896545410156,0.000000000000000,-34.729896545410156,0.000022218722734,0.000000000043350,0.000000000000000,-4.346582412719727,9.987678527832031,20.524810791015625,1.000000000000000 - } - } - GlobalSettings: { - Version: 1000 - Properties60: { - Property: "UpAxis", "int", "",1 - Property: "UpAxisSign", "int", "",1 - Property: "FrontAxis", "int", "",2 - Property: "FrontAxisSign", "int", "",1 - Property: "CoordAxis", "int", "",0 - Property: "CoordAxisSign", "int", "",1 - Property: "UnitScaleFactor", "double", "",1 - } - } -} - -; Object relations -;------------------------------------------------------------------ - -Relations: { - Model: "Model::Cube_012", "Mesh" { - } - Model: "Model::Cube_011", "Mesh" { - } - Model: "Model::Cube_009", "Mesh" { - } - Model: "Model::Cube_008", "Mesh" { - } - Model: "Model::Cube_006", "Mesh" { - } - Model: "Model::Camera", "Camera" { - } - Model: "Model::Lamp", "Light" { - } - Model: "Model::Producer Perspective", "Camera" { - } - Model: "Model::Producer Top", "Camera" { - } - Model: "Model::Producer Bottom", "Camera" { - } - Model: "Model::Producer Front", "Camera" { - } - Model: "Model::Producer Back", "Camera" { - } - Model: "Model::Producer Right", "Camera" { - } - Model: "Model::Producer Left", "Camera" { - } - Model: "Model::Camera Switcher", "CameraSwitcher" { - } - Material: "Material::Material", "" { - } -} - -; Object connections -;------------------------------------------------------------------ - -Connections: { - Connect: "OO", "Model::Cube_012", "Model::Scene" - Connect: "OO", "Model::Cube_011", "Model::Scene" - Connect: "OO", "Model::Cube_009", "Model::Scene" - Connect: "OO", "Model::Cube_008", "Model::Scene" - Connect: "OO", "Model::Cube_006", "Model::Scene" - Connect: "OO", "Model::Lamp", "Model::Scene" - Connect: "OO", "Model::Camera", "Model::Scene" - Connect: "OO", "Material::Material", "Model::Cube_012" - Connect: "OO", "Material::Material", "Model::Cube_011" - Connect: "OO", "Material::Material", "Model::Cube_009" - Connect: "OO", "Material::Material", "Model::Cube_008" - Connect: "OO", "Material::Material", "Model::Cube_006" -} -;Takes and animation section -;---------------------------------------------------- - -Takes: { - Current: "Default Take" - Take: "Default Take" { - FileName: "Default_Take.tak" - LocalTime: 0,479181389250 - ReferenceTime: 0,479181389250 - - ;Models animation - ;---------------------------------------------------- - Model: "Model::Cube_012" { - Version: 1.1 - Channel: "Transform" { - Channel: "T" { - Channel: "X" { - Default: 0.283237457275391 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,0.283237457275391,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 2.413097381591797 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,2.413097381591797,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 0.465340465307236 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,0.465340465307236,L - Color: 0,0,1 - } - LayerType: 1 - } - Channel: "R" { - Channel: "X" { - Default: -89.999961523213827 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-89.999961523213827,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 89.999886391132961 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,89.999886391132961,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 90.000002504348856 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,90.000002504348856,L - Color: 0,0,1 - } - LayerType: 2 - } - Channel: "S" { - Channel: "X" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,0,1 - } - LayerType: 3 - } - } - } - Model: "Model::Cube_011" { - Version: 1.1 - Channel: "Transform" { - Channel: "T" { - Channel: "X" { - Default: -6.522933959960938 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-6.522933959960938,L - Color: 1,0,0 - } - Channel: "Y" { - Default: -11.611951828002930 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-11.611951828002930,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 6.640708446502686 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,6.640708446502686,L - Color: 0,0,1 - } - LayerType: 1 - } - Channel: "R" { - Channel: "X" { - Default: -89.999961523213827 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-89.999961523213827,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 89.999886391132961 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,89.999886391132961,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 90.000002504348856 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,90.000002504348856,L - Color: 0,0,1 - } - LayerType: 2 - } - Channel: "S" { - Channel: "X" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,0,1 - } - LayerType: 3 - } - } - } - Model: "Model::Cube_009" { - Version: 1.1 - Channel: "Transform" { - Channel: "T" { - Channel: "X" { - Default: -0.709496498107910 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-0.709496498107910,L - Color: 1,0,0 - } - Channel: "Y" { - Default: -3.220736265182495 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-3.220736265182495,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 25.985172271728516 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,25.985172271728516,L - Color: 0,0,1 - } - LayerType: 1 - } - Channel: "R" { - Channel: "X" { - Default: -89.999961523213827 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-89.999961523213827,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 89.999886391132961 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,89.999886391132961,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 90.000002504348856 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,90.000002504348856,L - Color: 0,0,1 - } - LayerType: 2 - } - Channel: "S" { - Channel: "X" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,0,1 - } - LayerType: 3 - } - } - } - Model: "Model::Cube_008" { - Version: 1.1 - Channel: "Transform" { - Channel: "T" { - Channel: "X" { - Default: 1.613526225090027 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,1.613526225090027,L - Color: 1,0,0 - } - Channel: "Y" { - Default: -12.612447738647461 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-12.612447738647461,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 17.974212646484375 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,17.974212646484375,L - Color: 0,0,1 - } - LayerType: 1 - } - Channel: "R" { - Channel: "X" { - Default: -89.999961523213827 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-89.999961523213827,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 89.999886391132961 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,89.999886391132961,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 90.000002504348856 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,90.000002504348856,L - Color: 0,0,1 - } - LayerType: 2 - } - Channel: "S" { - Channel: "X" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,0,1 - } - LayerType: 3 - } - } - } - Model: "Model::Cube_006" { - Version: 1.1 - Channel: "Transform" { - Channel: "T" { - Channel: "X" { - Default: -4.346582412719727 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-4.346582412719727,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 9.987678527832031 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,9.987678527832031,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 20.524810791015625 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,20.524810791015625,L - Color: 0,0,1 - } - LayerType: 1 - } - Channel: "R" { - Channel: "X" { - Default: -89.999961523213827 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-89.999961523213827,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 89.999886391132961 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,89.999886391132961,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 90.000002504348856 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,90.000002504348856,L - Color: 0,0,1 - } - LayerType: 2 - } - Channel: "S" { - Channel: "X" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 34.729896545410156 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,34.729896545410156,L - Color: 0,0,1 - } - LayerType: 3 - } - } - } - Model: "Model::Camera" { - Version: 1.1 - Channel: "Transform" { - Channel: "T" { - Channel: "X" { - Default: -195.229202270507812 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-195.229202270507812,L - Color: 1,0,0 - } - Channel: "Y" { - Default: -224.433944702148438 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-224.433944702148438,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 160.309951782226562 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,160.309951782226562,L - Color: 0,0,1 - } - LayerType: 1 - } - Channel: "R" { - Channel: "X" { - Default: 90.692167044647775 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,90.692167044647775,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 26.439037314772314 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,26.439037314772314,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 47.000136773245160 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,47.000136773245160,L - Color: 0,0,1 - } - LayerType: 2 - } - Channel: "S" { - Channel: "X" { - Default: 30.000001907348633 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,30.000001907348633,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 30.000001907348633 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,30.000001907348633,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 29.999998092651367 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,29.999998092651367,L - Color: 0,0,1 - } - LayerType: 3 - } - } - } - Model: "Model::Lamp" { - Version: 1.1 - Channel: "Transform" { - Channel: "T" { - Channel: "X" { - Default: 30.163618087768555 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,30.163618087768555,L - Color: 1,0,0 - } - Channel: "Y" { - Default: -122.287361145019531 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,-122.287361145019531,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 177.115859985351562 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,177.115859985351562,L - Color: 0,0,1 - } - LayerType: 1 - } - Channel: "R" { - Channel: "X" { - Default: 127.261040841978527 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,127.261040841978527,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 3.163707551608806 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,3.163707551608806,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 16.936319773499580 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,16.936319773499580,L - Color: 0,0,1 - } - LayerType: 2 - } - Channel: "S" { - Channel: "X" { - Default: 29.999998092651367 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,29.999998092651367,L - Color: 1,0,0 - } - Channel: "Y" { - Default: 30.000000000000000 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,30.000000000000000,L - Color: 0,1,0 - } - Channel: "Z" { - Default: 29.999996185302734 - KeyVer: 4005 - KeyCount: 1 - Key: - 1924423250,29.999996185302734,L - Color: 0,0,1 - } - LayerType: 3 - } - } - } - } -} -;Version 5 settings -;------------------------------------------------------------------ - -Version5: { - AmbientRenderSettings: { - Version: 101 - AmbientLightColor: 0.0,0.0,0.0,0 - } - FogOptions: { - FogEnable: 0 - FogMode: 0 - FogDensity: 0.000 - FogStart: 5.000 - FogEnd: 25.000 - FogColor: 0.1,0.1,0.1,1 - } - Settings: { - FrameRate: "24" - TimeFormat: 1 - SnapOnFrames: 0 - ReferenceTimeIndex: -1 - TimeLineStartTime: 0 - TimeLineStopTime: 479181389250 - } - RendererSetting: { - DefaultCamera: "Producer Perspective" - DefaultViewingMode: 0 - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/shipfractured.fbx.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/shipfractured.fbx.meta deleted file mode 100644 index 8d31d04ed..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Meshes/shipfractured.fbx.meta +++ /dev/null @@ -1,100 +0,0 @@ -fileFormatVersion: 2 -guid: 5735f3b443f71894589af1323ad7a29b -ModelImporter: - serializedVersion: 15 - fileIDToRecycleName: - 100000: Camera - 100002: Cube_006 - 100004: Cube_008 - 100006: Cube_009 - 100008: Cube_011 - 100010: Cube_012 - 100012: Lamp - 100014: //RootNode - 100016: Cube_005 - 100018: Cube_010 - 400000: Camera - 400002: Cube_006 - 400004: Cube_008 - 400006: Cube_009 - 400008: Cube_011 - 400010: Cube_012 - 400012: Lamp - 400014: //RootNode - 400016: Cube_005 - 400018: Cube_010 - 2300000: Cube_006 - 2300002: Cube_008 - 2300004: Cube_009 - 2300006: Cube_011 - 2300008: Cube_012 - 2300010: Cube_005 - 2300012: Cube_010 - 3300000: Cube_006 - 3300002: Cube_008 - 3300004: Cube_009 - 3300006: Cube_011 - 3300008: Cube_012 - 3300010: Cube_005 - 3300012: Cube_010 - 4300000: Cube_012 - 4300002: Cube_011 - 4300004: Cube_009 - 4300006: Cube_008 - 4300008: Cube_006 - 4300010: Cube_010 - 4300012: Cube_005 - 7400000: Default Take - 9500000: //RootNode - materials: - importMaterials: 1 - materialName: 0 - materialSearch: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - optimizeGameObjects: 0 - animationCompression: 1 - animationRotationError: .5 - animationPositionError: .5 - animationScaleError: .5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - clipAnimations: [] - isReadable: 1 - meshes: - lODScreenPercentages: [] - globalScale: .00999999978 - meshCompression: 0 - addColliders: 0 - importBlendShapes: 1 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - optimizeMeshForGPU: 1 - weldVertices: 1 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVPackMargin: 4 - tangentSpace: - normalSmoothAngle: 60 - splitTangentsAcrossUV: 1 - normalImportMode: 0 - tangentImportMode: 1 - importAnimation: 1 - copyAvatar: 0 - humanDescription: - human: [] - skeleton: [] - armTwist: .5 - foreArmTwist: .5 - upperLegTwist: .5 - legTwist: .5 - armStretch: .0500000007 - legStretch: .0500000007 - feetSpacing: 0 - rootMotionBoneName: - lastHumanDescriptionAvatarSource: {instanceID: 0} - animationType: 2 - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Physics.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Physics.meta deleted file mode 100644 index 000504b7f..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Physics.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 3e117af07459d3f4893fe05646d854c7 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Physics/Default.physicMaterial b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Physics/Default.physicMaterial deleted file mode 100644 index e02ee01d4..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Physics/Default.physicMaterial +++ /dev/null @@ -1,16 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!134 &13400000 -PhysicMaterial: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Default - dynamicFriction: 0 - staticFriction: 0 - bounciness: 1 - frictionCombine: 0 - bounceCombine: 0 - frictionDirection2: {x: 0, y: 0, z: 0} - dynamicFriction2: 0 - staticFriction2: 0 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Physics/Default.physicMaterial.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Physics/Default.physicMaterial.meta deleted file mode 100644 index a0c195b97..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Physics/Default.physicMaterial.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 19e1775e0162387408a846a5e92cc2c2 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds.meta deleted file mode 100644 index 0822e82d8..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 8f8355cf4b7ebe345a0430d15f20ae2e -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/NearExplosionA.ogg b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/NearExplosionA.ogg deleted file mode 100644 index ed1705eab..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/NearExplosionA.ogg and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/NearExplosionA.ogg.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/NearExplosionA.ogg.meta deleted file mode 100644 index db4e51fd1..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/NearExplosionA.ogg.meta +++ /dev/null @@ -1,21 +0,0 @@ -fileFormatVersion: 2 -guid: b083b7753425f9c48ae0b375d6568e2f -timeCreated: 1435779545 -licenseType: Free -AudioImporter: - serializedVersion: 6 - defaultSettings: - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - platformSettingOverrides: {} - forceToMono: 0 - preloadAudioData: 1 - loadInBackground: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/The Space (Looping Middle).mp3 b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/The Space (Looping Middle).mp3 deleted file mode 100644 index 1e584658c..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/The Space (Looping Middle).mp3 and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/The Space (Looping Middle).mp3.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/The Space (Looping Middle).mp3.meta deleted file mode 100644 index 4ff5c81cc..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Sounds/The Space (Looping Middle).mp3.meta +++ /dev/null @@ -1,21 +0,0 @@ -fileFormatVersion: 2 -guid: c5a6af7adb029df4ba0967bc4de9e7ac -timeCreated: 1435779552 -licenseType: Free -AudioImporter: - serializedVersion: 6 - defaultSettings: - loadType: 0 - sampleRateSetting: 0 - sampleRateOverride: 44100 - compressionFormat: 1 - quality: 1 - conversionMode: 0 - platformSettingOverrides: {} - forceToMono: 0 - preloadAudioData: 1 - loadInBackground: 0 - 3D: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures.meta deleted file mode 100644 index 97a8caf9c..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: a25b85fe55c948c41a1259e3dfc3cebf -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background.meta deleted file mode 100644 index f4d32fa54..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 58881f003b1f1d54a9d4372b043f980c -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Free_Shmup_Sprites_Starfield.png b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Free_Shmup_Sprites_Starfield.png deleted file mode 100644 index 8b5716928..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Free_Shmup_Sprites_Starfield.png and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Free_Shmup_Sprites_Starfield.png.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Free_Shmup_Sprites_Starfield.png.meta deleted file mode 100644 index 6b6923df4..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Free_Shmup_Sprites_Starfield.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: 76790d87a6ceac544a057439dbe4d6c3 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials.meta deleted file mode 100644 index 94b3eb7ae..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 93b8b198480ec8040b306406408200c3 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield 1.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield 1.mat deleted file mode 100644 index fe492e43e..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield 1.mat +++ /dev/null @@ -1,43 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Free_Shmup_Sprites_Starfield 1 - m_Shader: {fileID: 4, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 2800000, guid: 76790d87a6ceac544a057439dbe4d6c3, type: 3} - m_Scale: {x: 5, y: 5} - m_Offset: {x: 0, y: 0} - data: - first: - name: _BumpMap - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _Shininess - second: .078125 - m_Colors: - data: - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} - data: - first: - name: _SpecColor - second: {r: .5, g: .5, b: .5, a: 1} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield 1.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield 1.mat.meta deleted file mode 100644 index 6f0528e19..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield 1.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: f96f18654fcb0a742b51183dab201105 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield.mat b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield.mat deleted file mode 100644 index 3e7f0974c..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield.mat +++ /dev/null @@ -1,43 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Free_Shmup_Sprites_Starfield - m_Shader: {fileID: 4, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: [] - m_CustomRenderQueue: -1 - m_SavedProperties: - serializedVersion: 2 - m_TexEnvs: - data: - first: - name: _MainTex - second: - m_Texture: {fileID: 2800000, guid: e12e5deef87c66e439227996f6fb9a7b, type: 3} - m_Scale: {x: 5, y: 5} - m_Offset: {x: 0, y: 0} - data: - first: - name: _BumpMap - second: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - data: - first: - name: _Shininess - second: .078125 - m_Colors: - data: - first: - name: _Color - second: {r: 1, g: 1, b: 1, a: 1} - data: - first: - name: _SpecColor - second: {r: .5, g: .5, b: .5, a: 1} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield.mat.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield.mat.meta deleted file mode 100644 index 064f03c92..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/Background/Materials/Free_Shmup_Sprites_Starfield.mat.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: b384f014c562cb64093ed03a6e82817f -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/asteroid.png b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/asteroid.png deleted file mode 100644 index 643102c16..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/asteroid.png and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/asteroid.png.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/asteroid.png.meta deleted file mode 100644 index 79dd61f5e..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/asteroid.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: f67021125bb29c34d81355e68915c874 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/ship.png b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/ship.png deleted file mode 100644 index 3f299a0c8..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/ship.png and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/ship.png.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/ship.png.meta deleted file mode 100644 index 8117219f9..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/ship.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: c5917249e89888346a4bd606beae9578 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/stars.jpg b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/stars.jpg deleted file mode 100644 index 060661742..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/stars.jpg and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/stars.jpg.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/stars.jpg.meta deleted file mode 100644 index 6594897e5..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/stars.jpg.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: d1e4a3e1339b0c84197ec2fe60c41ed6 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/target.png b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/target.png deleted file mode 100644 index d4cb0bb75..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/target.png and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/target.png.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/target.png.meta deleted file mode 100644 index b1b6f2789..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Media/Textures/target.png.meta +++ /dev/null @@ -1,45 +0,0 @@ -fileFormatVersion: 2 -guid: be34ee1d3a3899d49a43310b45415ed3 -TextureImporter: - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - linearTexture: 0 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - seamlessCubemap: 0 - textureFormat: -1 - maxTextureSize: 1024 - textureSettings: - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapMode: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spritePixelsToUnits: 100 - alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs.meta deleted file mode 100644 index 8343b2e7f..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 538a7ee3bafeabc439759090caf2889c -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Asteroid.prefab b/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Asteroid.prefab deleted file mode 100644 index dfd3b2a5e..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Asteroid.prefab +++ /dev/null @@ -1,111 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &100000 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400000} - - 33: {fileID: 3300000} - - 23: {fileID: 2300000} - - 54: {fileID: 5400000} - - 135: {fileID: 13500000} - - 114: {fileID: 11400000} - m_Layer: 9 - m_Name: Asteroid - m_TagString: asteroid - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 4294967295 - m_IsActive: 1 ---- !u!4 &400000 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_LocalRotation: {x: -.707106829, y: 0, z: 0, w: .707106829} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 ---- !u!23 &2300000 -Renderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_LightmapIndex: 255 - m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} - m_Materials: - - {fileID: 2100000, guid: a1f30c6b2183c3f4a9ffa3cb444d6ddc, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_LightProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &3300000 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_Mesh: {fileID: 4300000, guid: 0aee836645b89374583afeb4ca36b969, type: 3} ---- !u!54 &5400000 -Rigidbody: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 8 - m_CollisionDetection: 0 ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5608cae0fd6ebbd46b5ad3c03b150682, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!135 &13500000 -SphereCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_Material: {fileID: 13400000, guid: 19e1775e0162387408a846a5e92cc2c2, type: 2} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: .720000029 - m_Center: {x: -.0343100131, y: 0, z: .00999999978} ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 100000} - m_IsPrefabParent: 1 - m_IsExploded: 1 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Asteroid.prefab.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Asteroid.prefab.meta deleted file mode 100644 index cdd394017..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Asteroid.prefab.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 972561acbe31e7147b76d1a430caf37d -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Explosion.prefab b/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Explosion.prefab deleted file mode 100644 index c383ecee9..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Explosion.prefab +++ /dev/null @@ -1,276 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &100000 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400000} - m_Layer: 0 - m_Name: Explosion - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &100002 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400004} - - 15: {fileID: 1500002} - - 12: {fileID: 1200002} - - 26: {fileID: 2600002} - m_Layer: 0 - m_Name: Fire - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &100004 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400002} - - 15: {fileID: 1500000} - - 12: {fileID: 1200000} - - 26: {fileID: 2600000} - m_Layer: 0 - m_Name: Smoke - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &400000 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 400004} - - {fileID: 400002} - m_Father: {fileID: 0} ---- !u!4 &400002 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100004} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: .139548749, y: .75298351, z: -1.18065679} - m_LocalScale: {x: .649999976, y: .649999976, z: .649999976} - m_Children: [] - m_Father: {fileID: 400000} ---- !u!4 &400004 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100002} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: .139548749, y: .75298351, z: -1.18065679} - m_LocalScale: {x: .649999976, y: .649999976, z: .649999976} - m_Children: [] - m_Father: {fileID: 400000} ---- !u!12 &1200000 -ParticleAnimator: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100004} - Does Animate Color?: 1 - colorAnimation[0]: - serializedVersion: 2 - rgba: 180719629 - colorAnimation[1]: - serializedVersion: 2 - rgba: 620773314 - colorAnimation[2]: - serializedVersion: 2 - rgba: 863656214 - colorAnimation[3]: - serializedVersion: 2 - rgba: 914325381 - colorAnimation[4]: - serializedVersion: 2 - rgba: 170930224 - worldRotationAxis: {x: 0, y: 0, z: 0} - localRotationAxis: {x: 0, y: 0, z: 0} - sizeGrow: .300000012 - rndForce: {x: 0, y: 0, z: 0} - force: {x: 0, y: 0, z: 0} - damping: .200000003 - stopSimulation: 0 - autodestruct: 1 ---- !u!12 &1200002 -ParticleAnimator: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100002} - Does Animate Color?: 1 - colorAnimation[0]: - serializedVersion: 2 - rgba: 170996017 - colorAnimation[1]: - serializedVersion: 2 - rgba: 4294967295 - colorAnimation[2]: - serializedVersion: 2 - rgba: 4294967295 - colorAnimation[3]: - serializedVersion: 2 - rgba: 929413887 - colorAnimation[4]: - serializedVersion: 2 - rgba: 118695517 - worldRotationAxis: {x: 0, y: 0, z: 0} - localRotationAxis: {x: 0, y: 0, z: 0} - sizeGrow: .300000012 - rndForce: {x: 5, y: 1, z: 5} - force: {x: 0, y: 1, z: 0} - damping: .800000012 - stopSimulation: 0 - autodestruct: 1 ---- !u!15 &1500000 -EllipsoidParticleEmitter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100004} - serializedVersion: 2 - m_Enabled: 1 - m_Emit: 1 - minSize: 1.29999995 - maxSize: 1.5 - minEnergy: 2 - maxEnergy: 4 - minEmission: 4 - maxEmission: 6 - worldVelocity: {x: 0, y: 0, z: 0} - localVelocity: {x: 0, y: 0, z: 0} - rndVelocity: {x: 0, y: 0, z: 0} - emitterVelocityScale: .0500000007 - tangentVelocity: {x: 0, y: 0, z: 0} - angularVelocity: 0 - rndAngularVelocity: 100 - rndRotation: 1 - Simulate in Worldspace?: 0 - m_OneShot: 1 - m_Ellipsoid: {x: .200000003, y: 0, z: .200000003} - m_MinEmitterRange: 0 ---- !u!15 &1500002 -EllipsoidParticleEmitter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100002} - serializedVersion: 2 - m_Enabled: 1 - m_Emit: 1 - minSize: 1 - maxSize: 1.39999998 - minEnergy: .5 - maxEnergy: .600000024 - minEmission: 60 - maxEmission: 60 - worldVelocity: {x: 0, y: 0, z: 0} - localVelocity: {x: 0, y: 0, z: 0} - rndVelocity: {x: .800000012, y: 1, z: .800000012} - emitterVelocityScale: .0500000007 - tangentVelocity: {x: 0, y: 0, z: 0} - angularVelocity: 0 - rndAngularVelocity: 100 - rndRotation: 1 - Simulate in Worldspace?: 0 - m_OneShot: 1 - m_Ellipsoid: {x: .200000003, y: 0, z: .200000003} - m_MinEmitterRange: 0 ---- !u!26 &2600000 -ParticleRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100004} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_LightmapIndex: 255 - m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} - m_Materials: - - {fileID: 2100000, guid: eb5315e2f77c540b6bf545720e84d3a5, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_LightProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_SortingLayerID: 0 - serializedVersion: 2 - m_CameraVelocityScale: 0 - m_StretchParticles: 2 - m_LengthScale: 1 - m_VelocityScale: 0 - m_MaxParticleSize: Infinity - UV Animation: - x Tile: 1 - y Tile: 1 - cycles: 1 ---- !u!26 &2600002 -ParticleRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100002} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_LightmapIndex: 255 - m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} - m_Materials: - - {fileID: 2100000, guid: 0babe53ca63bb49209164496ab5e4231, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_LightProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_SortingLayerID: 0 - serializedVersion: 2 - m_CameraVelocityScale: 0 - m_StretchParticles: 0 - m_LengthScale: 2 - m_VelocityScale: 0 - m_MaxParticleSize: Infinity - UV Animation: - x Tile: 1 - y Tile: 1 - cycles: 1 ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 100000} - m_IsPrefabParent: 1 - m_IsExploded: 1 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Explosion.prefab.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Explosion.prefab.meta deleted file mode 100644 index ff1a1660b..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Explosion.prefab.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 185972cb8011a1449b7360c07a62fdf2 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Fire.prefab b/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Fire.prefab deleted file mode 100644 index 698248fd7..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Fire.prefab +++ /dev/null @@ -1,131 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &100000 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400000} - - 15: {fileID: 1500000} - - 12: {fileID: 1200000} - - 26: {fileID: 2600000} - m_Layer: 0 - m_Name: Fire - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &400000 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_LocalRotation: {x: .707106709, y: 0, z: 0, w: -.707106888} - m_LocalPosition: {x: -2.49987231e-08, y: .104851745, z: -.676264524} - m_LocalScale: {x: 9.52567768, y: 9.52567387, z: 9.52567387} - m_Children: [] - m_Father: {fileID: 0} ---- !u!12 &1200000 -ParticleAnimator: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - Does Animate Color?: 1 - colorAnimation[0]: - serializedVersion: 2 - rgba: 184542099 - colorAnimation[1]: - serializedVersion: 2 - rgba: 4294962290 - colorAnimation[2]: - serializedVersion: 2 - rgba: 4287922990 - colorAnimation[3]: - serializedVersion: 2 - rgba: 1292855184 - colorAnimation[4]: - serializedVersion: 2 - rgba: 985629450 - worldRotationAxis: {x: 0, y: 0, z: 0} - localRotationAxis: {x: 0, y: 0, z: 0} - sizeGrow: 20 - rndForce: {x: 0, y: 0, z: 0} - force: {x: 0, y: 0, z: 0} - damping: 1 - stopSimulation: 0 - autodestruct: 0 ---- !u!15 &1500000 -EllipsoidParticleEmitter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - serializedVersion: 2 - m_Enabled: 1 - m_Emit: 1 - minSize: .300000012 - maxSize: .400000006 - minEnergy: .400000006 - maxEnergy: .600000024 - minEmission: 40 - maxEmission: 60 - worldVelocity: {x: 0, y: 0, z: 0} - localVelocity: {x: 0, y: 1.80000007, z: 0} - rndVelocity: {x: .120000005, y: .600000024, z: .120000005} - emitterVelocityScale: .0500000007 - tangentVelocity: {x: 0, y: 0, z: 0} - angularVelocity: 0 - rndAngularVelocity: 100 - rndRotation: 1 - Simulate in Worldspace?: 1 - m_OneShot: 0 - m_Ellipsoid: {x: 0, y: 0, z: 0} - m_MinEmitterRange: 0 ---- !u!26 &2600000 -ParticleRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_LightmapIndex: 255 - m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} - m_Materials: - - {fileID: 2100000, guid: 0babe53ca63bb49209164496ab5e4231, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_LightProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_SortingLayerID: 0 - serializedVersion: 2 - m_CameraVelocityScale: 0 - m_StretchParticles: 3 - m_LengthScale: -2 - m_VelocityScale: 0 - m_MaxParticleSize: Infinity - UV Animation: - x Tile: 1 - y Tile: 1 - cycles: 1 ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 100000} - m_IsPrefabParent: 1 - m_IsExploded: 1 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Fire.prefab.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Fire.prefab.meta deleted file mode 100644 index a2d999524..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Fire.prefab.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 69fdd131bc1398b4b932a019fd9328f0 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Ship.prefab b/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Ship.prefab deleted file mode 100644 index ed8a6da02..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Ship.prefab +++ /dev/null @@ -1,301 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &100000 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400000} - - 15: {fileID: 1500000} - - 12: {fileID: 1200000} - - 26: {fileID: 2600000} - m_Layer: 8 - m_Name: Fire - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &100006 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400006} - - 33: {fileID: 3300000} - - 23: {fileID: 2300000} - m_Layer: 8 - m_Name: Renderer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &100008 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400008} - - 82: {fileID: 8200000} - - 65: {fileID: 6500002} - - 114: {fileID: 11400000} - m_Layer: 8 - m_Name: Ship - m_TagString: ship - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &400000 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_LocalRotation: {x: .707106709, y: 0, z: 0, w: -.707106888} - m_LocalPosition: {x: -2.49987231e-08, y: .104851745, z: -.676264524} - m_LocalScale: {x: 9.52567768, y: 9.52567387, z: 9.52567387} - m_Children: [] - m_Father: {fileID: 400006} ---- !u!4 &400006 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100006} - m_LocalRotation: {x: -.707106829, y: -.707106829, z: 0, w: 0} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: .0449911729, y: .0449911803, z: .0449911729} - m_Children: - - {fileID: 400000} - m_Father: {fileID: 400008} ---- !u!4 &400008 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100008} - m_LocalRotation: {x: .5, y: .5, z: -.5, w: .5} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: .699999988, y: .699999988, z: .699999988} - m_Children: - - {fileID: 400006} - m_Father: {fileID: 0} ---- !u!12 &1200000 -ParticleAnimator: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - Does Animate Color?: 1 - colorAnimation[0]: - serializedVersion: 2 - rgba: 184542099 - colorAnimation[1]: - serializedVersion: 2 - rgba: 4294962290 - colorAnimation[2]: - serializedVersion: 2 - rgba: 4287922990 - colorAnimation[3]: - serializedVersion: 2 - rgba: 1292855184 - colorAnimation[4]: - serializedVersion: 2 - rgba: 985629450 - worldRotationAxis: {x: 0, y: 0, z: 0} - localRotationAxis: {x: 0, y: 0, z: 0} - sizeGrow: 20 - rndForce: {x: 0, y: 0, z: 0} - force: {x: 0, y: 0, z: 0} - damping: 1 - stopSimulation: 0 - autodestruct: 0 ---- !u!15 &1500000 -EllipsoidParticleEmitter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - serializedVersion: 2 - m_Enabled: 1 - m_Emit: 1 - minSize: .200000003 - maxSize: .400000006 - minEnergy: .200000003 - maxEnergy: .400000006 - minEmission: 40 - maxEmission: 60 - worldVelocity: {x: 0, y: 0, z: 0} - localVelocity: {x: 0, y: 1.80000007, z: 0} - rndVelocity: {x: .120000005, y: .600000024, z: .120000005} - emitterVelocityScale: .0500000007 - tangentVelocity: {x: 0, y: 0, z: 0} - angularVelocity: 0 - rndAngularVelocity: 100 - rndRotation: 1 - Simulate in Worldspace?: 1 - m_OneShot: 0 - m_Ellipsoid: {x: 0, y: 0, z: 0} - m_MinEmitterRange: 0 ---- !u!23 &2300000 -Renderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100006} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_LightmapIndex: 255 - m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} - m_Materials: - - {fileID: 2100000, guid: a0e138ce6cd06f74d83cf3884415be92, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_LightProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_SortingLayerID: 0 ---- !u!26 &2600000 -ParticleRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_LightmapIndex: 255 - m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0} - m_Materials: - - {fileID: 2100000, guid: 0babe53ca63bb49209164496ab5e4231, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_LightProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_SortingLayerID: 0 - serializedVersion: 2 - m_CameraVelocityScale: 0 - m_StretchParticles: 3 - m_LengthScale: -2 - m_VelocityScale: 0 - m_MaxParticleSize: Infinity - UV Animation: - x Tile: 1 - y Tile: 1 - cycles: 1 ---- !u!33 &3300000 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100006} - m_Mesh: {fileID: 4300000, guid: 564c86c1543c6eb4e8525374599f15cc, type: 3} ---- !u!65 &6500002 -BoxCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100008} - m_Material: {fileID: 0} - m_IsTrigger: 1 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: .389999986, y: .209999993, z: .689999998} - m_Center: {x: 0, y: 0, z: 0} ---- !u!82 &8200000 -AudioSource: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100008} - m_Enabled: 1 - serializedVersion: 3 - m_audioClip: {fileID: 8300000, guid: 16e0334dc2987ac429998196827191ed, type: 3} - m_PlayOnAwake: 0 - m_Volume: 1 - m_Pitch: 1 - Loop: 0 - Mute: 0 - Priority: 128 - DopplerLevel: 1 - MinDistance: 1 - MaxDistance: 500 - Pan2D: 0 - rolloffMode: 0 - BypassEffects: 0 - BypassListenerEffects: 0 - BypassReverbZones: 0 - rolloffCustomCurve: - serializedVersion: 2 - m_Curve: - - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - panLevelCustomCurve: - serializedVersion: 2 - m_Curve: - - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - spreadCustomCurve: - serializedVersion: 2 - m_Curve: - - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100008} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3d2395b0230e353488352840a8083fba, type: 3} - m_Name: - m_EditorClassIdentifier: - MeshRenderer: {fileID: 2300000} - ParticleEmitter: {fileID: 1500000} ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 100008} - m_IsPrefabParent: 1 - m_IsExploded: 1 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Ship.prefab.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Ship.prefab.meta deleted file mode 100644 index cb3d51017..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/Ship.prefab.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: f4cdd74364fb9d6448ecf7663dd0cfe9 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/ShipBroken.prefab b/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/ShipBroken.prefab deleted file mode 100644 index de4f4f22f..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/ShipBroken.prefab +++ /dev/null @@ -1,490 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &100000 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400000} - - 33: {fileID: 3300000} - - 23: {fileID: 2300000} - - 54: {fileID: 5400002} - - 64: {fileID: 6400002} - m_Layer: 0 - m_Name: Cube_010 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &100002 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400002} - - 33: {fileID: 3300002} - - 23: {fileID: 2300002} - - 54: {fileID: 5400000} - - 64: {fileID: 6400000} - m_Layer: 0 - m_Name: Cube_005 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &100004 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400004} - - 33: {fileID: 3300004} - - 23: {fileID: 2300004} - - 54: {fileID: 5400004} - - 64: {fileID: 6400004} - m_Layer: 0 - m_Name: Cube_011 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &100006 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400006} - - 33: {fileID: 3300006} - - 23: {fileID: 2300006} - - 54: {fileID: 5400006} - - 64: {fileID: 6400006} - m_Layer: 0 - m_Name: Cube_008 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &100008 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400008} - - 33: {fileID: 3300008} - - 23: {fileID: 2300008} - - 54: {fileID: 5400008} - - 64: {fileID: 6400008} - m_Layer: 0 - m_Name: Cube_006 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &100010 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 4: {fileID: 400010} - m_Layer: 0 - m_Name: ShipBroken - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &400000 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_LocalRotation: {x: .707106829, y: -7.27736278e-07, z: .707106829, w: 7.27736278e-07} - m_LocalPosition: {x: -.147821978, y: .139969945, z: .509999931} - m_LocalScale: {x: .0725404024, y: .0457144268, z: .0457144268} - m_Children: [] - m_Father: {fileID: 400010} - m_RootOrder: 3 ---- !u!4 &400002 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100002} - m_LocalRotation: {x: .707106829, y: -7.27736278e-07, z: .707106829, w: 7.27736278e-07} - m_LocalPosition: {x: -.0571488813, y: .0860453844, z: .231219128} - m_LocalScale: {x: -.073889859, y: -.132470995, z: -.187525913} - m_Children: [] - m_Father: {fileID: 400010} - m_RootOrder: 0 ---- !u!4 &400004 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100004} - m_LocalRotation: {x: .707106829, y: -7.27736278e-07, z: .707106829, w: 7.27736278e-07} - m_LocalPosition: {x: -.083344318, y: -.272711188, z: .341747344} - m_LocalScale: {x: 34.7298965, y: 34.7298965, z: 34.7298965} - m_Children: [] - m_Father: {fileID: 400010} - m_RootOrder: 4 ---- !u!4 &400006 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100006} - m_LocalRotation: {x: .707106829, y: -7.27736278e-07, z: .707106829, w: 7.27736278e-07} - m_LocalPosition: {x: .00927518588, y: -.0939086601, z: .148649633} - m_LocalScale: {x: 34.7298965, y: 34.7298965, z: 34.7298965} - m_Children: [] - m_Father: {fileID: 400010} - m_RootOrder: 2 ---- !u!4 &400008 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100008} - m_LocalRotation: {x: .707106829, y: -7.27736278e-07, z: .707106829, w: 7.27736278e-07} - m_LocalPosition: {x: -.00892315805, y: .128960162, z: .0840683803} - m_LocalScale: {x: 34.7298965, y: 34.7298965, z: 34.7298965} - m_Children: [] - m_Father: {fileID: 400010} - m_RootOrder: 1 ---- !u!4 &400010 -Transform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100010} - m_LocalRotation: {x: 0, y: .707106829, z: 0, w: .707106829} - m_LocalPosition: {x: .660521328, y: 0, z: .497466207} - m_LocalScale: {x: .699999988, y: .699999988, z: .699999988} - m_Children: - - {fileID: 400002} - - {fileID: 400008} - - {fileID: 400006} - - {fileID: 400000} - - {fileID: 400004} - m_Father: {fileID: 0} - m_RootOrder: 0 ---- !u!23 &2300000 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 62155033a16c4eb4ab0878b56d98970f, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!23 &2300002 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100002} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 02f272d5e8ff508428baf80fadda022a, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!23 &2300004 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100004} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 62155033a16c4eb4ab0878b56d98970f, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!23 &2300006 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100006} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 62155033a16c4eb4ab0878b56d98970f, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!23 &2300008 -MeshRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100008} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 2100000, guid: 62155033a16c4eb4ab0878b56d98970f, type: 2} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 0 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!33 &3300000 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_Mesh: {fileID: 4300000, guid: cd4e202637727f548ab597eec0394427, type: 3} ---- !u!33 &3300002 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100002} - m_Mesh: {fileID: 4300000, guid: 833675a5109244941b0f5019725ef776, type: 3} ---- !u!33 &3300004 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100004} - m_Mesh: {fileID: 4300002, guid: 5735f3b443f71894589af1323ad7a29b, type: 3} ---- !u!33 &3300006 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100006} - m_Mesh: {fileID: 4300006, guid: 5735f3b443f71894589af1323ad7a29b, type: 3} ---- !u!33 &3300008 -MeshFilter: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100008} - m_Mesh: {fileID: 4300008, guid: 5735f3b443f71894589af1323ad7a29b, type: 3} ---- !u!54 &5400000 -Rigidbody: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100002} - serializedVersion: 2 - m_Mass: .100000001 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 8 - m_CollisionDetection: 0 ---- !u!54 &5400002 -Rigidbody: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - serializedVersion: 2 - m_Mass: .100000001 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 8 - m_CollisionDetection: 0 ---- !u!54 &5400004 -Rigidbody: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100004} - serializedVersion: 2 - m_Mass: .100000001 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 8 - m_CollisionDetection: 0 ---- !u!54 &5400006 -Rigidbody: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100006} - serializedVersion: 2 - m_Mass: .100000001 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 8 - m_CollisionDetection: 0 ---- !u!54 &5400008 -Rigidbody: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100008} - serializedVersion: 2 - m_Mass: .100000001 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 8 - m_CollisionDetection: 0 ---- !u!64 &6400000 -MeshCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100002} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Convex: 1 - m_Mesh: {fileID: 4300000, guid: 833675a5109244941b0f5019725ef776, type: 3} ---- !u!64 &6400002 -MeshCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100000} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Convex: 1 - m_Mesh: {fileID: 4300000, guid: cd4e202637727f548ab597eec0394427, type: 3} ---- !u!64 &6400004 -MeshCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100004} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Convex: 1 - m_Mesh: {fileID: 4300002, guid: 5735f3b443f71894589af1323ad7a29b, type: 3} ---- !u!64 &6400006 -MeshCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100006} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Convex: 1 - m_Mesh: {fileID: 4300006, guid: 5735f3b443f71894589af1323ad7a29b, type: 3} ---- !u!64 &6400008 -MeshCollider: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 100008} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Convex: 1 - m_Mesh: {fileID: 4300008, guid: 5735f3b443f71894589af1323ad7a29b, type: 3} ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 100010} - m_IsPrefabParent: 1 diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/ShipBroken.prefab.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/ShipBroken.prefab.meta deleted file mode 100644 index 9d101ad30..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Prefabs/ShipBroken.prefab.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 5b84466ca2cdf93418bd1e3234edb0e1 -NativeFormatImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts.meta deleted file mode 100644 index e1aa6243c..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: b800be3d93804944bb261ee1e63815c2 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid.meta deleted file mode 100644 index 198a3d601..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: be4d1f9900f1746418149a1b3ab2c2b0 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/Asteroid.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/Asteroid.cs deleted file mode 100644 index 3c23d7b31..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/Asteroid.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using UnityEngine; -using System.Collections; -using Zenject; -using ModestTree; - -namespace Asteroids -{ - public class Asteroid : MonoBehaviour - { - [Inject] - LevelHelper _level = null; - - [Inject] - Settings _settings = null; - - bool _hasDisposed; - - public Vector3 Position - { - get - { - return transform.position; - } - set - { - transform.position = value; - } - } - - public float Mass - { - get - { - return GetComponent().mass; - } - set - { - GetComponent().mass = value; - } - } - - public float Scale - { - get - { - var scale = transform.localScale; - // We assume scale is uniform - Assert.That(scale[0] == scale[1] && scale[1] == scale[2]); - - return scale[0]; - } - set - { - transform.localScale = new Vector3(value, value, value); - GetComponent().mass = value; - } - } - - public Vector3 Velocity - { - get - { - return GetComponent().velocity; - } - set - { - GetComponent().velocity = value; - } - } - - public void FixedTick() - { - // Limit speed to a maximum - var speed = GetComponent().velocity.magnitude; - - if (speed > _settings.maxSpeed) - { - var dir = GetComponent().velocity / speed; - GetComponent().velocity = dir * _settings.maxSpeed; - } - } - - public void Tick() - { - CheckForTeleport(); - } - - public void Dispose() - { - Assert.That(!_hasDisposed); - _hasDisposed = true; - GameObject.Destroy(gameObject); - } - - void CheckForTeleport() - { - if (Position.x > _level.Right + Scale && IsMovingInDirection(Vector3.right)) - { - transform.SetX(_level.Left - Scale); - } - else if (Position.x < _level.Left - Scale && IsMovingInDirection(-Vector3.right)) - { - transform.SetX(_level.Right + Scale); - } - else if (Position.y < _level.Bottom - Scale && IsMovingInDirection(-Vector3.up)) - { - transform.SetY(_level.Top + Scale); - } - else if (Position.y > _level.Top + Scale && IsMovingInDirection(Vector3.up)) - { - transform.SetY(_level.Bottom - Scale); - } - transform.RotateAround(transform.position, Vector3.up, 30 * Time.deltaTime); - } - - bool IsMovingInDirection(Vector3 dir) - { - return Vector3.Dot(dir, GetComponent().velocity) > 0; - } - - [Serializable] - public class Settings - { - public float massScaleFactor; - public float maxSpeed; - } - - public class Factory : GameObjectFactory - { - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/Asteroid.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/Asteroid.cs.meta deleted file mode 100644 index 716330923..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/Asteroid.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5608cae0fd6ebbd46b5ad3c03b150682 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/AsteroidManager.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/AsteroidManager.cs deleted file mode 100644 index 105ed18fe..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/AsteroidManager.cs +++ /dev/null @@ -1,216 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -using System.Collections; -using Zenject; -using Random=UnityEngine.Random; -using System.Linq; -using ModestTree; - -namespace Asteroids -{ - public class AsteroidManager : ITickable, IFixedTickable - { - Settings _settings; - float _timeToNextSpawn; - float _timeIntervalBetweenSpawns; - Asteroid.Factory _asteroidFactory; - LevelHelper _level; - bool _started; - List _asteroids = new List(); - Queue _cachedAttributes = new Queue(); - - [InjectOptional] - bool _autoSpawn = true; - - public AsteroidManager( - Settings settings, Asteroid.Factory asteroidFactory, LevelHelper level) - { - _settings = settings; - _timeIntervalBetweenSpawns = _settings.maxSpawnTime / (_settings.maxSpawns - _settings.startingSpawns); - _timeToNextSpawn = _timeIntervalBetweenSpawns; - _asteroidFactory = asteroidFactory; - _level = level; - } - - public void Start() - { - Assert.That(!_started); - - ResetAll(); - GenerateRandomAttributes(); - - for (int i = 0; i < _settings.startingSpawns; i++) - { - SpawnNext(); - } - - _started = true; - } - - // Generate the full list of size and speeds so that we can maintain an approximate average - // this way we don't get wildly different difficulties each time the game is run - // For example, if we just chose speed randomly each time we spawned an asteroid, in some - // cases that might result in the first set of asteroids all going at max speed, or min speed - void GenerateRandomAttributes() - { - Assert.That(_cachedAttributes.Count == 0); - - var speedTotal = 0.0f; - var sizeTotal = 0.0f; - - for (int i = 0; i < _settings.maxSpawns; i++) - { - var sizePx = Random.Range(0.0f, 1.0f); - var speed = Random.Range(_settings.minSpeed, _settings.maxSpeed); - - _cachedAttributes.Enqueue(new AsteroidAttributes { - SizePx = sizePx, - InitialSpeed = speed, - }); - - speedTotal += speed; - sizeTotal += sizePx; - } - - var desiredAverageSpeed = (_settings.minSpeed + _settings.maxSpeed) * 0.5f; - var desiredAverageSize = 0.5f; - - var averageSize = sizeTotal / _settings.maxSpawns; - var averageSpeed = speedTotal / _settings.maxSpawns; - - var speedScaleFactor = desiredAverageSpeed / averageSpeed; - var sizeScaleFactor = desiredAverageSize / averageSize; - - foreach (var attributes in _cachedAttributes) - { - attributes.SizePx *= sizeScaleFactor; - attributes.InitialSpeed *= speedScaleFactor; - } - - Assert.That(Mathf.Approximately(_cachedAttributes.Average(x => x.InitialSpeed), desiredAverageSpeed)); - Assert.That(Mathf.Approximately(_cachedAttributes.Average(x => x.SizePx), desiredAverageSize)); - } - - void ResetAll() - { - foreach (var asteroid in _asteroids) - { - asteroid.Dispose(); - } - - _asteroids.Clear(); - _cachedAttributes.Clear(); - } - - public void Stop() - { - Assert.That(_started); - _started = false; - } - - public void FixedTick() - { - foreach (var asteroid in _asteroids) - { - asteroid.FixedTick(); - } - } - - public void Tick() - { - foreach (var asteroid in _asteroids) - { - asteroid.Tick(); - } - - if (_started && _autoSpawn) - { - _timeToNextSpawn -= Time.deltaTime; - - if (_timeToNextSpawn < 0 && _asteroids.Count < _settings.maxSpawns) - { - _timeToNextSpawn = _timeIntervalBetweenSpawns; - SpawnNext(); - } - } - } - - public void SpawnNext() - { - var asteroid = _asteroidFactory.Create(); - - var attributes = _cachedAttributes.Dequeue(); - - asteroid.Scale = Mathf.Lerp(_settings.minScale, _settings.maxScale, attributes.SizePx); - asteroid.Mass = Mathf.Lerp(_settings.minMass, _settings.maxMass, attributes.SizePx); - asteroid.Position = GetRandomStartPosition(asteroid.Scale); - asteroid.Velocity = GetRandomDirection() * attributes.InitialSpeed; - - _asteroids.Add(asteroid); - } - - Vector3 GetRandomDirection() - { - var theta = Random.Range(0, Mathf.PI * 2.0f); - return new Vector3(Mathf.Cos(theta), Mathf.Sin(theta), 0); - } - - Vector3 GetRandomStartPosition(float scale) - { - var side = (Side)Random.Range(0, (int)Side.Count); - var rand = Random.Range(0.0f, 1.0f); - - switch (side) - { - case Side.Top: - return new Vector3(_level.Left + rand * _level.Width, _level.Top + scale, 0); - - case Side.Bottom: - return new Vector3(_level.Left + rand * _level.Width, _level.Bottom - scale, 0); - - case Side.Right: - return new Vector3(_level.Right + scale, _level.Bottom + rand * _level.Height, 0); - - case Side.Left: - return new Vector3(_level.Left - scale, _level.Bottom + rand * _level.Height, 0); - } - - Assert.That(false); - return Vector3.zero; - } - - enum Side - { - Top, - Bottom, - Left, - Right, - Count - } - - [Serializable] - public class Settings - { - public float minSpeed; - public float maxSpeed; - - public float minScale; - public float maxScale; - - public int startingSpawns; - public int maxSpawns; - - public float maxSpawnTime; - - public float maxMass; - public float minMass; - } - - class AsteroidAttributes - { - public float SizePx; - public float InitialSpeed; - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/AsteroidManager.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/AsteroidManager.cs.meta deleted file mode 100644 index ae722627b..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Asteroid/AsteroidManager.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a9a361be236d95c48a1de52c435fcc9a -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers.meta deleted file mode 100644 index 171337e6f..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: a1b545d343661c54bbb60bc94fe13453 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsDecoratorInstaller.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsDecoratorInstaller.cs deleted file mode 100644 index 3680b505c..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsDecoratorInstaller.cs +++ /dev/null @@ -1,48 +0,0 @@ -using UnityEngine; -using System.Collections; -using Zenject; -using ModestTree; - -namespace Asteroids -{ - // This scene is an example of how decorators work - // We override move settings to make the ship much slower and add a hotkey to manually spawn asteroids - // Decorators are really useful in particular for running different test configurations - public class AsteroidsDecoratorInstaller : DecoratorInstaller - { - public ShipStateMoving.Settings OverrideMoveSettings; - - // If you are injecting into an installer then you will need to put the binding in PreInstall - public override void PreInstallBindings() - { - Container.Bind().ToSingle(); - // Do not spawn asteroids automatically - Container.Bind().ToInstance(false).WhenInjectedInto(); - } - - public override void PostInstallBindings() - { - // Rebinds should occur as a post-install binding so that they have a chance to override - Container.Rebind().ToSingleInstance(OverrideMoveSettings); - } - } - - public class TestHotKeysAdder : ITickable - { - readonly AsteroidManager _asteroidManager; - - public TestHotKeysAdder(AsteroidManager asteroidManager) - { - _asteroidManager = asteroidManager; - } - - public void Tick() - { - if (Input.GetKeyDown(KeyCode.F4)) - { - _asteroidManager.SpawnNext(); - Log.Info("Spawned new asteroid!"); - } - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsDecoratorInstaller.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsDecoratorInstaller.cs.meta deleted file mode 100644 index 6ebbc9ba2..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsDecoratorInstaller.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f5efd89f29bfcd141907dd60701bc741 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsInstaller.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsInstaller.cs deleted file mode 100644 index 976fd18f9..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsInstaller.cs +++ /dev/null @@ -1,140 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -using System.Collections; -using Zenject; -using System.Linq; - -namespace Asteroids -{ - public enum Cameras - { - Main, - } - - public class AsteroidsInstaller : MonoInstaller - { - [SerializeField] - Settings _settings = null; - - public override void InstallBindings() - { - // Install any other re-usable installers - InstallIncludes(); - // Install the main game - InstallAsteroids(); - InstallSettings(); - InitExecutionOrder(); - } - - // In this example there is only one 'installer' but in larger projects you - // will likely end up with many different re-usable installers - // that you'll want to use in several different scenes - // To re-use an existing installer you can simply bind it to IInstaller like below - // Note that this will only work if your installer is just a normal C# class - // If it's a monobehaviour (that is, derived from MonoInstaller) then you would be - // better off making it a prefab and then just including it in your scene (and adding - // it to the list of installers in the inspector of CompositionRoot) to re-use it - void InstallIncludes() - { - //Container.Install(); - } - - void InstallAsteroids() - { - Container.Bind().ToSingle(); - - // ITickable, IFixedTickable, IInitializable and IDisposable are special Zenject interfaces. - // Binding a class to any of these interfaces creates an instance of the class at startup. - // Binding to any of these interfaces is also necessary to have the method defined in that interface be - // called on the implementing class as follows: - // Binding to ITickable or IFixedTickable will result in Tick() or FixedTick() being called like Update() or FixedUpdate(). - // Binding to IInitializable means that Initialize() will be called on startup. - // Binding to IDisposable means that Dispose() will be called when the app closes, the scene changes, - // or the composition root object is destroyed. - - // Any time you use ToSingle<>, what that means is that the DiContainer will only ever instantiate - // one instance of the type given inside the ToSingle<>. So in this case, any classes that take ITickable, - // IFixedTickable, or AsteroidManager as inputs will receive the same instance of AsteroidManager. - // We create multiple bindings for ITickable, so any dependencies that reference this type must be lists of ITickable. - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - // Here, we're defining a generic factory to create asteroid objects using the given prefab - // There's several different ways of instantiating new game objects in zenject, this is - // only one of them - // So any classes that want to create new asteroid objects can simply include a injected field - // or constructor parameter of type Asteroid.Factory, then call create on that - Container.BindGameObjectFactory(_settings.Asteroid.Prefab); - - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Container.Bind().ToSingle(); - - // Here's another way to create game objects dynamically, by using ToTransientPrefab - // We prefer to use ITickable / IInitializable in favour of the Monobehaviour methods - // so we just use a monobehaviour wrapper class here to pass in asset data - Container.Bind().ToTransientPrefab(_settings.Ship.Prefab).WhenInjectedInto(); - - // In this game there is only one camera so an enum isn't necessary - // but used here to show how it would work if there were multiple - Container.Bind("Main").ToSingleInstance(_settings.MainCamera); - - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - } - - void InstallSettings() - { - Container.Bind().ToSingleInstance(_settings.Ship.StateMoving); - Container.Bind().ToSingleInstance(_settings.Ship.StateDead); - Container.Bind().ToSingleInstance(_settings.Ship.StateStarting); - - Container.Bind().ToSingleInstance(_settings.Asteroid.Spawner); - Container.Bind().ToSingleInstance(_settings.Asteroid.General); - } - - // We don't need to include these bindings but often its nice to have - // control over initialization-order and update-order - void InitExecutionOrder() - { - Container.Install( - new List() - { - // Re-arrange this list to control update order - // These classes will be initialized and updated in this order and disposed of in reverse order - typeof(AsteroidManager), - typeof(GameController), - }); - } - - [Serializable] - public class Settings - { - public Camera MainCamera; - public ShipSettings Ship; - public AsteroidSettings Asteroid; - - [Serializable] - public class ShipSettings - { - public GameObject Prefab; - public ShipStateMoving.Settings StateMoving; - public ShipStateDead.Settings StateDead; - public ShipStateWaitingToStart.Settings StateStarting; - } - - [Serializable] - public class AsteroidSettings - { - public GameObject Prefab; - public AsteroidManager.Settings Spawner; - public Asteroid.Settings General; - } - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsInstaller.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsInstaller.cs.meta deleted file mode 100644 index 97b7a3215..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Installers/AsteroidsInstaller.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ac59283f2813c5643a2495056b74c1c0 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main.meta deleted file mode 100644 index 2d946530b..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 400be1c46a6fb414f856927bc0910da7 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameController.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameController.cs deleted file mode 100644 index a86bd93b0..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameController.cs +++ /dev/null @@ -1,126 +0,0 @@ -using UnityEngine; -using System.Collections; -using Zenject; -using ModestTree; - -namespace Asteroids -{ - public enum GameStates - { - WaitingToStart, - Playing, - GameOver, - } - - public class GameController : IInitializable, ITickable - { - Ship _ship; - GameStates _state = GameStates.WaitingToStart; - AsteroidManager _asteroidSpawner; - float _elapsedTime; - - public float ElapsedTime - { - get { return _elapsedTime; } - } - - public GameStates State - { - get - { - return _state; - } - } - - public GameController(Ship ship, AsteroidManager asteroidSpawner) - { - _asteroidSpawner = asteroidSpawner; - _ship = ship; - } - - public void Initialize() - { - Physics.gravity = Vector3.zero; - -#if UNITY_5 - Cursor.visible = false; -#else - Screen.showCursor = false; -#endif - GameEvent.ShipCrashed += OnShipCrashed; - - Debug.Log("Started Game"); - } - - public void Tick() - { - switch (_state) - { - case GameStates.WaitingToStart: - { - UpdateStarting(); - break; - } - case GameStates.Playing: - { - UpdatePlaying(); - break; - } - case GameStates.GameOver: - { - UpdateGameOver(); - break; - } - default: - { - Assert.That(false); - break; - } - } - } - - void UpdateGameOver() - { - Assert.That(_state == GameStates.GameOver); - - if (Input.GetMouseButtonDown(0)) - { - StartGame(); - } - } - - void OnShipCrashed() - { - Assert.That(_state == GameStates.Playing); - _state = GameStates.GameOver; - _asteroidSpawner.Stop(); - } - - void UpdatePlaying() - { - Assert.That(_state == GameStates.Playing); - _elapsedTime += Time.deltaTime; - } - - void UpdateStarting() - { - Assert.That(_state == GameStates.WaitingToStart); - - if (Input.GetMouseButtonDown(0)) - { - StartGame(); - } - } - - void StartGame() - { - Assert.That(_state == GameStates.WaitingToStart || _state == GameStates.GameOver); - - _ship.Position = Vector3.zero; - _elapsedTime = 0; - _asteroidSpawner.Start(); - _ship.ChangeState(ShipStates.Moving); - _state = GameStates.Playing; - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameController.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameController.cs.meta deleted file mode 100644 index 80b90c6fc..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameController.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d1fe837eefbc3fa4ab06a9081d26caf9 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameEvent.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameEvent.cs deleted file mode 100644 index 0a591bc37..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameEvent.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using UnityEngine; -using System.Collections; -using Zenject; - -namespace Asteroids -{ - public class GameEvent - { - public static Action ShipCrashed = delegate { }; - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameEvent.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameEvent.cs.meta deleted file mode 100644 index 151370a9c..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Main/GameEvent.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 803eb7ef03e646345afb9dffd27a3381 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc.meta deleted file mode 100644 index fcd514bcc..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: f289e0dd7cbe36b408dcfd072332f8b6 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/GuiHandler.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/GuiHandler.cs deleted file mode 100644 index 48b776578..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/GuiHandler.cs +++ /dev/null @@ -1,194 +0,0 @@ -using UnityEngine; -using System.Collections; -using Zenject; -using ModestTree; - -namespace Asteroids -{ - public class GuiHandler : MonoBehaviour - { - [Inject] - public GameController _gameController; - - public GUIStyle titleStyle; - public GUIStyle instructionsStyle; - public GUIStyle gameOverStyle; - public GUIStyle timeStyle; - - public float gameOverFadeInTime; - public float gameOverStartFadeTime; - - public float restartTextStartFadeTime; - public float restartTextFadeInTime; - - float _gameOverElapsed; - - void OnGUI() - { - GUILayout.BeginArea(new Rect(0, 0, Screen.width, Screen.height)); - { - switch (_gameController.State) - { - case GameStates.WaitingToStart: - { - StartGui(); - break; - } - case GameStates.Playing: - { - PlayingGui(); - break; - } - case GameStates.GameOver: - { - PlayingGui(); - GameOverGui(); - break; - } - default: - { - Assert.That(false); - break; - } - } - } - GUILayout.EndArea(); - } - - void GameOverGui() - { - _gameOverElapsed += Time.deltaTime; - - if (_gameOverElapsed > gameOverStartFadeTime) - { - var px = Mathf.Min(1.0f, (_gameOverElapsed - gameOverStartFadeTime) / gameOverFadeInTime); - titleStyle.normal.textColor = new Color(1, 1, 1, px); - } - else - { - titleStyle.normal.textColor = new Color(1, 1, 1, 0); - } - - if (_gameOverElapsed > restartTextStartFadeTime) - { - var px = Mathf.Min(1.0f, (_gameOverElapsed - restartTextStartFadeTime) / restartTextFadeInTime); - instructionsStyle.normal.textColor = new Color(1, 1, 1, px); - } - else - { - instructionsStyle.normal.textColor = new Color(1, 1, 1, 0); - } - - GUILayout.BeginHorizontal(); - { - GUILayout.FlexibleSpace(); - GUILayout.BeginVertical(); - { - GUILayout.FlexibleSpace(); - GUILayout.BeginVertical(); - { - GUILayout.FlexibleSpace(); - - GUILayout.BeginHorizontal(); - { - GUILayout.FlexibleSpace(); - GUILayout.Label("GAME OVER", titleStyle); - GUILayout.FlexibleSpace(); - } - GUILayout.EndHorizontal(); - - GUILayout.Space(60); - - GUILayout.BeginHorizontal(); - { - GUILayout.FlexibleSpace(); - - GUILayout.Label("Click to restart", instructionsStyle); - - GUILayout.FlexibleSpace(); - } - GUILayout.EndHorizontal(); - } - GUILayout.EndVertical(); - - GUILayout.FlexibleSpace(); - } - - GUILayout.EndVertical(); - GUILayout.FlexibleSpace(); - } - GUILayout.EndHorizontal(); - } - - void PlayingGui() - { - GUILayout.BeginVertical(); - { - GUILayout.Space(30); - GUILayout.BeginHorizontal(); - { - GUILayout.Space(30); - GUILayout.Label("Time: " + _gameController.ElapsedTime.ToString("0.##"), timeStyle); - GUILayout.FlexibleSpace(); - } - GUILayout.EndHorizontal(); - } - GUILayout.EndVertical(); - } - - void StartGui() - { - GUILayout.BeginHorizontal(); - { - GUILayout.FlexibleSpace(); - GUILayout.BeginVertical(); - { - GUILayout.Space(100); - GUILayout.FlexibleSpace(); - GUILayout.BeginVertical(); - { - GUILayout.FlexibleSpace(); - - GUILayout.BeginHorizontal(); - { - GUILayout.FlexibleSpace(); - GUILayout.Label("ASTEROIDS", titleStyle); - GUILayout.FlexibleSpace(); - } - GUILayout.EndHorizontal(); - - GUILayout.Space(60); - - GUILayout.BeginHorizontal(); - { - GUILayout.FlexibleSpace(); - - GUILayout.Label("Click to start", instructionsStyle); - - GUILayout.FlexibleSpace(); - } - GUILayout.EndHorizontal(); - } - GUILayout.EndVertical(); - - GUILayout.FlexibleSpace(); - } - - GUILayout.EndVertical(); - GUILayout.FlexibleSpace(); - } - GUILayout.EndHorizontal(); - } - - void Start() - { - GameEvent.ShipCrashed += OnShipCrashed; - } - - void OnShipCrashed() - { - _gameOverElapsed = 0; - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/GuiHandler.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/GuiHandler.cs.meta deleted file mode 100644 index 26ef8bbe7..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/GuiHandler.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 79984cb687438fd469b84d7e916d0574 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/LevelHelper.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/LevelHelper.cs deleted file mode 100644 index 1e099eb6a..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/LevelHelper.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using UnityEngine; -using System.Collections; -using Zenject; -using Random=UnityEngine.Random; - -namespace Asteroids -{ - public class LevelHelper - { - Camera _camera; - - public float Bottom - { - get - { - return -ExtentHeight; - } - } - - public float Top - { - get - { - return ExtentHeight; - } - } - - public float Left - { - get - { - return -ExtentWidth; - } - } - - public float Right - { - get - { - return ExtentWidth; - } - } - - public float ExtentHeight - { - get - { - return _camera.orthographicSize; - } - } - - public float Height - { - get - { - return ExtentHeight * 2.0f; - } - } - - public float ExtentWidth - { - get - { - return _camera.aspect * _camera.orthographicSize; - } - } - - public float Width - { - get - { - return ExtentWidth * 2.0f; - } - } - - public LevelHelper( - [Inject("Main")] - Camera camera) - { - _camera = camera; - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/LevelHelper.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/LevelHelper.cs.meta deleted file mode 100644 index 24c7dc0fe..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/LevelHelper.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 439c34e98ba09b546be28d2b13fda970 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/TilingBackground.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/TilingBackground.cs deleted file mode 100644 index f4fb4ae99..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/TilingBackground.cs +++ /dev/null @@ -1,18 +0,0 @@ -using UnityEngine; -using System.Collections; - -namespace Asteroids -{ - public class TilingBackground : MonoBehaviour - { - public float Speed; - - Vector2 offset; - - void Update() - { - offset.y += Speed * Time.deltaTime; - GetComponent().material.mainTextureOffset = offset; - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/TilingBackground.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/TilingBackground.cs.meta deleted file mode 100644 index f88d84857..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Misc/TilingBackground.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d72ecc6be0485ff4f96c39e24aea61f3 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship.meta deleted file mode 100644 index 11f57000e..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: bb012d11f2128404dbc27a5b0ed3e26a -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/Ship.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/Ship.cs deleted file mode 100644 index 29bffb814..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/Ship.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -using System.Collections; -using Zenject; - -namespace Asteroids -{ - public class Ship : ITickable, IInitializable - { - ShipHooks _hooks; - ShipStateFactory _stateFactory; - ShipState _state = null; - - public Ship(ShipHooks hooks, ShipStateFactory stateFactory) - { - _hooks = hooks; - _stateFactory = stateFactory; - } - - public MeshRenderer MeshRenderer - { - get - { - return _hooks.MeshRenderer; - } - } - - public AudioSource AudioSource - { - get - { - return _hooks.GetComponent(); - } - } - - public ParticleEmitter ParticleEmitter - { - get - { - return _hooks.ParticleEmitter; - } - } - - public Vector3 Position - { - get - { - return _hooks.transform.position; - } - set - { - _hooks.transform.position = value; - } - } - - public Quaternion Rotation - { - get - { - return _hooks.transform.rotation; - } - set - { - _hooks.transform.rotation = value; - } - } - - public void Initialize() - { - _state = _stateFactory.Create(ShipStates.WaitingToStart, this); - _hooks.TriggerEnter += OnTriggerEnter; - } - - public void Tick() - { - _state.Update(); - } - - void OnTriggerEnter(Collider other) - { - _state.OnTriggerEnter(other); - } - - public void ChangeState(ShipStates state, params object[] constructorArgs) - { - if (_state != null) - { - _state.Stop(); - } - - _state = _stateFactory.Create(state, constructorArgs); - _state.Start(); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/Ship.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/Ship.cs.meta deleted file mode 100644 index f5c49fceb..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/Ship.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: aab42c7e45a13404daf7de27c7366efc -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipHooks.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipHooks.cs deleted file mode 100644 index dda85ed4d..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipHooks.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -using System.Collections; -using Zenject; - -namespace Asteroids -{ - public class ShipHooks : MonoBehaviour - { - public event Action TriggerEnter = delegate {}; - - public MeshRenderer MeshRenderer; - public ParticleEmitter ParticleEmitter; - - public void OnTriggerEnter(Collider other) - { - TriggerEnter(other); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipHooks.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipHooks.cs.meta deleted file mode 100644 index 23f53bc6a..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipHooks.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3d2395b0230e353488352840a8083fba -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipState.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipState.cs deleted file mode 100644 index ae83664d4..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipState.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using UnityEngine; -using System.Collections; -using Zenject; - -namespace Asteroids -{ - public enum ShipStates - { - Moving, - Dead, - WaitingToStart, - Count, - } - - public abstract class ShipState - { - protected Ship _ship; - - public ShipState(Ship ship) - { - _ship = ship; - } - - public abstract void Update(); - - public virtual void Start() - { - } - - public virtual void Stop() - { - } - - public virtual void OnTriggerEnter(Collider other) - { - // do nothing - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipState.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipState.cs.meta deleted file mode 100644 index 567b6f166..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipState.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ed789503b99616f4093d9874f7d53042 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateDead.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateDead.cs deleted file mode 100644 index f4ef72e50..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateDead.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using UnityEngine; -using System.Collections; -using Zenject; -using Random=UnityEngine.Random; - -namespace Asteroids -{ - public class ShipStateDead : ShipState - { - Settings _settings; - IInstantiator _gameObjectCreator; - GameObject _shipBroken; - GameObject _shipExplosion; - - public ShipStateDead(Settings settings, Ship ship, IInstantiator gameObjectCreator) - : base(ship) - { - _settings = settings; - _gameObjectCreator = gameObjectCreator; - } - - public override void Start() - { - _ship.MeshRenderer.enabled = false; - _ship.ParticleEmitter.emit = false; - _ship.AudioSource.Play(); - - _shipExplosion = _gameObjectCreator.InstantiatePrefab(_settings.explosionTemplate); - _shipExplosion.transform.position = _ship.Position; - - _shipBroken = _gameObjectCreator.InstantiatePrefab(_settings.brokenTemplate); - _shipBroken.transform.position = _ship.Position; - _shipBroken.transform.rotation = _ship.Rotation; - - foreach (var rigidBody in _shipBroken.GetComponentsInChildren()) - { - var randomTheta = Random.Range(0, Mathf.PI * 2.0f); - var randomDir = new Vector3(Mathf.Cos(randomTheta), Mathf.Sin(randomTheta), 0); - rigidBody.AddForce(randomDir * _settings.explosionForce); - } - - GameEvent.ShipCrashed(); - } - - public override void Stop() - { - _ship.MeshRenderer.enabled = true; - _ship.ParticleEmitter.emit = true; - - GameObject.Destroy(_shipExplosion); - GameObject.Destroy(_shipBroken); - } - - public override void Update() - { - } - - [Serializable] - public class Settings - { - public GameObject brokenTemplate; - public GameObject explosionTemplate; - public float explosionForce; - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateDead.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateDead.cs.meta deleted file mode 100644 index c3f400fbf..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateDead.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 483b981f6c452a74088a31bda9a06832 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateFactory.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateFactory.cs deleted file mode 100644 index 4c14bc363..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateFactory.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -using System.Collections; -using Zenject; -using ModestTree; - -namespace Asteroids -{ - public class ShipStateFactory - { - DiContainer _container; - - public ShipStateFactory(DiContainer container) - { - _container = container; - } - - public ShipState Create(ShipStates state, params object[] constructorArgs) - { - switch (state) - { - case ShipStates.Dead: - return _container.Instantiate(constructorArgs); - - case ShipStates.Moving: - return _container.Instantiate(constructorArgs); - - case ShipStates.WaitingToStart: - return _container.Instantiate(constructorArgs); - } - - Assert.That(false); - return null; - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateFactory.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateFactory.cs.meta deleted file mode 100644 index 847178bac..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateFactory.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 732d3e232d9f7084ca4f03e6129bcbb6 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateMoving.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateMoving.cs deleted file mode 100644 index 0bf76f362..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateMoving.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using UnityEngine; -using System.Collections; -using Zenject; -using ModestTree; - -namespace Asteroids -{ - public class ShipStateMoving : ShipState - { - Settings _settings; - Camera _mainCamera; - Vector3 _lastPosition; - float _oscillationTheta; - - public ShipStateMoving( - Settings settings, Ship ship, - [Inject("Main")] - Camera mainCamera) - : base(ship) - { - _settings = settings; - _mainCamera = mainCamera; - } - - public override void Update() - { - UpdateThruster(); - Move(); - ApplyOscillation(); - } - - void ApplyOscillation() - { - var obj = _ship.MeshRenderer.gameObject; - - var cycleInterval = 1.0f / _settings.oscillationFrequency; - var thetaMoveSpeed = 2 * Mathf.PI / cycleInterval; - - _oscillationTheta += thetaMoveSpeed * Time.deltaTime; - - obj.transform.position = obj.transform.parent.position + new Vector3(0, _settings.oscillationAmplitude * Mathf.Sin(_oscillationTheta), 0); - } - - void UpdateThruster() - { - var speed = (_ship.Position - _lastPosition).magnitude / Time.deltaTime; - var speedPx = Mathf.Clamp(speed / _settings.speedForMaxEmisssion, 0.0f, 1.0f); - - _ship.ParticleEmitter.maxEmission = _settings.maxEmission * speedPx; - } - - void Move() - { - var mouseRay = _mainCamera.ScreenPointToRay(Input.mousePosition); - var mousePos = mouseRay.origin; - mousePos.z = 0; - - _lastPosition = _ship.Position; - _ship.Position = Vector3.Lerp(_ship.Position, mousePos, Mathf.Min(1.0f, _settings.moveSpeed * Time.deltaTime)); - - var moveDelta = _ship.Position - _lastPosition; - var moveDistance = moveDelta.magnitude; - - if (moveDistance > 0.01f) - { - var moveDir = moveDelta / moveDistance; - _ship.Rotation = Quaternion.LookRotation(-moveDir); - } - } - - public override void Start() - { - _lastPosition = _ship.Position; - _ship.ParticleEmitter.emit = true; - } - - public override void Stop() - { - _ship.ParticleEmitter.emit = false; - } - - public override void OnTriggerEnter(Collider other) - { - Assert.That(other.GetComponent() != null); - _ship.ChangeState(ShipStates.Dead, _ship); - } - - [Serializable] - public class Settings - { - public float moveSpeed; - public float rotateSpeed; - - public float speedForMaxEmisssion; - public float maxEmission; - - public float oscillationFrequency; - public float oscillationAmplitude; - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateMoving.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateMoving.cs.meta deleted file mode 100644 index 54b61b0be..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateMoving.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 976b55cf76e95be4c902023484386a04 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateWaitingToStart.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateWaitingToStart.cs deleted file mode 100644 index d0df374e6..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateWaitingToStart.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using UnityEngine; -using System.Collections; -using Zenject; - -namespace Asteroids -{ - public class ShipStateWaitingToStart : ShipState - { - Settings _settings; - float _elapsedTime; - - public ShipStateWaitingToStart(Settings settings, Ship ship) - : base(ship) - { - _settings = settings; - } - - public override void Start() - { - _ship.Position = Vector3.zero; - _ship.Rotation = Quaternion.AngleAxis(90.0f, Vector3.right) * Quaternion.AngleAxis(90.0f, Vector3.up); - } - - public override void Stop() - { - _ship.MeshRenderer.material.color = Color.white; - } - - public override void Update() - { - _elapsedTime += Time.deltaTime; - - var timeForOneCycle = 1.0f / _settings.blinkRate; - var theta = 2.0f * Mathf.PI * _elapsedTime / timeForOneCycle; - - var px = (Mathf.Cos(theta) + 1.0f) / 2.0f; - - _ship.MeshRenderer.material.color = new Color(1.0f, 1.0f, 1.0f, px); - } - - [Serializable] - public class Settings - { - public float blinkRate; - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateWaitingToStart.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateWaitingToStart.cs.meta deleted file mode 100644 index 97eac4151..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Ship/ShipStateWaitingToStart.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ceb0d6fea29946d4aac9665f929f8986 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Util.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Util.meta deleted file mode 100644 index c15d7c121..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Util.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: ca259dfabfd45a54eba7128747f28149 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Util/UnityExtensionMethods.cs b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Util/UnityExtensionMethods.cs deleted file mode 100644 index 1a8c45aab..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Util/UnityExtensionMethods.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace Asteroids -{ - public static class UnityExtensionMethods - { - // Since transforms return their position as a property, - // you can't set the x/y/z values directly, so you have to - // store a temporary Vector3 - // Or you can use these methods instead - public static void SetX(this Transform transform, float x) - { - var pos = transform.position; - pos.x = x; - transform.position = pos; - } - - public static void SetY(this Transform transform, float y) - { - var pos = transform.position; - pos.y = y; - transform.position = pos; - } - - public static void SetZ(this Transform transform, float z) - { - var pos = transform.position; - pos.z = z; - transform.position = pos; - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Util/UnityExtensionMethods.cs.meta b/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Util/UnityExtensionMethods.cs.meta deleted file mode 100644 index fecf1c81f..000000000 --- a/UnityProject/Assets/Zenject/Extras/SampleGame/Scripts/Util/UnityExtensionMethods.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1018c66230d7f7b408485a0d8c28147d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq.meta b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq.meta deleted file mode 100644 index e03a082a3..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 94e61804be6475f429881509dadd8b42 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Editor.meta b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Editor.meta deleted file mode 100644 index bbd3ccb7a..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 0a0a811b061b59c4d8364f33cec9af81 -folderAsset: yes -timeCreated: 1450538465 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Editor/TestAutoMocking.cs b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Editor/TestAutoMocking.cs deleted file mode 100644 index fee9e31e9..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Editor/TestAutoMocking.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestAutoMocking - { - DiContainer _container; - - [SetUp] - public void Setup() - { - _container = new DiContainer(); - } - - [Test] - public void Test1() - { - _container.Bind().ToMock(); - _container.Bind().ToSingle(); - - _container.Resolve().Run(); - } - - public class Bar - { - readonly IFoo _foo; - - public Bar(IFoo foo) - { - _foo = foo; - } - - public void Run() - { - _foo.DoSomething(); - - var result = _foo.GetTest(); - - if (result == null) - { - Log.Trace("Result is null"); - } - - Log.Trace("Finished Running Bar"); - } - } - - public interface IFoo - { - string GetTest(); - - void DoSomething(); - } - } -} - - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Editor/TestAutoMocking.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Editor/TestAutoMocking.cs.meta deleted file mode 100644 index ea0e0a1df..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Editor/TestAutoMocking.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 761d1310ec845844c8f207922bc8fa20 -timeCreated: 1450538465 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins.meta b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins.meta deleted file mode 100644 index 861eeebc3..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 9bdf3f19c1a9da04c8eaef30c11bf7c3 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/License.txt b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/License.txt deleted file mode 100644 index fb36f9263..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/License.txt +++ /dev/null @@ -1,39 +0,0 @@ -Copyright (c) 2007. Clarius Consulting, Manas Technology Solutions, InSTEDD -http://code.google.com/p/moq/ -All rights reserved. - -Redistribution and use in source and binary forms, -with or without modification, are permitted provided -that the following conditions are met: - - * Redistributions of source code must retain the - above copyright notice, this list of conditions and - the following disclaimer. - - * Redistributions in binary form must reproduce - the above copyright notice, this list of conditions - and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of Clarius Consulting, Manas Technology Solutions or InSTEDD nor the - names of its contributors may be used to endorse - or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -[This is the BSD license, see - http://www.opensource.org/licenses/bsd-license.php] \ No newline at end of file diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/License.txt.meta b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/License.txt.meta deleted file mode 100644 index 5449531ee..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/License.txt.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 51b020029b281e344879e276f325193f -TextScriptImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/Moq.dll b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/Moq.dll deleted file mode 100644 index 5a0acb7d1..000000000 Binary files a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/Moq.dll and /dev/null differ diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/Moq.dll.meta b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/Moq.dll.meta deleted file mode 100644 index 6ce0710fa..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/Plugins/Moq.dll.meta +++ /dev/null @@ -1,65 +0,0 @@ -fileFormatVersion: 2 -guid: a30dbc6bf50f41f4ea903a93ebbc347c -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - platformData: - Android: - enabled: 0 - settings: - CPU: AnyCPU - Any: - enabled: 0 - settings: {} - Editor: - enabled: 1 - settings: - CPU: AnyCPU - DefaultValueInitialized: true - OS: AnyOS - Linux: - enabled: 1 - settings: - CPU: x86 - Linux64: - enabled: 1 - settings: - CPU: x86_64 - LinuxUniversal: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel64: - enabled: 1 - settings: - CPU: AnyCPU - OSXUniversal: - enabled: 1 - settings: - CPU: AnyCPU - Win: - enabled: 1 - settings: - CPU: AnyCPU - Win64: - enabled: 1 - settings: - CPU: AnyCPU - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU - iOS: - enabled: 0 - settings: - CompileFlags: - FrameworkDependencies: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/TransientMockProvider.cs b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/TransientMockProvider.cs deleted file mode 100644 index f30f8dedd..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/TransientMockProvider.cs +++ /dev/null @@ -1,41 +0,0 @@ -#if !UNITY_WEBPLAYER && (NOT_UNITY || UNITY_EDITOR) - -using System; -using System.Collections.Generic; -using System.Linq; -using Moq; - -namespace Zenject -{ - public class TransientMockProvider : ProviderBase - { - readonly Dictionary _instances = new Dictionary(); - - public override Type GetInstanceType() - { - return null; - } - - public override object GetInstance(InjectContext context) - { - object instance; - - if (!_instances.TryGetValue(context.MemberType, out instance)) - { - instance = typeof(Mock).GetMethod("Of", new Type[] { context.MemberType }).Invoke(null, null); - _instances.Add(context.MemberType, instance); - } - - return instance; - } - - public override IEnumerable ValidateBinding(InjectContext context) - { - // Always succeeds - return Enumerable.Empty(); - } - } -} - - -#endif diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/TransientMockProvider.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/TransientMockProvider.cs.meta deleted file mode 100644 index 486bc8fb9..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/TransientMockProvider.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 64870b378f87d7340ba3a7b5a034b992 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/ZenjectMoqExtensions.cs b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/ZenjectMoqExtensions.cs deleted file mode 100644 index f7913e4dd..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/ZenjectMoqExtensions.cs +++ /dev/null @@ -1,25 +0,0 @@ -using UnityEngine; -using System.Collections; -using Zenject; -using ModestTree; - -#if UNITY_EDITOR && !UNITY_WEBPLAYER -using Moq; -#endif - -namespace Zenject -{ - public static class ZenjectMoqExtensions - { - public static BindingConditionSetter ToMock(this GenericBinder binder) - where TContract : class - { -#if UNITY_EDITOR && !UNITY_WEBPLAYER - return binder.ToInstance(Mock.Of()); -#else - Assert.That(false, "The use of 'ToMock' in web builds is not supported"); - return null; -#endif - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/ZenjectMoqExtensions.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/ZenjectMoqExtensions.cs.meta deleted file mode 100644 index 8b4d61ce5..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectAutoMocking/Moq/ZenjectMoqExtensions.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 967efb700b0055c46aef99db98225e64 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor.meta deleted file mode 100644 index 89c870c32..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: bfc83cd263c81fd49acbc768487f50e6 -folderAsset: yes -timeCreated: 1426483912 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals.meta deleted file mode 100644 index c7c2560f6..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 08567ab82181bb1458ce233801551074 -folderAsset: yes -timeCreated: 1450373896 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommands.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommands.cs deleted file mode 100644 index 9ae907774..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommands.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; -using Zenject.Commands; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestCommands - { - DiContainer _container; - - [SetUp] - public void Setup() - { - _container = new DiContainer(); - } - - [Test] - public void TestSingleMethod() - { - _container.Bind().ToSingle(); - _container.Bind().ToSingle(); - _container.BindCommand().HandleWithSingle(x => x.Execute).WhenInjectedInto(); - - var bar = _container.Resolve(); - var foo = _container.Resolve(); - - Assert.That(!bar.WasTriggered); - foo.Trigger(); - Assert.That(bar.WasTriggered); - } - - [Test] - public void TestTransientMethod() - { - _container.Bind().ToSingle(); - _container.BindCommand().HandleWithTransient(x => x.Execute).WhenInjectedInto(); - - Bar.Instances.Clear(); - - var foo = _container.Resolve(); - - Assert.IsEqual(Bar.Instances.Count, 0); - foo.Trigger(); - Assert.IsEqual(Bar.Instances.Count, 1); - - var bar1 = Bar.Instances.Single(); - Assert.That(bar1.WasTriggered); - - bar1.WasTriggered = false; - foo.Trigger(); - - Assert.IsEqual(Bar.Instances.Count, 2); - Assert.That(Bar.Instances.Last().WasTriggered); - Assert.That(!bar1.WasTriggered); - } - - [Test] - public void TestSingleHandler() - { - _container.Bind().ToSingle(); - _container.Bind().ToSingle(); - _container.BindCommand().HandleWithSingle().WhenInjectedInto(); - - var foo = _container.Resolve(); - var handler = _container.Resolve(); - - Assert.That(!handler.WasTriggered); - foo.Trigger(); - Assert.That(handler.WasTriggered); - } - - [Test] - public void TestTransientHandler() - { - _container.Bind().ToSingle(); - _container.BindCommand().HandleWithTransient().WhenInjectedInto(); - - BarHandler.Instances.Clear(); - - var foo = _container.Resolve(); - - Assert.IsEqual(BarHandler.Instances.Count, 0); - foo.Trigger(); - Assert.IsEqual(BarHandler.Instances.Count, 1); - - var bar1 = BarHandler.Instances.Single(); - Assert.That(bar1.WasTriggered); - - bar1.WasTriggered = false; - foo.Trigger(); - - Assert.IsEqual(BarHandler.Instances.Count, 2); - Assert.That(BarHandler.Instances.Last().WasTriggered); - Assert.That(!bar1.WasTriggered); - } - - public class DoSomethingCommand : Command - { - } - - public class Foo - { - readonly DoSomethingCommand _doSomethingCommand; - - public Foo(DoSomethingCommand doSomethingCommand) - { - _doSomethingCommand = doSomethingCommand; - } - - public void Trigger() - { - _doSomethingCommand.Execute(); - } - } - - public class Bar - { - public static List Instances = new List(); - - public Bar() - { - Instances.Add(this); - } - - public bool WasTriggered - { - get; - set; - } - - public void Execute() - { - WasTriggered = true; - } - } - - public class BarHandler : ICommandHandler - { - public static List Instances = new List(); - - public BarHandler() - { - Instances.Add(this); - } - - public bool WasTriggered - { - get; - set; - } - - public void Execute() - { - WasTriggered = true; - } - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommands.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommands.cs.meta deleted file mode 100644 index 25566f8d2..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommands.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7f2eb6ec8200da04aa9c7368e6e47c67 -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsOneParam.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsOneParam.cs deleted file mode 100644 index 4ce99b4eb..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsOneParam.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; -using Zenject.Commands; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestCommandsOneParam - { - DiContainer _container; - - [SetUp] - public void Setup() - { - _container = new DiContainer(); - } - - [Test] - public void TestSingle() - { - _container.Bind().ToSingle(); - _container.Bind().ToSingle(); - _container.BindCommand() - .HandleWithSingle(x => x.Execute).WhenInjectedInto(); - - var bar = _container.Resolve(); - var foo = _container.Resolve(); - - Assert.IsNull(bar.ReceivedValue); - foo.Trigger("asdf"); - Assert.IsEqual(bar.ReceivedValue, "asdf"); - } - - [Test] - public void TestTransient() - { - _container.Bind().ToSingle(); - _container.BindCommand().HandleWithTransient(x => x.Execute).WhenInjectedInto(); - - Bar.Instances.Clear(); - - var foo = _container.Resolve(); - - Assert.IsEqual(Bar.Instances.Count, 0); - foo.Trigger("asdf"); - Assert.IsEqual(Bar.Instances.Count, 1); - - var bar1 = Bar.Instances.Single(); - Assert.IsEqual(bar1.ReceivedValue, "asdf"); - - bar1.ReceivedValue = null; - foo.Trigger("zcxv"); - - Assert.IsEqual(Bar.Instances.Count, 2); - Assert.IsEqual(Bar.Instances.Last().ReceivedValue, "zcxv"); - Assert.IsNull(bar1.ReceivedValue); - } - - public class DoSomethingCommand : Command - { - } - - public class Foo - { - readonly DoSomethingCommand _doSomethingCommand; - - public Foo(DoSomethingCommand doSomethingCommand) - { - _doSomethingCommand = doSomethingCommand; - } - - public void Trigger(string value) - { - _doSomethingCommand.Execute(value); - } - } - - - public class Bar - { - public static List Instances = new List(); - - public Bar() - { - Instances.Add(this); - } - - public string ReceivedValue - { - get; - set; - } - - public void Execute(string value) - { - ReceivedValue = value; - } - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsOneParam.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsOneParam.cs.meta deleted file mode 100644 index 3fbc8eb27..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsOneParam.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: be9267bf166f70040bc2aeaf49b24dd3 -timeCreated: 1450501616 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsSixParams.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsSixParams.cs deleted file mode 100644 index 75ef829f7..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsSixParams.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; -using Zenject.Commands; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestCommandsSixParam - { - DiContainer _container; - - [SetUp] - public void Setup() - { - _container = new DiContainer(); - } - - [Test] - public void TestSingle() - { - _container.Bind().ToSingle(); - _container.Bind().ToSingle(); - _container.BindCommand() - .HandleWithSingle(x => x.Execute).WhenInjectedInto(); - - var bar = _container.Resolve(); - var foo = _container.Resolve(); - - Assert.IsNull(bar.ReceivedValue); - foo.Trigger("asdf", 5, 1.2f, "zxcv", 5, 123.0f); - Assert.IsEqual(bar.ReceivedValue, "zxcv"); - } - - [Test] - public void TestTransient() - { - _container.Bind().ToSingle(); - _container.BindCommand().HandleWithTransient(x => x.Execute).WhenInjectedInto(); - - Bar.Instances.Clear(); - - var foo = _container.Resolve(); - - Assert.IsEqual(Bar.Instances.Count, 0); - foo.Trigger("zxcv", 5, 1.2f, "asdf", 5, 123.0f); - Assert.IsEqual(Bar.Instances.Count, 1); - - var bar1 = Bar.Instances.Single(); - Assert.IsEqual(bar1.ReceivedValue, "asdf"); - - bar1.ReceivedValue = null; - foo.Trigger("asdf", 5, 1.2f, "zxcv", 5, 123.0f); - - Assert.IsEqual(Bar.Instances.Count, 2); - Assert.IsEqual(Bar.Instances.Last().ReceivedValue, "zxcv"); - Assert.IsNull(bar1.ReceivedValue); - } - - public class DoSomethingCommand : Command - { - } - - public class Foo - { - readonly DoSomethingCommand _doSomethingCommand; - - public Foo(DoSomethingCommand doSomethingCommand) - { - _doSomethingCommand = doSomethingCommand; - } - - public void Trigger(string value1, int value2, float value3, string value4, int value5, float value6) - { - _doSomethingCommand.Execute(value1, value2, value3, value4, value5, value6); - } - } - - - public class Bar - { - public static List Instances = new List(); - - public Bar() - { - Instances.Add(this); - } - - public string ReceivedValue - { - get; - set; - } - - public void Execute(string value1, int value2, float value3, string value4, int value5, float value6) - { - ReceivedValue = value4; - } - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsSixParams.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsSixParams.cs.meta deleted file mode 100644 index bda936921..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestCommandsSixParams.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5387c23e30f095449a637c8ec5f910b7 -timeCreated: 1450501616 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignals.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignals.cs deleted file mode 100644 index b95756ea5..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignals.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; -using Zenject.Commands; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestSignals - { - DiContainer _container; - - [SetUp] - public void Setup() - { - _container = new DiContainer(); - } - - [Test] - public void RunTest() - { - _container.Bind().ToSingle(); - _container.Bind().ToSingle(); - - _container.BindSignalTrigger() - .WhenInjectedInto(); - - var foo = _container.Resolve(); - var bar = _container.Resolve(); - bar.Initialize(); - - Assert.That(!bar.ReceivedSignal); - foo.DoSomething(); - Assert.That(bar.ReceivedSignal); - - bar.Dispose(); - } - - public class SomethingHappenedSignal : Signal - { - public class Trigger : TriggerBase - { - } - } - - public class Foo - { - readonly SomethingHappenedSignal.Trigger _trigger; - - public Foo(SomethingHappenedSignal.Trigger trigger) - { - _trigger = trigger; - } - - public void DoSomething() - { - _trigger.Fire(); - } - } - - public class Bar - { - readonly SomethingHappenedSignal _signal; - bool _receivedSignal; - - public Bar(SomethingHappenedSignal signal) - { - _signal = signal; - } - - public bool ReceivedSignal - { - get - { - return _receivedSignal; - } - } - - public void Initialize() - { - _signal.Event += OnStarted; - } - - public void Dispose() - { - _signal.Event -= OnStarted; - } - - void OnStarted() - { - _receivedSignal = true; - } - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignals.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignals.cs.meta deleted file mode 100644 index 914c8ed15..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignals.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 24d5ca3c5da1d7c408b87842cdd471a9 -timeCreated: 1450373896 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsOneParam.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsOneParam.cs deleted file mode 100644 index dbb692716..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsOneParam.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; -using Zenject.Commands; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestSignalsOneParam - { - DiContainer _container; - - [SetUp] - public void Setup() - { - _container = new DiContainer(); - } - - [Test] - public void RunTest() - { - _container.Bind().ToSingle(); - _container.Bind().ToSingle(); - - _container.BindSignalTrigger() - .WhenInjectedInto(); - - var foo = _container.Resolve(); - var bar = _container.Resolve(); - bar.Initialize(); - - Assert.IsNull(bar.ReceivedValue); - foo.DoSomething("asdf"); - Assert.IsEqual(bar.ReceivedValue, "asdf"); - - bar.Dispose(); - } - - public class SomethingHappenedSignal : Signal - { - public class Trigger : TriggerBase - { - } - } - - public class Foo - { - readonly SomethingHappenedSignal.Trigger _trigger; - - public Foo(SomethingHappenedSignal.Trigger trigger) - { - _trigger = trigger; - } - - public void DoSomething(string value) - { - _trigger.Fire(value); - } - } - - public class Bar - { - readonly SomethingHappenedSignal _signal; - string _receivedValue; - - public Bar(SomethingHappenedSignal signal) - { - _signal = signal; - } - - public string ReceivedValue - { - get - { - return _receivedValue; - } - } - - public void Initialize() - { - _signal.Event += OnStarted; - } - - public void Dispose() - { - _signal.Event -= OnStarted; - } - - void OnStarted(string value) - { - _receivedValue = value; - } - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsOneParam.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsOneParam.cs.meta deleted file mode 100644 index 83e6a3a93..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsOneParam.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c0e27587a37aead44b354ce43c22da42 -timeCreated: 1450501616 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsSixParams.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsSixParams.cs deleted file mode 100644 index 509cf7834..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsSixParams.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; -using Zenject.Commands; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestSignalsSixParams - { - DiContainer _container; - - [SetUp] - public void Setup() - { - _container = new DiContainer(); - } - - [Test] - public void RunTest() - { - _container.Bind().ToSingle(); - _container.Bind().ToSingle(); - - _container.BindSignalTrigger() - .WhenInjectedInto(); - - var foo = _container.Resolve(); - var bar = _container.Resolve(); - bar.Initialize(); - - Assert.IsNull(bar.ReceivedValue); - foo.DoSomething("asdf", 5, 1.2f, "zxcv", 5, 123.0f); - Assert.IsEqual(bar.ReceivedValue, "zxcv"); - - bar.Dispose(); - } - - public class SomethingHappenedSignal : Signal - { - public class Trigger : TriggerBase - { - } - } - - public class Foo - { - readonly SomethingHappenedSignal.Trigger _trigger; - - public Foo(SomethingHappenedSignal.Trigger trigger) - { - _trigger = trigger; - } - - public void DoSomething(string value1, int value2, float value3, string value4, int value5, float value6) - { - _trigger.Fire(value1, value2, value3, value4, value5, value6); - } - } - - public class Bar - { - readonly SomethingHappenedSignal _signal; - - string _receivedValue; - - public Bar(SomethingHappenedSignal signal) - { - _signal = signal; - } - - public string ReceivedValue - { - get - { - return _receivedValue; - } - } - - public void Initialize() - { - _signal.Event += OnStarted; - } - - public void Dispose() - { - _signal.Event -= OnStarted; - } - - void OnStarted(string value1, int value2, float value3, string value4, int value5, float value6) - { - _receivedValue = value4; - } - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsSixParams.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsSixParams.cs.meta deleted file mode 100644 index 9be486fed..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/CommandsAndSignals/TestSignalsSixParams.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3b6287709ce604b40b1b566122122bdb -timeCreated: 1450501616 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories.meta deleted file mode 100644 index a3cecd58d..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 5150207c4364fdc43a72f99fb234fc87 -folderAsset: yes -timeCreated: 1429326288 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactory.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactory.cs deleted file mode 100644 index 82402633a..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactory.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestFactory : TestWithContainer - { - class Test0 - { - } - - class Test1 - { - } - - class Test2 - { - [Inject] - public Test1 test1 = null; - - [Inject] - public Test0 test0 = null; - - [Inject] - public int value = 0; - - // Test1 should be provided from container - public class Factory : Factory - { - } - } - - [Test] - public void Test() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - var factory = Container.Resolve(); - var test = factory.Create(5, new Test1()); - - Assert.That(test.value == 5); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactoryNullArgs.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactoryNullArgs.cs deleted file mode 100644 index 9c0d89def..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactoryNullArgs.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestFactoryNullArgs : TestWithContainer - { - public interface ITest - { - } - - public class Foo - { - } - - public class Bar - { - } - - class Test2 : ITest - { - [Inject] - public Foo Foo = null; - - [Inject] - public Bar Bar = null; - - public class Factory : Factory - { - } - } - - [Test] - public void Run1() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - var factory = Container.Resolve(); - var test2 = factory.Create(new Bar()); - - Assert.IsNotNull(test2); - } - - [Test] - public void Run2() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - var factory = Container.Resolve(); - var test2 = factory.Create(null); - - Assert.IsNotNull(test2); - Assert.IsNull(test2.Bar); - } - - class Test3 : ITest - { - [Inject] - public Foo Foo1 = null; - - [Inject] - public Foo Foo2 = null; - - [Inject] - public Foo Foo3 = null; - - public class Factory : Factory - { - } - } - - [Test] - public void Run3() - { - Container.Bind().ToSingle(); - - var factory = Container.Resolve(); - var test = factory.Create(null, null, new Foo()); - - Assert.IsNull(test.Foo1); - Assert.IsNull(test.Foo2); - Assert.IsNotNull(test.Foo3); - - test = factory.Create(null, new Foo(), null); - - Assert.IsNull(test.Foo1); - Assert.IsNotNull(test.Foo2); - Assert.IsNull(test.Foo3); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactoryNullArgs.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactoryNullArgs.cs.meta deleted file mode 100644 index 8bd7f50a5..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactoryNullArgs.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b907fd7c27970514ca38eecb761e9843 -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactory.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactory.cs deleted file mode 100644 index 701c0f824..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactory.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestIFactory : TestWithContainer - { - public interface ITest - { - } - - class Test2 : ITest - { - public class Factory : Factory - { - } - } - - class Test3 : ITest - { - } - - class Test4 - { - } - - class Test5 : ITest - { - public Test5(string param) - { - } - - public class Factory : Factory - { - } - } - - [Test] - public void TestToInstance() - { - var test4 = new Test4(); - Container.BindIFactory().ToInstance(test4); - - Assert.IsNotNull(ReferenceEquals(test4, Container.Resolve>().Create())); - } - - [Test] - public void TestToMethod() - { - var test3 = new Test3(); - - Container.BindIFactory().ToMethod(c => test3); - - Assert.That(ReferenceEquals(test3, Container.Resolve>().Create())); - } - - [Test] - public void TestToFactory() - { - Container.BindIFactory().ToFactory(); - - Assert.IsNotNull(Container.Resolve>().Create()); - } - - [Test] - public void TestToDerivedFactory() - { - Container.BindIFactory().ToFactory(); - - Assert.IsNotNull(Container.Resolve>().Create() is Test2); - } - - [Test] - public void TestToIFactory() - { - Container.BindIFactory().ToFactory(); - Container.BindIFactory().ToIFactory(); - - Assert.IsNotNull(Container.Resolve>().Create() is Test3); - } - - [Test] - public void TestToCustomFactory1() - { - Container.Bind().ToSingle(); - Container.BindIFactory().ToCustomFactory(); - - Assert.IsNotNull(Container.Resolve>().Create() is Test2); - } - - [Test] - public void TestToCustomFactory() - { - Container.Bind().ToSingle(); - - Container.BindIFactory().ToCustomFactory(); - - Assert.IsNotNull(Container.Resolve>().Create() is Test2); - } - - [Test] - public void TestToMethodOneParam() - { - Container.BindIFactory().ToMethod((c, param) => new Test5(param)); - Assert.IsNotNull(Container.Resolve>().Create("sdf")); - } - - [Test] - public void TestToFactoryOneParam() - { - Container.BindIFactory().ToFactory(); - - Assert.IsNotNull(Container.Resolve>().Create("sdf")); - } - - [Test] - public void TestToDerivedFactoryOneParam() - { - Container.BindIFactory().ToFactory(); - - Assert.IsNotNull(Container.Resolve>().Create("sdf") is Test5); - } - - [Test] - public void TestToIFactoryOneParam() - { - Container.BindIFactory().ToFactory(); - Container.BindIFactory().ToIFactory(); - - Assert.IsNotNull(Container.Resolve>().Create("sdfds") is Test5); - } - - [Test] - public void TestToCustomFactoryOneParam() - { - Container.Bind().ToSingle(); - - Container.BindIFactory().ToCustomFactory(); - - Assert.IsNotNull(Container.Resolve>().Create("sdfsd") is Test5); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactory.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactory.cs.meta deleted file mode 100644 index de201f725..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactory.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 946701b979a178943ab79929d50e626b -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactoryUntyped.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactoryUntyped.cs deleted file mode 100644 index d05f9a4ff..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactoryUntyped.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestIFactoryUntyped : TestWithContainer - { - public interface ITest - { - } - - class Test2 : ITest - { - public class Factory : FactoryUntyped - { - } - } - - class Test3 : ITest - { - } - - class Test4 - { - } - - class Test5 : ITest - { - public Test5(string param) - { - } - - public class Factory : Factory - { - } - } - - [Test] - public void TestToInstance() - { - var test4 = new Test4(); - Container.BindIFactoryUntyped().ToInstance(test4); - - Assert.IsNotNull(ReferenceEquals(test4, Container.Resolve>().Create())); - } - - [Test] - public void TestToMethod() - { - var test3 = new Test3(); - - Container.BindIFactoryUntyped().ToMethod((c, args) => test3); - - Assert.That(ReferenceEquals(test3, Container.Resolve>().Create())); - } - - [Test] - public void TestToFactory() - { - Container.BindIFactoryUntyped().ToFactory(); - - Assert.IsNotNull(Container.Resolve>().Create()); - } - - [Test] - public void TestToDerivedFactory() - { - Container.BindIFactoryUntyped().ToFactory(); - - Assert.IsNotNull(Container.Resolve>().Create() is Test2); - } - - [Test] - public void TestToCustomFactory() - { - Container.Bind().ToSingle(); - - Container.BindIFactoryUntyped().ToCustomFactory(); - - Assert.IsNotNull(Container.Resolve>().Create() is Test2); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactoryUntyped.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactoryUntyped.cs.meta deleted file mode 100644 index f93bb094f..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestIFactoryUntyped.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ab04ba4aa55cdd441a273080b443e36d -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestAllInjectionTypes.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestAllInjectionTypes.cs deleted file mode 100644 index f17d9a602..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestAllInjectionTypes.cs +++ /dev/null @@ -1,246 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestAllInjectionTypes : TestWithContainer - { - [Test] - // Test all variations of injection - public void TestCase1() - { - Container.Bind().ToInstance(new Test0()); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var foo = Container.Resolve(); - - Assert.That(foo.DidPostInjectBase); - Assert.That(foo.DidPostInjectDerived); - } - - class Test0 - { - } - - interface IFoo - { - bool DidPostInjectBase - { - get; - } - - bool DidPostInjectDerived - { - get; - } - } - - abstract class FooBase : IFoo - { - bool _didPostInjectBase; - - [Inject] - public static Test0 BaseStaticFieldPublic = null; - - [Inject] - private static Test0 BaseStaticFieldPrivate = null; - - [Inject] - protected static Test0 BaseStaticFieldProtected = null; - - [Inject] - public static Test0 BaseStaticPropertyPublic - { - get; - set; - } - - [Inject] - private static Test0 BaseStaticPropertyPrivate - { - get; - set; - } - - [Inject] - protected static Test0 BaseStaticPropertyProtected - { - get; - set; - } - - // Instance - [Inject] - public Test0 BaseFieldPublic = null; - - [Inject] - private Test0 BaseFieldPrivate = null; - - [Inject] - protected Test0 BaseFieldProtected = null; - - [Inject] - public Test0 BasePropertyPublic - { - get; - set; - } - - [Inject] - private Test0 BasePropertyPrivate - { - get; - set; - } - - [Inject] - protected Test0 BasePropertyProtected - { - get; - set; - } - - [PostInject] - public void PostInjectBase() - { - Assert.IsNull(BaseStaticFieldPublic); - Assert.IsNull(BaseStaticFieldPrivate); - Assert.IsNull(BaseStaticFieldProtected); - Assert.IsNull(BaseStaticPropertyPublic); - Assert.IsNull(BaseStaticPropertyPrivate); - Assert.IsNull(BaseStaticPropertyProtected); - - Assert.IsNotNull(BaseFieldPublic); - Assert.IsNotNull(BaseFieldPrivate); - Assert.IsNotNull(BaseFieldProtected); - Assert.IsNotNull(BasePropertyPublic); - Assert.IsNotNull(BasePropertyPrivate); - Assert.IsNotNull(BasePropertyProtected); - - _didPostInjectBase = true; - } - - public bool DidPostInjectBase - { - get - { - return _didPostInjectBase; - } - } - - public abstract bool DidPostInjectDerived - { - get; - } - } - - class FooDerived : FooBase - { - public bool _didPostInject; - public Test0 ConstructorParam; - - public override bool DidPostInjectDerived - { - get - { - return _didPostInject; - } - } - - [Inject] - public static Test0 DerivedStaticFieldPublic = null; - - [Inject] - private static Test0 DerivedStaticFieldPrivate = null; - - [Inject] - protected static Test0 DerivedStaticFieldProtected = null; - - [Inject] - public static Test0 DerivedStaticPropertyPublic - { - get; - set; - } - - [Inject] - private static Test0 DerivedStaticPropertyPrivate - { - get; - set; - } - - [Inject] - protected static Test0 DerivedStaticPropertyProtected - { - get; - set; - } - - // Instance - public FooDerived(Test0 param) - { - ConstructorParam = param; - } - - [PostInject] - public void PostInject() - { - Assert.IsNull(DerivedStaticFieldPublic); - Assert.IsNull(DerivedStaticFieldPrivate); - Assert.IsNull(DerivedStaticFieldProtected); - Assert.IsNull(DerivedStaticPropertyPublic); - Assert.IsNull(DerivedStaticPropertyPrivate); - Assert.IsNull(DerivedStaticPropertyProtected); - - Assert.IsNotNull(DerivedFieldPublic); - Assert.IsNotNull(DerivedFieldPrivate); - Assert.IsNotNull(DerivedFieldProtected); - Assert.IsNotNull(DerivedPropertyPublic); - Assert.IsNotNull(DerivedPropertyPrivate); - Assert.IsNotNull(DerivedPropertyProtected); - Assert.IsNotNull(ConstructorParam); - - _didPostInject = true; - } - - [Inject] - public Test0 DerivedFieldPublic = null; - - [Inject] - private Test0 DerivedFieldPrivate = null; - - [Inject] - protected Test0 DerivedFieldProtected = null; - - [Inject] - public Test0 DerivedPropertyPublic - { - get; - set; - } - - [Inject] - private Test0 DerivedPropertyPrivate - { - get; - set; - } - - [Inject] - protected Test0 DerivedPropertyProtected - { - get; - set; - } - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBaseClassPropertyInjection.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBaseClassPropertyInjection.cs deleted file mode 100644 index 1aa92e989..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBaseClassPropertyInjection.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestBaseClassPropertyInjection : TestWithContainer - { - class Test0 - { - } - - class Test3 - { - } - - class Test1 : Test3 - { - [Inject] protected Test0 val = null; - - public Test0 GetVal() - { - return val; - } - } - - class Test2 : Test1 - { - } - - [Test] - public void TestCaseBaseClassPropertyInjection() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - - Assert.That(test1.GetVal() != null); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBothInterfaceAndConcreteBoundToSameSingleton.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBothInterfaceAndConcreteBoundToSameSingleton.cs deleted file mode 100644 index 53468af2d..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBothInterfaceAndConcreteBoundToSameSingleton.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestBothInterfaceAndConcreteBoundToSameSingleton : TestWithContainer - { - abstract class Test0 - { - } - - class Test1 : Test0 - { - } - - [Test] - public void TestCaseBothInterfaceAndConcreteBoundToSameSingleton() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test2 = Container.Resolve(); - - Assert.That(ReferenceEquals(test1, test2)); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestCircularDependencies.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestCircularDependencies.cs deleted file mode 100644 index cc8efb73f..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestCircularDependencies.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestCircularDependencies : TestWithContainer - { - class Test1 - { - public static int CreateCount; - - [Inject] - public Test2 Other = null; - - public Test1() - { - CreateCount++; - } - } - - class Test2 - { - public static int CreateCount; - - [Inject] - public Test1 Other = null; - - public Test2() - { - CreateCount++; - } - } - - [Test] - public void TestFields() - { - Test2.CreateCount = 0; - Test1.CreateCount = 0; - - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - var test1 = Container.Resolve(); - var test2 = Container.Resolve(); - - Assert.IsEqual(Test2.CreateCount, 1); - Assert.IsEqual(Test1.CreateCount, 1); - Assert.IsEqual(test1.Other, test2); - Assert.IsEqual(test2.Other, test1); - } - - class Test3 - { - public static int CreateCount; - - public Test4 Other = null; - - public Test3() - { - CreateCount++; - } - - [PostInject] - public void Initialize(Test4 other) - { - this.Other = other; - } - } - - class Test4 - { - public static int CreateCount; - - public Test3 Other; - - public Test4() - { - CreateCount++; - } - - [PostInject] - public void Initialize(Test3 other) - { - this.Other = other; - } - } - - [Test] - public void TestPostInject() - { - Test4.CreateCount = 0; - Test3.CreateCount = 0; - - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - var test1 = Container.Resolve(); - var test2 = Container.Resolve(); - - Assert.IsEqual(Test4.CreateCount, 1); - Assert.IsEqual(Test3.CreateCount, 1); - Assert.IsEqual(test1.Other, test2); - Assert.IsEqual(test2.Other, test1); - } - - class Test5 - { - public Test5(Test6 Other) - { - Assert.IsNotNull(Other); - } - } - - class Test6 - { - public Test6(Test5 other) - { - Assert.IsNotNull(other); - } - } - - [Test] - public void TestConstructorInject() - { - if (Container.ChecksForCircularDependencies) - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.Throws(() => Container.Resolve()); - Assert.Throws(() => Container.Resolve()); - - Assert.That(!Container.ValidateResolve().IsEmpty()); - } - } - - class Test7 - { - public Test7(Test7 other) - { - } - } - - [Test] - public void TestSelfDependency() - { - if (Container.ChecksForCircularDependencies) - { - Container.Bind().ToSingle(); - Assert.Throws(() => Container.Instantiate()); - } - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestCircularDependencies.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestCircularDependencies.cs.meta deleted file mode 100644 index b1a0bd075..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestCircularDependencies.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 16b363618f571cd4ea722d4c5b782a1f -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsBasic.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsBasic.cs deleted file mode 100644 index 930ded016..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsBasic.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestConditionsBasic : TestWithContainer - { - public interface IFoo - { - } - - class Foo1 : IFoo - { - } - - class Foo2 : IFoo - { - } - - class Bar1 - { - public IFoo Foo; - - public Bar1(IFoo foo) - { - Foo = foo; - } - } - - class Bar2 - { - public IFoo Foo; - - public Bar2(IFoo foo) - { - Foo = foo; - } - } - - [Test] - public void Test1() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - Container.Bind().ToSingle().WhenInjectedInto(); - - Assert.IsNotEqual( - Container.Resolve().Foo, Container.Resolve().Foo); - } - } -} - - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsBasic.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsBasic.cs.meta deleted file mode 100644 index 6efb25a71..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsBasic.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: fb5eaf353376b28428cd221a3dad0eb3 -timeCreated: 1450369689 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsComplex.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsComplex.cs deleted file mode 100644 index c12940e39..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsComplex.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using NUnit.Framework; -using Assert=ModestTree.Assert; -using ModestTree; -using System.Linq; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestConditionsComplex : TestWithContainer - { - class Foo - { - } - - class Bar - { - public Foo Foo; - - public Bar(Foo foo) - { - Foo = foo; - } - } - - [Test] - public void TestCorrespondingIdentifiers() - { - var foo1 = new Foo(); - var foo2 = new Foo(); - - Container.Bind("Bar1").ToTransient(); - Container.Bind("Bar2").ToTransient(); - - Container.BindInstance(foo1).When(c => c.ParentContexts.Where(x => x.MemberType == typeof(Bar) && x.Identifier == "Bar1").Any()); - Container.BindInstance(foo2).When(c => c.ParentContexts.Where(x => x.MemberType == typeof(Bar) && x.Identifier == "Bar2").Any()); - - Assert.IsEqual(Container.Resolve("Bar1").Foo, foo1); - Assert.IsEqual(Container.Resolve("Bar2").Foo, foo2); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsComplex.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsComplex.cs.meta deleted file mode 100644 index 89ee62e60..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsComplex.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: cab30efe48179214787e9bffd7668a0e -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsFieldName.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsFieldName.cs deleted file mode 100644 index b87333bc8..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsFieldName.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestConditionsFieldName : TestWithContainer - { - class Test0 - { - - } - - class Test1 - { - public Test1(Test0 name1) - { - } - } - - class Test2 - { - public Test2(Test0 name2) - { - } - } - - public override void Setup() - { - base.Setup(); - Container.Bind().ToSingle().When(r => r.MemberName == "name1"); - } - - [Test] - public void TestNameConditionError() - { - Container.Bind().ToSingle(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestNameConditionSuccess() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - - Assert.That(test1 != null); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsFieldName.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsFieldName.cs.meta deleted file mode 100644 index 3b63eba4f..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsFieldName.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 67a8b44cb6fa43c45be4a20a5e22b4a6 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsIdentifier.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsIdentifier.cs deleted file mode 100644 index c45999ee9..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsIdentifier.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestConditionsIdentifier : TestWithContainer - { - class Test0 - { - } - - class Test1 - { - public Test1( - [Inject("foo")] - Test0 name1) - { - } - } - - class Test2 - { - [Inject("foo")] - public Test0 name2 = null; - } - - public override void Setup() - { - base.Setup(); - - Container.Bind().ToTransient(); - Container.Bind().ToTransient(); - Container.Bind().ToTransient(); - Container.Bind().ToTransient(); - } - - [Test] - public void TestUnspecifiedNameConstructorInjection() - { - Container.Bind().ToTransient(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestUnspecifiedNameFieldInjection() - { - Container.Bind().ToTransient(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestSuccessConstructorInjectionString() - { - Container.Bind().ToInstance(new Test0()); - Container.Bind("foo").ToInstance(new Test0()); - - // Should not throw exceptions - Container.Resolve(); - - Assert.IsNotNull(Container.Resolve()); - } - - [Test] - public void TestSuccessFieldInjectionString() - { - Container.Bind().ToInstance(new Test0()); - Container.Bind("foo").ToInstance(new Test0()); - - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.IsNotNull(Container.Resolve()); - } - - class Test3 - { - public Test3( - [Inject("TestValue2")] - Test0 test0) - { - } - } - - class Test4 - { - - } - - [Test] - public void TestFailConstructorInjectionEnum() - { - Container.Bind().ToInstance(new Test0()); - Container.Bind("TestValue1").ToInstance(new Test0()); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestSuccessConstructorInjectionEnum() - { - Container.Bind().ToInstance(new Test0()); - Container.Bind("TestValue2").ToInstance(new Test0()); - - // No exceptions - Container.Resolve(); - - Assert.IsNotNull(Container.Resolve()); - } - - [Test] - public void TestFailFieldInjectionEnum() - { - Container.Bind().ToInstance(new Test0()); - Container.Bind("TestValue1").ToInstance(new Test0()); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestSuccessFieldInjectionEnum() - { - Container.Bind().ToInstance(new Test0()); - Container.Bind("TestValue3").ToInstance(new Test0()); - - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.IsNotNull(Container.Resolve()); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsIdentifier.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsIdentifier.cs.meta deleted file mode 100644 index ecdf03a7d..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsIdentifier.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ecfbc39591b50244c9ad512bc5c68f79 -timeCreated: 1450369689 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsParents.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsParents.cs deleted file mode 100644 index b17da4a0b..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsParents.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestConditionsParents : TestWithContainer - { - class Test0 - { - } - - interface ITest1 - { - } - - class Test1 : ITest1 - { - public Test0 test0; - - public Test1(Test0 test0) - { - this.test0 = test0; - } - } - - class Test2 : ITest1 - { - public Test0 test0; - - public Test2(Test0 test0) - { - this.test0 = test0; - } - } - - class Test3 : ITest1 - { - public Test1 test1; - - public Test3(Test1 test1) - { - this.test1 = test1; - } - } - - class Test4 : ITest1 - { - public Test1 test1; - - public Test4(Test1 test1) - { - this.test1 = test1; - } - } - - [Test] - public void TestCase1() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle().When(c => c.AllObjectTypes.Contains(typeof(Test2))); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestCase2() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle().When(c => c.AllObjectTypes.Contains(typeof(Test1))); - - var test1 = Container.Resolve(); - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.That(test1 != null); - } - - // Test using parents to look deeper up the heirarchy.. - [Test] - public void TestCase3() - { - var t0a = new Test0(); - var t0b = new Test0(); - - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - Container.Bind().ToTransient(); - - Container.Bind().ToInstance(t0a).When(c => c.AllObjectTypes.Contains(typeof(Test3))); - Container.Bind().ToInstance(t0b).When(c => c.AllObjectTypes.Contains(typeof(Test4))); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test3 = Container.Resolve(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test4 = Container.Resolve(); - - Assert.That(ReferenceEquals(test3.test1.test0, t0a)); - Assert.That(ReferenceEquals(test4.test1.test0, t0b)); - } - - [Test] - public void TestCase4() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle().When(c => c.AllObjectTypes.Contains(typeof(ITest1))); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestCase5() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle().When(c => c.AllObjectTypes.Contains(typeof(Test2))); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - Assert.That(test1 != null); - } - - [Test] - public void TestCase6() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle().When(c => c.AllObjectTypes.Where(x => typeof(ITest1).IsAssignableFrom(x)).Any()); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - Assert.That(test1 != null); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsParents.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsParents.cs.meta deleted file mode 100644 index c16b006c2..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsParents.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e7f234812abbf57438188c8319d5d32f -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTarget.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTarget.cs deleted file mode 100644 index 755971bce..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTarget.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestConditionsTarget : TestWithContainer - { - private class Test0 - { - } - - private class Test1 - { - public Test1(Test0 test) - { - } - } - - private class Test2 - { - public Test2(Test0 test) - { - } - } - - public override void Setup() - { - base.Setup(); - Container.Bind().ToSingle().When(r => r.ObjectType == typeof(Test2)); - } - - [Test] - public void TestTargetConditionError() - { - Container.Bind().ToSingle(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestTargetConditionSuccess() - { - Container.Bind().ToSingle(); - Assert.That(Container.ValidateResolve().IsEmpty()); - var test2 = Container.Resolve(); - - Assert.That(test2 != null); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTarget.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTarget.cs.meta deleted file mode 100644 index dfe2a6bab..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTarget.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 83ad6c4a0c931bb4f8cbfc6690cfacd4 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTargetInstance.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTargetInstance.cs deleted file mode 100644 index 583544a6d..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTargetInstance.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestConditionsTargetInstance : TestWithContainer - { - class Test0 - { - } - - class Test1 - { - [Inject] - public Test0 test0 = null; - } - - Test1 _test1; - - public override void Setup() - { - base.Setup(); - - _test1 = new Test1(); - Container.Bind().ToSingle().When(r => r.ObjectInstance == _test1); - Container.Bind().ToInstance(_test1); - } - - [Test] - public void TestTargetConditionError() - { - Container.Inject(_test1); - - Assert.That(_test1.test0 != null); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTargetInstance.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTargetInstance.cs.meta deleted file mode 100644 index ff3d84f78..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConditionsTargetInstance.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 66c8622386009b849b3b074b94a6d1d8 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjection.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjection.cs deleted file mode 100644 index b99362607..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjection.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestConstructorInjection : TestWithContainer - { - private class Test1 - { - } - - private class Test2 - { - public Test1 val; - - public Test2(Test1 val) - { - this.val = val; - } - } - - [Test] - public void TestCase1() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - - Assert.That(test1.val != null); - } - - [Test] - public void TestConstructByFactory() - { - Container.Bind().ToSingle(); - - var val = new Test1(); - var test1 = Container.Instantiate(val); - - Assert.That(test1.val == val); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjection.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjection.cs.meta deleted file mode 100644 index 0e26f3625..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjection.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 119f2e362a4cdc946b6f0ddafcb47d6a -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjectionOptional.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjectionOptional.cs deleted file mode 100644 index 09f4eb1af..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjectionOptional.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestConstructorInjectionOptional : TestWithContainer - { - private class Test1 - { - } - - private class Test2 - { - public Test1 val; - - public Test2(Test1 val = null) - { - this.val = val; - } - } - - private class Test3 - { - public Test1 val; - - public Test3(Test1 val) - { - this.val = val; - } - } - - [Test] - public void TestCase1() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - - Assert.That(test1.val == null); - } - - [Test] - [ExpectedException(typeof(ZenjectResolveException))] - public void TestCase2() - { - Container.Bind().ToSingle(); - - var test1 = Container.Instantiate(); - - Assert.That(test1.val == null); - } - - [Test] - public void TestConstructByFactory() - { - Container.Bind().ToSingle(); - - var test1 = Container.Instantiate(); - - Assert.That(test1.val == null); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjectionOptional.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjectionOptional.cs.meta deleted file mode 100644 index 977096ab5..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestConstructorInjectionOptional.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2d17e02fd5acf54468fd48da7716d600 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDiContainer.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDiContainer.cs deleted file mode 100644 index 3e0e9c23f..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDiContainer.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestDiContainer - { - DiContainer _container; - - [SetUp] - public void Setup() - { - _container = new DiContainer(); - } - - [Test] - public void TestSimple() - { - _container.Bind().ToSingle(); - _container.Bind().ToSingle(); - - AssertHasContracts( - new List() { typeof(Bar), typeof(IFoo) }); - - AssertHasConcreteTypes( - new List() { typeof(Bar), typeof(Foo) }); - } - - void AssertHasConcreteTypes(IEnumerable expectedValues) - { - var concreteList = _container.AllConcreteTypes.ToList(); - var expectedList = GetStandardConcreteTypeInclusions().Concat(expectedValues).ToList(); - - Assert.That( - TestListComparer.ContainSameElements( - concreteList, expectedList), - "Unexpected list: " + TestListComparer.PrintList(concreteList) + "\nExpected: " + TestListComparer.PrintList(expectedList)); - } - - void AssertHasContracts(IEnumerable expectedValues) - { - var contractList = _container.AllContracts.Select(x => x.Type).ToList(); - var expectedList = GetStandardContractTypeInclusions().Concat(expectedValues).ToList(); - - Assert.That( - TestListComparer.ContainSameElements( - contractList, expectedList), - "Unexpected list: " + TestListComparer.PrintList(contractList) + "\nExpected: " + TestListComparer.PrintList(expectedList)); - } - - List GetStandardContractTypeInclusions() - { - return new List() - { - typeof(IInstantiator), typeof(DiContainer), typeof(SingletonInstanceHelper), -#if !ZEN_NOT_UNITY3D - typeof(PrefabSingletonProviderMap), -#endif - typeof(SingletonProviderMap) - }; - } - - List GetStandardConcreteTypeInclusions() - { - return new List() - { - typeof(DiContainer), typeof(SingletonInstanceHelper), -#if !ZEN_NOT_UNITY3D - typeof(PrefabSingletonProviderMap), -#endif - typeof(SingletonProviderMap) - }; - } - - [Test] - public void TestComplex() - { - _container.Bind().ToSingle(); - _container.Bind().ToSingle(); - - _container.Bind().ToInstance(new Bar()); - _container.Bind().ToInstance(new Bar()); - - AssertHasContracts( - new List() { typeof(Bar), typeof(IFoo) }); - - AssertHasConcreteTypes( - new List() { typeof(Bar), typeof(Foo2), typeof(Foo) }); - } - - interface IFoo - { - } - - class Foo : IFoo - { - } - - class Foo2 : IFoo - { - } - - class Bar - { - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDiContainer.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDiContainer.cs.meta deleted file mode 100644 index 697c136be..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDiContainer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 20f63e15e00fc8f4fb757efcdb719e51 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDuplicateInjection.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDuplicateInjection.cs deleted file mode 100644 index 13cb86b41..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDuplicateInjection.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestDuplicateInjection : TestWithContainer - { - private class Test0 - { - } - - private class Test1 - { - public Test1(Test0 test1) - { - } - } - - [Test] - public void TestCaseDuplicateInjection() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Container.Bind().ToSingle(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDuplicateInjection.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDuplicateInjection.cs.meta deleted file mode 100644 index 63ae68e77..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestDuplicateInjection.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e3823fad156ea1a4ab7d11d7cc1244de -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestFacades.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestFacades.cs deleted file mode 100644 index d99f28d5c..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestFacades.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using NUnit.Framework; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestFacades - { - public class FooFacade : Facade - { - public class Factory : FacadeFactory - { - } - } - - public class MyTickable : ITickable - { - public static bool HasTicked; - - public void Tick() - { - HasTicked = true; - } - } - - public class MyInit : IInitializable - { - public static bool HasInitialized; - - public void Initialize() - { - HasInitialized = true; - } - } - - public class MyDispose : IDisposable - { - public static bool HasDisposed; - - public void Dispose() - { - HasDisposed = true; - } - } - - [Test] - public void Test() - { - MyTickable.HasTicked = false; - MyInit.HasInitialized = false; - MyDispose.HasDisposed = false; - - var container = new DiContainer(); - container.BindFacadeFactory(FacadeInstaller); - - var facadeFactory = container.Resolve(); - - Assert.That(!MyInit.HasInitialized); - var facade = facadeFactory.Create(); - Assert.That(MyInit.HasInitialized); - - Assert.That(!MyTickable.HasTicked); - facade.Tick(); - Assert.That(MyTickable.HasTicked); - - Assert.That(!MyDispose.HasDisposed); - facade.Dispose(); - Assert.That(MyDispose.HasDisposed); - } - - void FacadeInstaller(DiContainer subContainer) - { - subContainer.Bind().ToSingle(); - subContainer.Bind().ToSingle(); - subContainer.Bind().ToSingle(); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestFacades.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestFacades.cs.meta deleted file mode 100644 index c45ca8533..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestFacades.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b8808695a108fd847ba0f404d64ee4b6 -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestGenericContract.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestGenericContract.cs deleted file mode 100644 index f1df66d90..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestGenericContract.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestGenericContract : TestWithContainer - { - class Test1 - { - public T Data; - } - - class Test2 - { - } - - [Test] - public void TestToSingle() - { - Container.Bind(typeof(Test1<>)).ToSingle(); - - var test1 = Container.Resolve>(); - Assert.That(test1.Data == 0); - test1.Data = 5; - - var test2 = Container.Resolve>(); - - Assert.That(test2 == test1); - Assert.That(test1.Data == 5); - } - - [Test] - public void TestToTransient() - { - Container.Bind(typeof(Test1<>)).ToTransient(); - - var test1 = Container.Resolve>(); - Assert.That(test1.Data == 0); - - var test2 = Container.Resolve>(); - Assert.That(test2.Data == 0); - Assert.That(test2 != test1); - - Container.Resolve>(); - Container.Resolve>>(); - Container.Resolve>(); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestGenericContract.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestGenericContract.cs.meta deleted file mode 100644 index ea18c53ac..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestGenericContract.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 0208ee5d63d82924b979ab75bb70e2d5 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestIdentifiers.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestIdentifiers.cs deleted file mode 100644 index f1ba9cab4..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestIdentifiers.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestIdentifiers : TestWithContainer - { - class Test0 - { - } - - [Test] - public void TestBasic() - { - Container.Bind("foo").ToTransient(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Container.Resolve("foo"); - Assert.That(Container.ValidateResolve("foo").IsEmpty()); - } - - [Test] - public void TestBasic2() - { - Container.Bind("foo").ToSingle(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Container.Resolve("foo"); - Assert.That(Container.ValidateResolve("foo").IsEmpty()); - } - - [Test] - public void TestBasic3() - { - Container.Bind("foo").ToMethod((ctx) => new Test0()); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Container.Resolve("foo"); - Assert.That(Container.ValidateResolve("foo").IsEmpty()); - } - - [Test] - public void TestBasic4() - { - Container.Bind("foo").ToTransient(); - Container.Bind("foo").ToTransient(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.Throws( - delegate { Container.Resolve("foo"); }); - - Assert.IsEqual(Container.ResolveAll("foo").Count, 2); - } - - [Test] - public void TestToMethodUntyped() - { - Container.Bind(typeof(Test0)).ToMethod((ctx) => new Test0()); - - Container.Resolve(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestIdentifiers.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestIdentifiers.cs.meta deleted file mode 100644 index f44f04864..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestIdentifiers.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c699dc9ffc2043a4987c941dd8355175 -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListComparer.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListComparer.cs deleted file mode 100644 index 12dd17aa9..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListComparer.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - public static class TestListComparer - { - public static bool ContainSameElements(IEnumerable listA, IEnumerable listB) - { - return ContainSameElementsInternal(listA.Cast().ToList(), listB.Cast().ToList()); - } - - static bool ContainSameElementsInternal( - List listA, List listB) - { - // We don't care how they are sorted as long as they are sorted the same way so just use hashcode - Comparison comparer = (object left, object right) => (left.GetHashCode().CompareTo(right.GetHashCode())); - - listA.Sort(comparer); - listB.Sort(comparer); - - return Enumerable.SequenceEqual(listA, listB); - } - - public static string PrintList(List list) - { - return list.Select(x => x.ToString()).ToArray().Join(","); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListComparer.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListComparer.cs.meta deleted file mode 100644 index d9a617347..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListComparer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4e03351f842f97a4fb02ffdabd72351f -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListInjection.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListInjection.cs deleted file mode 100644 index 09c10db63..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListInjection.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestListInjection : TestWithContainer - { - class Test1 - { - public Test1(List values) - { - } - } - - class Test2 - { - public Test2( - [InjectOptional] List values) - { - } - } - - class Test3 - { - [Inject] - public List values = null; - } - - class Test4 - { - [InjectOptional] - public List values = null; - } - - [Test] - [ExpectedException] - public void TestCase1() - { - Container.Bind().ToSingle(); - - Container.ResolveAll(); - } - - [Test] - public void TestCase2() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var result = Container.ResolveAll(); - - Assert.That(result != null); - } - - [Test] - [ExpectedException(typeof(ZenjectResolveException))] - public void TestCase3() - { - Container.Bind().ToSingle(); - - Container.ResolveAll(); - } - - [Test] - public void TestCase4() - { - Container.Bind().ToSingle(); - - var result = Container.ResolveAll(); - - Assert.That(result != null); - } - } -} - - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListInjection.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListInjection.cs.meta deleted file mode 100644 index dbfa1d32b..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestListInjection.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 76037bf191bb5ad40a5ac48537142846 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMoq.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMoq.cs deleted file mode 100644 index a9d662f03..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMoq.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using NUnit.Framework; -//using Moq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestMoq - { - [Test] - public void TestCase1() - { - //var container = new DiContainer(); - //container.Bind().ToMock(); - - //Assert.That(container.ValidateResolve().IsEmpty()); - //var foo = container.Resolve(); - - //Assert.IsEqual(foo.GetBar(), 0); - } - - public interface IFoo - { - int GetBar(); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMoq.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMoq.cs.meta deleted file mode 100644 index 33b1a3711..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMoq.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9121a348b3f10d74ab8b9f6889740a4d -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBind.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBind.cs deleted file mode 100644 index 4ea29b239..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBind.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestMultiBind : TestWithContainer - { - class Test1 - { - } - - class Test2 : Test1 - { - } - - class Test3 : Test1 - { - } - - class TestImpl1 - { - public List tests; - - public TestImpl1(List tests) - { - this.tests = tests; - } - } - - class TestImpl2 - { - [Inject] - public List tests = null; - } - - [Test] - public void TestMultiBind1() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - - Assert.That(test1.tests.Count == 2); - } - - [Test] - public void TestMultiBind2() - { - Container.Bind().ToSingle(); - - // optional list dependencies should be declared as optional - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestMultiBind2Validate() - { - Container.Bind().ToSingle(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestMultiBindListInjection() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test = Container.Resolve(); - Assert.That(test.tests.Count == 2); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBind.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBind.cs.meta deleted file mode 100644 index 877db8c6c..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBind.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4a98921b89683184a82d7318e1507c07 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBindAgain.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBindAgain.cs deleted file mode 100644 index a5babdd60..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBindAgain.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestMultiBindAgain : TestWithContainer - { - private class Test0 - { - } - - private class Test3 : Test0 - { - } - - private class Test4 : Test0 - { - } - - private class Test2 - { - public Test0 test; - - public Test2(Test0 test) - { - this.test = test; - } - } - - private class Test1 - { - public List test; - - public Test1(List test) - { - this.test = test; - } - } - - [Test] - [ExpectedException] - public void TestMultiBind2() - { - // Multi-binds should not map to single-binds - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - Container.Resolve(); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBindAgain.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBindAgain.cs.meta deleted file mode 100644 index ec3defb28..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultiBindAgain.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8bb60b9a400b8f048ac6821192753f55 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultipleInterfaceSameSingle.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultipleInterfaceSameSingle.cs deleted file mode 100644 index ad0c8d468..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultipleInterfaceSameSingle.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestMultipleInterfaceSameSingle : TestWithContainer - { - private interface ITest1 - { - } - - private interface ITest2 - { - } - - private class Test1 : ITest1, ITest2 - { - } - - [Test] - public void TestCase1() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - Assert.That(Container.ValidateResolve().IsEmpty()); - var test2 = Container.Resolve(); - - Assert.That(ReferenceEquals(test1, test2)); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultipleInterfaceSameSingle.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultipleInterfaceSameSingle.cs.meta deleted file mode 100644 index e6a9fb35f..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestMultipleInterfaceSameSingle.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d3cf521372442c04aa15d1aa440222e0 -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNestedContainer.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNestedContainer.cs deleted file mode 100644 index b8cc967b5..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNestedContainer.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestNestedContainer : TestWithContainer - { - public interface IFoo - { - int GetBar(); - } - - public class Foo : IFoo - { - public int GetBar() - { - return 0; - } - } - - public class Foo2 : IFoo - { - public int GetBar() - { - return 1; - } - } - - [Test] - public void TestCase1() - { - var container1 = new DiContainer(); - - Assert.Throws(() => container1.Resolve()); - Assert.Throws(() => Container.Resolve()); - - Container.Bind().ToSingle(); - - Assert.Throws(() => container1.Resolve()); - Assert.IsEqual(Container.Resolve().GetBar(), 0); - - var container2 = new DiContainer(Container); - - Assert.IsEqual(container2.Resolve().GetBar(), 0); - Assert.IsEqual(Container.Resolve().GetBar(), 0); - - container2.Bind().ToSingle(); - - Assert.IsEqual(container2.Resolve().GetBar(), 1); - Assert.IsEqual(Container.Resolve().GetBar(), 0); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNestedContainer.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNestedContainer.cs.meta deleted file mode 100644 index 7124a6177..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNestedContainer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 88f4f0e00f766c442b5f516d50de904e -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNullableValues.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNullableValues.cs deleted file mode 100644 index 43e66f453..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNullableValues.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestNullableValues : TestWithContainer - { - private class Test2 - { - public int? val; - - public Test2(int? val) - { - this.val = val; - } - } - - [Test] - public void RunTest1() - { - Container.Bind().ToSingle(); - Container.Bind().ToInstance(1); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - Assert.IsEqual(test1.val, 1); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNullableValues.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNullableValues.cs.meta deleted file mode 100644 index 3c6e0f27f..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestNullableValues.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 62290e5db04afd74e843d77fa4b75af4 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestParameters.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestParameters.cs deleted file mode 100644 index 1a26f8ac0..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestParameters.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestParameters : TestWithContainer - { - private class Test1 - { - public int f1; - public int f2; - - public Test1(int f1, int f2) - { - this.f1 = f1; - this.f2 = f2; - } - } - - [Test] - public void TestExtraParametersSameType() - { - var test1 = Container.Instantiate(5, 10); - - Assert.That(test1 != null); - Assert.That(test1.f1 == 5 && test1.f2 == 10); - - var test2 = Container.Instantiate(10, 5); - - Assert.That(test2 != null); - Assert.That(test2.f1 == 10 && test2.f2 == 5); - } - - [Test] - public void TestMissingParameterThrows() - { - Container.Bind().ToTransient(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestParameters.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestParameters.cs.meta deleted file mode 100644 index 8b80f2f6b..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestParameters.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 049a60136f1a12041ba57cd0b12bc8b9 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectCall.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectCall.cs deleted file mode 100644 index 9cb5578ad..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectCall.cs +++ /dev/null @@ -1,199 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestPostInjectCall : TestWithContainer - { - class Test0 - { - } - - class Test1 - { - } - - class Test2 - { - } - - class Test3 - { - public bool HasInitialized; - public bool HasInitialized2; - - [Inject] - public Test1 test1 = null; - - [Inject] - public Test0 test0 = null; - - Test2 _test2; - - public Test3(Test2 test2) - { - _test2 = test2; - } - - [PostInject] - public void Init() - { - Assert.That(!HasInitialized); - Assert.IsNotNull(test1); - Assert.IsNotNull(test0); - Assert.IsNotNull(_test2); - HasInitialized = true; - } - - [PostInject] - void TestPrivatePostInject() - { - HasInitialized2 = true; - } - } - - [Test] - public void Test() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test3 = Container.Resolve(); - Assert.That(test3.HasInitialized); - Assert.That(test3.HasInitialized2); - } - - public class SimpleBase - { - public bool WasCalled = false; - - [PostInject] - void Init() - { - WasCalled = true; - } - } - - public class SimpleDerived : SimpleBase - { - } - - [Test] - public void TestPrivateBaseClassPostInject() - { - Container.Bind().ToSingle(); - - var simple = Container.Resolve(); - - Assert.That(simple.WasCalled); - } - - [Test] - public void TestInheritance() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var foo = Container.Resolve(); - - Assert.That(((FooDerived)foo).WasDerivedCalled); - Assert.That(((FooBase)foo).WasBaseCalled); - Assert.That(((FooDerived)foo).WasDerivedCalled2); - Assert.That(((FooBase)foo).WasBaseCalled2); - } - - [Test] - public void TestInheritanceOrder() - { - Container.Bind().ToSingle(); - - // base post inject methods should be called first - _initOrder = 0; - FooBase.BaseCallOrder = 0; - FooDerived.DerivedCallOrder = 0; - FooDerived2.Derived2CallOrder = 0; - - Container.Resolve(); - - //Log.Info("FooBase.BaseCallOrder = {0}".Fmt(FooBase.BaseCallOrder)); - //Log.Info("FooDerived.DerivedCallOrder = {0}".Fmt(FooDerived.DerivedCallOrder)); - - Assert.IsEqual(FooBase.BaseCallOrder, 0); - Assert.IsEqual(FooDerived.DerivedCallOrder, 1); - Assert.IsEqual(FooDerived2.Derived2CallOrder, 2); - } - - static int _initOrder; - - interface IFoo - { - } - - class FooBase : IFoo - { - public bool WasBaseCalled; - public bool WasBaseCalled2; - public static int BaseCallOrder; - - [PostInject] - void TestBase() - { - Assert.That(!WasBaseCalled); - WasBaseCalled = true; - BaseCallOrder = _initOrder++; - } - - [PostInject] - public virtual void TestVirtual1() - { - Assert.That(!WasBaseCalled2); - WasBaseCalled2 = true; - } - } - - class FooDerived : FooBase - { - public bool WasDerivedCalled; - public bool WasDerivedCalled2; - public static int DerivedCallOrder; - - [PostInject] - void TestDerived() - { - Assert.That(!WasDerivedCalled); - WasDerivedCalled = true; - DerivedCallOrder = _initOrder++; - } - - public override void TestVirtual1() - { - base.TestVirtual1(); - Assert.That(!WasDerivedCalled2); - WasDerivedCalled2 = true; - } - } - - class FooDerived2 : FooDerived - { - public bool WasDerived2Called; - public static int Derived2CallOrder; - - [PostInject] - public void TestVirtual2() - { - Assert.That(!WasDerived2Called); - WasDerived2Called = true; - Derived2CallOrder = _initOrder++; - } - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectCall.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectCall.cs.meta deleted file mode 100644 index 5435dc174..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectCall.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 56717c72bd915024ca7c918b17d3ad62 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectParameters.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectParameters.cs deleted file mode 100644 index 7bbfdeafd..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectParameters.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestPostInjectParameters : TestWithContainer - { - class Test0 - { - } - - class Test1 - { - } - - class Test2 - { - } - - class Test3 - { - public bool HasInitialized; - - public Test0 test0 = null; - - [Inject] - public Test1 test1 = null; - - [PostInject] - public void Init( - Test0 test0, - [InjectOptional] - Test2 test2) - { - Assert.That(!HasInitialized); - Assert.IsNotNull(test1); - Assert.IsNull(test2); - Assert.IsNull(this.test0); - this.test0 = test0; - HasInitialized = true; - } - } - - [Test] - public void Test() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.That(!Container.ValidateResolve().IsEmpty()); - - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - - var test3 = Container.Resolve(); - - Assert.That(test3.HasInitialized); - Assert.IsNotNull(test3.test0); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectParameters.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectParameters.cs.meta deleted file mode 100644 index dcac8221c..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPostInjectParameters.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6a3c70d1cf4a10a429548c0620cf81b3 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPropertyInjection.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPropertyInjection.cs deleted file mode 100644 index 9c916aee8..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPropertyInjection.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestPropertyInjection : TestWithContainer - { - class Test1 - { - } - - class Test2 - { - [Inject] - public Test1 val2 { get; private set; } - - [Inject] - Test1 val4 { get; set; } - - public Test1 GetVal4() - { - return val4; - } - } - - [Test] - public void TestPublicPrivate() - { - var test1 = new Test1(); - - Container.Bind().ToSingle(); - Container.Bind().ToInstance(test1); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test2 = Container.Resolve(); - - Assert.IsEqual(test2.val2, test1); - Assert.IsEqual(test2.GetVal4(), test1); - } - - [Test] - public void TestCase2() - { - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPropertyInjection.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPropertyInjection.cs.meta deleted file mode 100644 index 1a22dcfda..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestPropertyInjection.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4777d2d4dd7e57d4f90d154432ebc681 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestRebind.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestRebind.cs deleted file mode 100644 index e3c9f962c..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestRebind.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestRebind : TestWithContainer - { - class Test1 - { - } - - class Test2 : Test1 - { - } - - class Test3 : Test1 - { - } - - [Test] - public void Run() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.That(Container.Resolve() is Test2); - - Container.Rebind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.That(Container.Resolve() is Test3); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestRebind.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestRebind.cs.meta deleted file mode 100644 index 2224062b7..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestRebind.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2363bdb7d34b81f4f8c812e5e5ab8225 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestResolveMany.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestResolveMany.cs deleted file mode 100644 index e2848ab81..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestResolveMany.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestResolveMany : TestWithContainer - { - class Test0 - { - } - - class Test1 : Test0 - { - } - - class Test2 : Test0 - { - } - - [Test] - public void TestCase1() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - List many = Container.ResolveAll(); - - Assert.That(many.Count == 2); - } - - [Test] - public void TestOptional() - { - List many = Container.ResolveAll(true); - Assert.That(many.Count == 0); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestResolveMany.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestResolveMany.cs.meta deleted file mode 100644 index 26c116ad0..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestResolveMany.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c6690f33313ca7a4180c4a93f76e66f5 -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSameConstructorArgumentType.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSameConstructorArgumentType.cs deleted file mode 100644 index ba2661680..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSameConstructorArgumentType.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestSameConstructorArgumentType : TestWithContainer - { - class Test1 - { - public Test2 t1; - public float f; - public Test2 t2; - - public Test1(Test2 t1, float f, Test2 t2) - { - this.t1 = t1; - this.f = f; - this.t2 = t2; - } - } - - class Test2 - { - } - - [Test] - public void Test() - { - var t1 = new Test2(); - var t2 = new Test2(); - - Container.Bind>().ToSingle(); - - Assert.That(Container.ValidateResolve>().IsEmpty()); - var factory = Container.Resolve>(); - - var test = factory.Create(t1, 5.0f, t2); - - Assert.That(ReferenceEquals(test.t1, t1)); - Assert.That(ReferenceEquals(test.t2, t2)); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSameConstructorArgumentType.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSameConstructorArgumentType.cs.meta deleted file mode 100644 index 82c6773e6..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSameConstructorArgumentType.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4c6151c87b4b6d84e969acaae9dba08c -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingleton.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingleton.cs deleted file mode 100644 index 9de23eae5..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingleton.cs +++ /dev/null @@ -1,322 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestSingleton : TestWithContainer - { - private interface IFoo - { - int ReturnValue(); - } - - private class Foo : IFoo, ITickable, IInitializable - { - public int ReturnValue() - { - return 5; - } - - public void Initialize() - { - } - - public void Tick() - { - } - } - - [Test] - public void TestClassRegistration() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.That(Container.Resolve().ReturnValue() == 5); - } - - [Test] - public void TestSingletonOneInstance() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - Assert.That(Container.ValidateResolve().IsEmpty()); - var test2 = Container.Resolve(); - - Assert.That(test1 != null && test2 != null); - Assert.That(ReferenceEquals(test1, test2)); - } - - [Test] - public void TestSingletonOneInstanceUntyped() - { - Container.Bind(typeof(Foo)).ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test1 = Container.Resolve(); - Assert.That(Container.ValidateResolve().IsEmpty()); - var test2 = Container.Resolve(); - - Assert.That(test1 != null && test2 != null); - Assert.That(ReferenceEquals(test1, test2)); - } - - [Test] - public void TestInterfaceBoundToImplementationRegistration() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.That(Container.Resolve().ReturnValue() == 5); - } - - [Test] - public void TestInterfaceBoundToImplementationRegistrationUntyped() - { - Container.Bind(typeof(IFoo)).ToSingle(typeof(Foo)); - - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.That(Container.Resolve().ReturnValue() == 5); - } - - [Test] - public void TestInterfaceBoundToInstanceRegistration() - { - IFoo instance = new Foo(); - - Container.Bind().ToInstance(instance); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var builtInstance = Container.Resolve(); - - Assert.That(ReferenceEquals(builtInstance, instance)); - Assert.That(builtInstance.ReturnValue() == 5); - } - - [Test] - public void TestInterfaceBoundToInstanceRegistrationUntyped() - { - IFoo instance = new Foo(); - - Container.Bind(typeof(IFoo)).ToInstance(instance); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var builtInstance = Container.Resolve(); - - Assert.That(ReferenceEquals(builtInstance, instance)); - Assert.That(builtInstance.ReturnValue() == 5); - } - - [Test] - public void TestDuplicateBindings() - { - // Note: does not error out until a request for Foo is made - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - } - - [Test] - public void TestDuplicateBindingsFail() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestDuplicateBindingsFailUntyped() - { - Container.Bind(typeof(Foo)).ToSingle(); - Container.Bind(typeof(Foo)).ToSingle(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestDuplicateInstanceBindingsFail() - { - var instance = new Foo(); - - Container.Bind().ToInstance(instance); - Container.Bind().ToInstance(instance); - - Assert.That(Container.ValidateResolve().Any()); - - Assert.Throws( - delegate { Container.Resolve(); }); - } - - [Test] - public void TestDuplicateInstanceBindingsFailUntyped() - { - var instance = new Foo(); - - Container.Bind(typeof(Foo)).ToInstance(instance); - Container.Bind(typeof(Foo)).ToInstance(instance); - - Assert.That(Container.ValidateResolve().Any()); - - Assert.Throws( - delegate { Container.Resolve(); }); - } - - [Test] - [ExpectedException(typeof(ZenjectBindException))] - public void TestToSingleWithInstance() - { - Container.Bind().ToSingleInstance(new Foo()); - Container.Bind().ToSingleInstance(new Foo()); - } - - [Test] - [ExpectedException(typeof(ZenjectBindException))] - public void TestToSingleWithInstanceUntyped() - { - Container.Bind(typeof(Foo)).ToSingleInstance(new Foo()); - Container.Bind(typeof(Foo)).ToSingleInstance(new Foo()); - } - - [Test] - public void TestToSingleWithInstance2() - { - var foo = new Foo(); - - Container.Bind().ToInstance(foo); - Container.Bind().ToSingle(); - - Assert.That( - !ReferenceEquals(Container.Resolve(), Container.Resolve())); - } - - [Test] - public void TestToSingleWithInstance2Untyped() - { - var foo = new Foo(); - - Container.Bind(typeof(Foo)).ToInstance(foo); - Container.Bind(typeof(IFoo)).ToSingle(); - - Assert.That( - !ReferenceEquals(Container.Resolve(), Container.Resolve())); - } - - [Test] - public void TestToSingleMethod() - { - var foo = new Foo(); - - Container.Bind(typeof(Foo)).ToSingleMethod((container) => foo); - - Assert.That(ReferenceEquals(Container.Resolve(), foo)); - } - - [Test] - [ExpectedException(typeof(ZenjectBindException))] - public void TestToSingleMethod1() - { - var foo = new Foo(); - - Container.Bind(typeof(Foo)).ToSingleMethod((container) => foo); - Container.Bind(typeof(IFoo)).ToSingle(); - - Assert.That(ReferenceEquals(Container.Resolve(), foo)); - Assert.That(ReferenceEquals(Container.Resolve(), Container.Resolve())); - } - - [Test] - [ExpectedException(typeof(ZenjectBindException))] - public void TestToSingleMethod3() - { - Container.Bind().ToSingle(); - Container.Bind(typeof(IFoo)).ToSingleMethod((container) => new Foo()); - } - - [Test] - [ExpectedException(typeof(ZenjectBindException))] - public void TestToSingleMethod4() - { - // Cannot bind different singleton providers - Container.Bind().ToSingleMethod((container) => new Foo()); - Container.Bind().ToSingle(); - } - - [Test] - [ExpectedException(typeof(ZenjectBindException))] - public void TestToSingleMethod5() - { - Container.Bind().ToSingleMethod((container) => new Foo()); - Container.Bind().ToSingleMethod((container) => new Foo()); - } - - [Test] - public void TestToSingleMethod6() - { - Func method = (ctx) => new Foo(); - - Container.Bind().ToSingleMethod(method); - Container.Bind().ToSingleMethod(method); - - var foos = Container.ResolveAll(); - Assert.IsEqual(foos[0], foos[1]); - } - - [Test] - public void TestToSingleFactory() - { - Container.Bind().ToSingleFactory(); - Container.Bind().ToSingleFactory(); - - FooFactory.WasCalled = false; - - var foo = Container.Resolve(); - Assert.That(FooFactory.WasCalled); - - FooFactory.WasCalled = false; - var ifoo = Container.Resolve(); - - Assert.That(!FooFactory.WasCalled); - - var foo2 = Container.Resolve(); - - Assert.That(!FooFactory.WasCalled); - - Assert.IsEqual(foo, foo2); - Assert.IsEqual(ifoo, foo2); - } - - [Test] - [ExpectedException(typeof(ZenjectBindException))] - public void TestToSingleFactory2() - { - // Cannot bind different singleton providers - Container.Bind().ToSingleFactory(); - Container.Bind().ToSingle(); - } - - class FooFactory : IFactory - { - public static bool WasCalled; - - public Foo Create() - { - WasCalled = true; - return new Foo(); - } - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingleton.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingleton.cs.meta deleted file mode 100644 index 1d0498494..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingleton.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 968c4296a02c32a43a84fbb70f7857c6 -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingletonIdentifiers.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingletonIdentifiers.cs deleted file mode 100644 index 2cfc8449f..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingletonIdentifiers.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestSingletonIdentifiers : TestWithContainer - { - interface IBar - { - } - - interface IFoo - { - } - - class Foo0 : IFoo, IBar - { - } - - [Test] - public void TestSameIdsSameInstance() - { - Container.Bind().ToSingle("foo"); - Container.Bind().ToSingle("foo"); - Container.Bind().ToSingle("foo"); - - Assert.IsEqual(Container.Resolve(), Container.Resolve()); - Assert.IsEqual(Container.Resolve(), Container.Resolve()); - } - - [Test] - public void TestDifferentIdsDifferentInstances() - { - Container.Bind().ToSingle("foo"); - Container.Bind().ToSingle("bar"); - - Assert.IsNotEqual(Container.Resolve(), Container.Resolve()); - } - - [Test] - public void TestNoIdDifferentInstances() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle("bar"); - - Assert.IsNotEqual(Container.Resolve(), Container.Resolve()); - } - - [Test] - public void TestManyInstances() - { - Container.Bind().ToSingle("foo1"); - Container.Bind().ToSingle("foo2"); - Container.Bind().ToSingle("foo3"); - Container.Bind().ToSingle("foo4"); - - Assert.IsEqual(Container.ResolveAll().Count, 4); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingletonIdentifiers.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingletonIdentifiers.cs.meta deleted file mode 100644 index 1acc4dbf3..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSingletonIdentifiers.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2aecea203dc0e9d46bc733b2b4a8fac4 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestStructInjection.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestStructInjection.cs deleted file mode 100644 index dc12d79f6..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestStructInjection.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestStructInjection : TestWithContainer - { - private struct Test1 - { - } - - private class Test2 - { - public Test2(Test1 t1) - { - } - } - - [Test] - public void TestCase1() - { - Container.Bind().ToInstance(new Test1()); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var t2 = Container.Resolve(); - - Assert.That(t2 != null); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestStructInjection.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestStructInjection.cs.meta deleted file mode 100644 index a5b91c2d1..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestStructInjection.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3480b5a5336c9d04d8e15f290f563d94 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer2.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer2.cs deleted file mode 100644 index 633a09306..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer2.cs +++ /dev/null @@ -1,87 +0,0 @@ -using NUnit.Framework; -using Zenject; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestSubContainer2 - { - public interface IHaveMessage - { - string GetMessage(); - } - - public class Welcome : IHaveMessage - { - public string GetMessage() - { - return "Welcome"; - } - } - - public class Bye : IHaveMessage - { - public string GetMessage() - { - return "Bye"; - } - } - - public class User - { - [Inject] - IHaveMessage _iHaveMessage = null; - - [Inject] - DiContainer _container = null; - - public string SayIt() - { - return _iHaveMessage.GetMessage(); - } - - public void Rebind() - { - _container.Rebind().ToSingle(); - _container.Inject(this); - } - } - - [Test] - public void RebindingInSubContainer() - { - DiContainer parentContainer = new DiContainer(); - parentContainer.Bind().ToSingle(); - - Assert.AreEqual("Welcome", parentContainer.Resolve().GetMessage()); - - DiContainer childContainer = parentContainer.CreateSubContainer(); - childContainer.Rebind().ToSingle(); - - Assert.AreEqual("Bye", childContainer.Resolve().GetMessage()); - - Assert.AreEqual("Welcome", parentContainer.Resolve().GetMessage()); - } - - [Test] - public void RebindingInSubContainer2() - { - DiContainer parentContainer = new DiContainer(); - parentContainer.Bind().ToSingle(); - - Assert.AreEqual("Welcome", parentContainer.Resolve().GetMessage()); - - DiContainer childContainer = parentContainer.CreateSubContainer(); - User user = new User(); - childContainer.Inject(user); - - Assert.AreEqual("Welcome", user.SayIt()); - user.Rebind(); - Assert.AreEqual("Bye", user.SayIt()); - - parentContainer.Inject(user); - Assert.AreEqual("Welcome", user.SayIt()); - } - } - -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer2.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer2.cs.meta deleted file mode 100644 index 87a130893..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer2.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 68b3b6fee3b9cbc4ba1d40c85aa905be -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer3.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer3.cs deleted file mode 100644 index 21907e125..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer3.cs +++ /dev/null @@ -1,34 +0,0 @@ -using NUnit.Framework; -using Zenject; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestSubContainer3 - { - public class Foo - { - public int Value; - - public Foo(int value) - { - Value = value; - } - } - - [Test] - public void Test1() - { - DiContainer parentContainer = new DiContainer(); - parentContainer.Bind().ToTransient(); - - // ToTransient should always use the DiContainer given by the inject context - var subContainer = parentContainer.CreateSubContainer(); - subContainer.Bind().ToInstance(5); - - var foo = subContainer.Resolve(); - Assert.AreEqual(foo.Value, 5); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer3.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer3.cs.meta deleted file mode 100644 index b0626e10d..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainer3.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 559151f943f6ba946a95b96b0574e801 -timeCreated: 1451255338 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers.cs deleted file mode 100644 index 914e4cdaa..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestSubContainers : TestWithContainer - { - class Test0 - { - } - - [Test] - public void TestIsRemoved() - { - var subContainer = Container.CreateSubContainer(); - var test1 = new Test0(); - - subContainer.Bind().ToInstance(test1); - - Assert.That(subContainer.ValidateResolve().IsEmpty()); - Assert.That(ReferenceEquals(test1, subContainer.Resolve())); - - Assert.That(Container.ValidateResolve().Any()); - - Assert.Throws( - delegate { Container.Resolve(); }); - } - - class Test1 - { - [Inject] - public Test0 Test = null; - } - - [Test] - public void TestCase2() - { - Test0 test0; - Test1 test1; - - var subContainer = Container.CreateSubContainer(); - var test0Local = new Test0(); - - subContainer.Bind().ToInstance(test0Local); - subContainer.Bind().ToSingle(); - - Assert.That(subContainer.ValidateResolve().IsEmpty()); - test0 = subContainer.Resolve(); - Assert.IsEqual(test0Local, test0); - - Assert.That(subContainer.ValidateResolve().IsEmpty()); - test1 = subContainer.Resolve(); - - Assert.That(Container.ValidateResolve().Any()); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.That(Container.Resolve() != test0); - - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.That(Container.Resolve() != test1); - } - - interface IFoo - { - } - - interface IFoo2 - { - } - - class Foo : IFoo, IFoo2 - { - } - - [Test] - public void TestMultipleSingletonDifferentScope() - { - IFoo foo1; - - var subContainer1 = Container.CreateSubContainer(); - subContainer1.Bind().ToSingle(); - foo1 = subContainer1.Resolve(); - - Assert.That(!Container.ValidateResolve().IsEmpty()); - - var subContainer2 = Container.CreateSubContainer(); - subContainer2.Bind().ToSingle(); - var foo2 = subContainer2.Resolve(); - - Assert.That(foo2 != foo1); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers.cs.meta deleted file mode 100644 index 1abfafba3..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 03a317e7c5f347a4fbc367d4159aff20 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers4.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers4.cs deleted file mode 100644 index 901f31a56..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers4.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestSubContainers4 : TestWithContainer - { - readonly Dictionary _subContainers = new Dictionary(); - - [Test] - public void RunTest() - { - SetupContainer(); - - var view1 = Container.Resolve(); - - Assert.IsEqual(view1.Controller.Model, view1.Model); - - var view2 = Container.Resolve(); - - Assert.IsEqual(view2.Controller.Model, view2.Model); - - Assert.IsNotEqual(view2.Model, view1.Model); - Assert.IsNotEqual(view2, view1); - } - - void SetupContainer() - { - Container.Bind().ToMethod(SubContainerResolve) - .WhenInjectedInto(); - - Container.Bind().ToMethod(SubContainerResolve) - .WhenInjectedInto(); - - Container.Bind().ToTransient(); - } - - T SubContainerResolve(InjectContext context) - { - Assert.IsNotNull(context.ObjectInstance); - DiContainer subContainer; - - if (!_subContainers.TryGetValue(context.ObjectInstance, out subContainer)) - { - subContainer = context.Container.CreateSubContainer(); - _subContainers.Add(context.ObjectInstance, subContainer); - - InstallViewBindings(subContainer); - } - - return (T)subContainer.Resolve(context); - } - - void InstallViewBindings(DiContainer subContainer) - { - subContainer.Bind().ToSingle(); - subContainer.Bind().ToSingle(); - } - - public class RotorController - { - [Inject] - public RotorModel Model; - } - - public class RotorView - { - [Inject] - public RotorController Controller; - - [Inject] - public RotorModel Model; - } - - public class RotorModel - { - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers4.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers4.cs.meta deleted file mode 100644 index 57906d7fb..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestSubContainers4.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d4c9d6c535b81c649a961ac0f7f8764d -timeCreated: 1452187162 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTaskUpdater.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTaskUpdater.cs deleted file mode 100644 index 96d01ec58..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTaskUpdater.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using NUnit.Framework; -using Zenject; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; -using ModestTree.Util; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestTaskUpdater - { - DiContainer _container; - - [SetUp] - public void Setup() - { - _container = new DiContainer(); - - _container.Bind>().ToSingleInstance(new TickablesTaskUpdater()); - } - - public void BindTickable(int priority) where TTickable : ITickable - { - _container.Bind().ToSingle(); - _container.Bind>().ToInstance(ModestTree.Util.Tuple.New(typeof(TTickable), priority)); - } - - [Test] - public void TestTickablesAreOptional() - { - Assert.That(_container.ValidateResolve>().IsEmpty()); - Assert.IsNotNull(_container.Resolve>()); - } - - [Test] - // Test that tickables get called in the correct order - public void TestOrder() - { - _container.Bind().ToSingle(); - _container.Bind().ToSingle(); - _container.Bind().ToSingle(); - - BindTickable(2); - BindTickable(0); - BindTickable(1); - - Assert.That(_container.ValidateResolve>().IsEmpty()); - var kernel = _container.Resolve>(); - - Assert.That(_container.ValidateResolve().IsEmpty()); - var tick1 = _container.Resolve(); - Assert.That(_container.ValidateResolve().IsEmpty()); - var tick2 = _container.Resolve(); - Assert.That(_container.ValidateResolve().IsEmpty()); - var tick3 = _container.Resolve(); - - int tickCount = 0; - - tick1.TickCalled += delegate - { - Assert.IsEqual(tickCount, 0); - tickCount++; - }; - - tick2.TickCalled += delegate - { - Assert.IsEqual(tickCount, 1); - tickCount++; - }; - - tick3.TickCalled += delegate - { - Assert.IsEqual(tickCount, 2); - tickCount++; - }; - - kernel.UpdateAll(); - } - - class Tickable1 : ITickable - { - public event Action TickCalled = delegate {}; - - public void Tick() - { - TickCalled(); - } - } - - class Tickable2 : ITickable - { - public event Action TickCalled = delegate {}; - - public void Tick() - { - TickCalled(); - } - } - - class Tickable3 : ITickable - { - public event Action TickCalled = delegate {}; - - public void Tick() - { - TickCalled(); - } - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTaskUpdater.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTaskUpdater.cs.meta deleted file mode 100644 index 144d3a4ad..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTaskUpdater.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 0f17c8cc07a800d4e80890ab0a546793 -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestOptional.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestOptional.cs deleted file mode 100644 index 565d0e19f..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestOptional.cs +++ /dev/null @@ -1,226 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestTestOptional : TestWithContainer - { - class Test1 - { - } - - class Test2 - { - [Inject] - public Test1 val1 = null; - } - - class Test3 - { - [InjectOptional] - public Test1 val1 = null; - } - - class Test0 - { - [InjectOptional] - public int Val1 = 5; - } - - [Test] - public void TestFieldRequired() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().Any()); - - Assert.Throws( - delegate { Container.Resolve(); }); - } - - [Test] - public void TestFieldOptional() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test = Container.Resolve(); - Assert.That(test.val1 == null); - } - - [Test] - public void TestFieldOptional2() - { - Container.Bind().ToSingle(); - - var test1 = new Test1(); - Container.Bind().ToInstance(test1); - - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.IsEqual(Container.Resolve().val1, test1); - } - - [Test] - public void TestFieldOptional3() - { - Container.Bind().ToTransient(); - - // Should not redefine the hard coded value in this case - Assert.IsEqual(Container.Resolve().Val1, 5); - - Container.Bind().ToInstance(3); - - Assert.IsEqual(Container.Resolve().Val1, 3); - } - - class Test4 - { - public Test4(Test1 val1) - { - } - } - - class Test5 - { - public Test1 Val1; - - public Test5( - [InjectOptional] - Test1 val1) - { - Val1 = val1; - } - } - - [Test] - public void TestParameterRequired() - { - Container.Bind().ToSingle(); - - Assert.Throws( - delegate { Container.Resolve(); }); - - Assert.That(Container.ValidateResolve().Any()); - } - - [Test] - public void TestParameterOptional() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - var test = Container.Resolve(); - Assert.That(test.Val1 == null); - } - - class Test6 - { - public Test6(Test2 test2) - { - } - } - - [Test] - public void TestChildDependencyOptional() - { - Container.Bind().ToSingle(); - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().Any()); - - Assert.Throws( - delegate { Container.Resolve(); }); - } - - class Test7 - { - public int Val1; - - public Test7( - [InjectOptional] - int val1) - { - Val1 = val1; - } - } - - [Test] - public void TestPrimitiveParamOptionalUsesDefault() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - - Assert.IsEqual(Container.Resolve().Val1, 0); - } - - class Test8 - { - public int Val1; - - public Test8( - [InjectOptional] - int val1 = 5) - { - Val1 = val1; - } - } - - [Test] - public void TestPrimitiveParamOptionalUsesExplicitDefault() - { - Container.Bind().ToSingle(); - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.IsEqual(Container.Resolve().Val1, 5); - } - - class Test8_2 - { - public int Val1; - - public Test8_2(int val1 = 5) - { - Val1 = val1; - } - } - - [Test] - public void TestPrimitiveParamOptionalUsesExplicitDefault2() - { - Container.Bind().ToSingle(); - Assert.That(Container.ValidateResolve().IsEmpty()); - Assert.IsEqual(Container.Resolve().Val1, 5); - } - - class Test9 - { - public int? Val1; - - public Test9( - [InjectOptional] - int? val1) - { - Val1 = val1; - } - } - - [Test] - public void TestPrimitiveParamOptionalNullable() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - - Assert.That(!Container.Resolve().Val1.HasValue); - } - } -} - - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestOptional.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestOptional.cs.meta deleted file mode 100644 index 1b2be3112..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestOptional.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9eb4ef801e4aa1340954ecdcdb6c067c -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestUtil.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestUtil.cs deleted file mode 100644 index 2a3d0d015..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestUtil.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestTestUtil - { - [Test] - public void TestTrue() - { - Assert.That(TestListComparer.ContainSameElements( - new List {1}, - new List {1})); - - Assert.That(TestListComparer.ContainSameElements( - new List {1, 2}, - new List {2, 1})); - - Assert.That(TestListComparer.ContainSameElements( - new List {1, 2, 3}, - new List {3, 2, 1})); - - Assert.That(TestListComparer.ContainSameElements( - new List {}, - new List {})); - } - - [Test] - public void TestFalse() - { - Assert.That(!TestListComparer.ContainSameElements( - new List {1, 2, 3}, - new List {3, 2, 3})); - - Assert.That(!TestListComparer.ContainSameElements( - new List {1, 2}, - new List {1, 2, 3})); - } - } -} - - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestUtil.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestUtil.cs.meta deleted file mode 100644 index 95887a089..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTestUtil.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: af5eb3f49e1c29343a9f25c21c7425f4 -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToGetter.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToGetter.cs deleted file mode 100644 index 074b1638a..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToGetter.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestToGetter : TestWithContainer - { - class Bar - { - } - - class Foo - { - Bar _bar = new Bar(); - - public Foo() - { - } - - public Bar GetBar() - { - return _bar; - } - } - - [Test] - public void Test1() - { - Container.Bind().ToSingle(); - Container.Bind().ToGetter(x => x.GetBar()); - - var foo = Container.Resolve(); - var bar = Container.Resolve(); - - Assert.IsEqual(bar, foo.GetBar()); - } - } -} - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToGetter.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToGetter.cs.meta deleted file mode 100644 index 04c17fcc6..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToGetter.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: fede983c8bcdeef4bb00c0cac437ee4c -timeCreated: 1450369689 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToLookup.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToLookup.cs deleted file mode 100644 index 42b7fd4ee..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToLookup.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestToLookup : TestWithContainer - { - interface IFoo - { - } - - class Foo : IFoo - { - } - - [Test] - public void Test1() - { - var foo = new Foo(); - - Container.Bind().ToInstance(foo); - Container.Bind().ToLookup(); - - Assert.IsEqual(Container.Resolve(), Container.Resolve()); - } - - [Test] - public void TestIdentifier() - { - var foo = new Foo(); - - Container.Bind("foo").ToInstance(foo); - Container.Bind().ToLookup("foo"); - - Container.Resolve(); - - Assert.IsEqual(Container.Resolve(), Container.Resolve("foo")); - } - - [Test] - public void TestMissingIdentifier() - { - var foo = new Foo(); - - Container.Bind("foo").ToInstance(foo); - Container.Bind().ToLookup(); - - Assert.Throws( - delegate { Container.Resolve(); }); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToLookup.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToLookup.cs.meta deleted file mode 100644 index 1cb3ebf0a..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestToLookup.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c1d0f98ac6ab70f4caf345c2fc3eb970 -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientInjection.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientInjection.cs deleted file mode 100644 index ae5a334e2..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientInjection.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestTransientInjection : TestWithContainer - { - private class Test1 - { - } - - [Test] - public void TestTransientType() - { - Container.Bind().ToTransient(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - - var test1 = Container.Resolve(); - var test2 = Container.Resolve(); - - Assert.That(test1 != null && test2 != null); - Assert.That(!ReferenceEquals(test1, test2)); - } - - [Test] - public void TestTransientTypeUntyped() - { - Container.Bind(typeof(Test1)).ToTransient(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - - var test1 = Container.Resolve(); - var test2 = Container.Resolve(); - - Assert.That(test1 != null && test2 != null); - Assert.That(!ReferenceEquals(test1, test2)); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientInjection.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientInjection.cs.meta deleted file mode 100644 index 450bc0160..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientInjection.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e105196c68ab0954f9a54c0d042e1a48 -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientMockProvider.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientMockProvider.cs deleted file mode 100644 index 342bc05d5..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientMockProvider.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using Zenject; -using NUnit.Framework; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestTransientMockProvider : TestWithContainer - { - public interface IFoo - { - int GetBar(); - } - - [Test] - public void TestCase1() - { - // Commented out because this requires that zenject be installed with mocking support which isn't always the case - - //Container.FallbackProvider = new TransientMockProvider(Container); - - //var foo = Container.Resolve(); - - //Assert.IsEqual(foo.GetBar(), 0); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientMockProvider.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientMockProvider.cs.meta deleted file mode 100644 index e86cb2c22..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestTransientMockProvider.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a74dd48b93b8ff5449cf8a34922f9669 -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestUnbind.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestUnbind.cs deleted file mode 100644 index 839e94bfd..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestUnbind.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestUnbind : TestWithContainer - { - interface IFoo - { - } - - class Foo : IFoo - { - } - - [Test] - public void TestCase1() - { - Container.Bind().ToSingle(); - - Assert.That(Container.ValidateResolve().IsEmpty()); - - Container.Unbind(); - - Assert.That(!Container.ValidateResolve().IsEmpty()); - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestUnbind.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestUnbind.cs.meta deleted file mode 100644 index b18ec1cbf..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestUnbind.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 79f3eef078824cc40b050d5671c7749b -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestValidateInstaller.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestValidateInstaller.cs deleted file mode 100644 index 8df948305..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestValidateInstaller.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using NUnit.Framework; -using Zenject; -using System.Linq; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class TestValidateInstaller - { - [Test] - public void TestBasicSuccess() - { - var container = new DiContainer(); - - container.Bind().ToSingle(); - container.Bind().ToSingle(); - - Assert.That(container.ValidateResolve().IsEmpty()); - } - - [Test] - public void TestBasicFailure() - { - var container = new DiContainer(); - - container.Bind().ToSingle(); - //container.Bind().ToSingle(); - - Assert.That(!container.ValidateResolve().IsEmpty()); - } - - [Test] - public void TestList() - { - var container = new DiContainer(); - - container.Bind().ToSingle(); - container.Bind().ToSingle(); - - container.Bind().ToSingle(); - - container.Bind().ToSingle(); - - Assert.That(container.ValidateResolve().IsEmpty()); - } - - [Test] - public void TestValidateDynamicSuccess() - { - var container = new DiContainer(); - - container.Bind().ToSingle(); - - Assert.That(container.ValidateObjectGraph(typeof(Bar)).IsEmpty()); - } - - [Test] - public void TestValidateDynamicFailure() - { - var container = new DiContainer(); - - container.Bind().ToSingle(); - - Assert.That(!container.ValidateObjectGraph().IsEmpty()); - } - - [Test] - public void TestValidateDynamicFailure2() - { - var container = new DiContainer(); - - container.Bind().ToSingle(); - - Assert.That(!container.ValidateObjectGraph(typeof(Bar), typeof(string)).IsEmpty()); - } - - [Test] - public void TestValidateNestedContainerSuccess() - { - var container = new DiContainer(); - - var nestedContainer = new DiContainer(container); - - // Should fail without Bar<> bound - Assert.That(!nestedContainer.ValidateObjectGraph().IsEmpty()); - - container.Bind().ToSingle(); - - Assert.That(nestedContainer.ValidateObjectGraph().IsEmpty()); - } - - [Test] - public void TestValidateNestedContainerList() - { - var container = new DiContainer(); - - var nestedContainer = new DiContainer(container); - - container.Bind().ToSingle(); - container.Bind().ToSingle(); - - Assert.That(!container.ValidateResolve>().IsEmpty()); - Assert.That(!nestedContainer.ValidateResolve>().IsEmpty()); - - container.Bind().ToSingle(); - - Assert.That(container.ValidateResolve>().IsEmpty()); - - // Should not throw - nestedContainer.Resolve>(); - - Assert.That(nestedContainer.ValidateResolve>().IsEmpty()); - } - - interface IFoo - { - } - - class Foo : IFoo - { - public Foo(Bar bar) - { - } - } - - class Foo2 : IFoo - { - public Foo2(Bar bar) - { - } - } - - class Bar - { - } - - class Qux - { - public Qux(List foos) - { - } - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestValidateInstaller.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestValidateInstaller.cs.meta deleted file mode 100644 index d11544d4f..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestValidateInstaller.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c91585411dc799247aa82567b152433f -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestWithContainer.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestWithContainer.cs deleted file mode 100644 index 9735bf77e..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestWithContainer.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ModestTree.Util; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - public class TestWithContainer - { - DiContainer _container; - - protected DiContainer Container - { - get - { - return _container; - } - } - - [SetUp] - public virtual void Setup() - { - _container = new DiContainer(); - InstallBindings(); - - Validate(); - _container.Inject(this); - } - - void Validate() - { - var errors = _container.ValidateValidatables().Take(5).ToList(); - - if (!errors.IsEmpty()) - { - throw errors.First(); - - // Print out 5 so you don't have to recompile and execute one by one - //foreach (var err in errors) - //{ - //Log.ErrorException(err); - //} - - //throw new Exception("Zenject Validation failed"); - } - } - - public virtual void InstallBindings() - { - } - - [TearDown] - public virtual void Destroy() - { - _container = null; - } - } -} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestWithContainer.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestWithContainer.cs.meta deleted file mode 100644 index 5f59bfa93..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestWithContainer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b7fa317b6b138e0438c6d64e2d027e0e -timeCreated: 1450369688 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj deleted file mode 100644 index 86368f658..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj +++ /dev/null @@ -1,159 +0,0 @@ - - - - - Debug - AnyCPU - {34E27462-3046-4DC7-A7FA-45E4F4F7D413} - Library - Properties - Zenject_tests - Zenject-tests - v3.5 - 512 - - - - true - full - false - ..\..\..\..\..\..\AssemblyBuild\Temp\Debug\ - ..\..\..\..\..\..\AssemblyBuild\Temp\Debug\ - ..\..\..\..\..\..\AssemblyBuild\Bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\..\..\..\..\AssemblyBuild\Temp\Release\ - ..\..\..\..\..\..\AssemblyBuild\Temp\Release\ - ..\..\..\..\..\..\AssemblyBuild\Bin\Release\ - TRACE - prompt - 4 - - - true - ..\..\..\..\..\..\AssemblyBuild\Bin\Not Unity Debug\ - TRACE;DEBUG;ZEN_NOT_UNITY3D - ..\..\..\..\..\..\AssemblyBuild\Temp\Debug\ - ..\..\..\..\..\..\AssemblyBuild\Temp\Debug\ - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - ..\..\..\..\..\..\AssemblyBuild\Bin\Not Unity Release\ - TRACE;ZEN_NOT_UNITY3D - ..\..\..\..\..\..\AssemblyBuild\Temp\Debug\ - ..\..\..\..\..\..\AssemblyBuild\Temp\Debug\ - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - ..\..\..\..\..\..\AssemblyBuild\Libraries\NUnit\nunit.core.dll - - - False - ..\..\..\..\..\..\AssemblyBuild\Libraries\NUnit\nunit.framework.dll - - - - - - - - - ..\..\..\..\..\AssemblyBuild\Libraries\Unity\UnityEngine.dll - - - ..\..\..\..\..\..\AssemblyBuild\Libraries\Unity\UnityEngine.dll - - - - - {46f25a62-2e29-48cb-95f3-bdbcb0976ddc} - Zenject - - - {b543a0b8-2630-424e-b628-53457be4884b} - Zenject.Commands - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj.meta deleted file mode 100644 index 3585ed47b..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: af22f06401335a44c96ae43e679ef117 -timeCreated: 1427560204 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj.user b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj.user deleted file mode 100644 index fe7dc2232..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - ShowAllFiles - - \ No newline at end of file diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj.user.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj.user.meta deleted file mode 100644 index ef5bd497b..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Zenject-tests.csproj.user.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fb3240a4c2e4f814f83d36a03411791c -timeCreated: 1450537622 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/ZenjectProfileTest.cs b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/ZenjectProfileTest.cs deleted file mode 100644 index 933931c9f..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/ZenjectProfileTest.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using Zenject; -using NUnit.Framework; -using ModestTree; -using Assert=ModestTree.Assert; - -namespace Zenject.Tests -{ - [TestFixture] - public class ZenjectProfileTest - { - class Test0 - { - public Test0() - { - } - - public void DoStuff() - { - } - - public void DoStuff1() - { - } - } - - class Test1 - { - - - [Inject] - public Test0 TestB - { - set; - get; - } - - [Inject] - public Test0 _testC = null; - - public Test1(Test0 test1, Test0 test2, Test0 test3, Test0 test4) - { - } - - public void DoStuff() - { - } - - public void DoStuff1() - { - } - } - - class Test2 - { - - [Inject] - public Test1 TestB - { - set; - get; - } - - [Inject] - public Test1 _testC = null; - - public Test2(Test1 test1, Test1 test2, Test1 test3, Test1 test4) - { - } - } - - [Test] - // Test speed of resolve function - public void Test() - { - //var container = new DiContainer(); - //container.Bind().ToTransient(); - //container.Bind().ToTransient(); - //container.Bind().ToTransient(); - - //var stopwatch = new Stopwatch(); - - //stopwatch.Start(); - - //for (int i = 0; i < 1000; i++) - //{ - //var test0 = container.Resolve(); - //var test1 = container.Resolve(); - //var test2 = container.Resolve(); - //} - - //stopwatch.Stop(); - - //Log.InfoFormat("time = {0}", stopwatch.Elapsed.TotalSeconds); - - //Assert.That(false); - } - } -} - - diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/ZenjectProfileTest.cs.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/ZenjectProfileTest.cs.meta deleted file mode 100644 index 89b376669..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/ZenjectProfileTest.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 0eb577c5146389c4c919c93cdbc70ffb -timeCreated: 1450369687 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Readme.txt b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Readme.txt deleted file mode 100644 index d16690bc2..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Readme.txt +++ /dev/null @@ -1 +0,0 @@ -Note: You will need Unity Test Tools package installed from asset store in order to execute these tests. \ No newline at end of file diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Readme.txt.meta b/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Readme.txt.meta deleted file mode 100644 index fcfb5ef1e..000000000 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Readme.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ec2c21f0610b50947be7edc169fc84a6 -timeCreated: 1426484052 -licenseType: Free -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/Binders.meta b/UnityProject/Assets/Zenject/Source/Binders.meta similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Binders.meta rename to UnityProject/Assets/Zenject/Source/Binders.meta diff --git a/UnityProject/Assets/Zenject/Source/Binders/BinderBase.cs b/UnityProject/Assets/Zenject/Source/Binders/BinderBase.cs new file mode 100644 index 000000000..7a775b6e0 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/BinderBase.cs @@ -0,0 +1,61 @@ +using System; +using ModestTree; +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + public abstract class BinderBase + { + readonly Type _contractType; + readonly DiContainer _container; + readonly string _bindIdentifier; + + public BinderBase( + DiContainer container, + Type contractType, + string bindIdentifier) + { + _container = container; + _contractType = contractType; + _bindIdentifier = bindIdentifier; + } + + protected Type ContractType + { + get + { + return _contractType; + } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + protected virtual BindingConditionSetter ToProvider(ProviderBase provider) + { + _container.RegisterProvider( + provider, new BindingId(_contractType, _bindIdentifier)); + + if (_contractType.IsValueType) + { + var nullableType = typeof(Nullable<>).MakeGenericType(_contractType); + + // Also bind to nullable primitives + // this is useful so that we can have optional primitive dependencies + _container.RegisterProvider( + provider, new BindingId(nullableType, _bindIdentifier)); + } + + return new BindingConditionSetter(provider); + } + } +} + + diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactory.cs.meta b/UnityProject/Assets/Zenject/Source/Binders/BinderBase.cs.meta similarity index 85% rename from UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactory.cs.meta rename to UnityProject/Assets/Zenject/Source/Binders/BinderBase.cs.meta index a3761af10..9bac000bd 100644 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/Factories/TestFactory.cs.meta +++ b/UnityProject/Assets/Zenject/Source/Binders/BinderBase.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5af2feb443adbb24891d45b78337f664 +guid: 2eea39da231b23c449709510cd8584d4 timeCreated: 1450369687 licenseType: Pro MonoImporter: diff --git a/UnityProject/Assets/Zenject/Source/Binders/BindingConditionSetter.cs b/UnityProject/Assets/Zenject/Source/Binders/BindingConditionSetter.cs new file mode 100644 index 000000000..7ef0450c8 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/BindingConditionSetter.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + public delegate bool BindingCondition(InjectContext c); + + [System.Diagnostics.DebuggerStepThrough] + public class BindingConditionSetter + { + readonly ProviderBase _provider; + + public BindingConditionSetter(ProviderBase provider) + { + _provider = provider; + } + + public void When(BindingCondition condition) + { + _provider.Condition = condition; + } + + public void WhenInjectedIntoInstance(object instance) + { + _provider.Condition = r => ReferenceEquals(r.ObjectInstance, instance); + } + + public void WhenInjectedInto(params Type[] targets) + { + _provider.Condition = r => targets.Where(x => r.ObjectType != null && r.ObjectType.DerivesFromOrEqual(x)).Any(); + } + + public void WhenInjectedInto() + { + _provider.Condition = r => r.ObjectType != null && r.ObjectType.DerivesFromOrEqual(typeof(T)); + } + + public void WhenNotInjectedInto() + { + _provider.Condition = r => r.ObjectType == null || !r.ObjectType.DerivesFromOrEqual(typeof(T)); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Binders/BindingConditionSetter.cs.meta b/UnityProject/Assets/Zenject/Source/Binders/BindingConditionSetter.cs.meta new file mode 100644 index 000000000..852597a37 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/BindingConditionSetter.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3f59bbf2f4f1a6c4191be868c93821d0 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Binders/GenericBinder.cs b/UnityProject/Assets/Zenject/Source/Binders/GenericBinder.cs new file mode 100644 index 000000000..118bd8501 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/GenericBinder.cs @@ -0,0 +1,183 @@ +using System; +using ModestTree; + +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + // All this class does is provide generic constraints on all the inherited bind methods + public class GenericBinder : TypeBinder + { + public GenericBinder( + DiContainer container, string identifier, + SingletonProviderMap singletonMap) + : base(container, typeof(TContract), identifier, singletonMap) + { + } + + public BindingConditionSetter ToLookup() + where TConcrete : TContract + { + return ToLookupBase(null); + } + + public BindingConditionSetter ToLookup(string identifier) + where TConcrete : TContract + { + return ToLookupBase(identifier); + } + + public BindingConditionSetter ToMethod(Func method) + { + return ToMethodBase(method); + } + + public BindingConditionSetter ToGetter(Func method) + { + return ToGetterBase(null, method); + } + + public BindingConditionSetter ToGetter(string identifier, Func method) + { + return ToGetterBase(identifier, method); + } + + public BindingConditionSetter ToTransient() + where TConcrete : TContract + { + return ToTransient(typeof(TConcrete)); + } + + public BindingConditionSetter ToSingle(string concreteIdentifier) + where TConcrete : TContract + { + return ToSingle(typeof(TConcrete), concreteIdentifier); + } + + public BindingConditionSetter ToInstance(TConcrete instance) + where TConcrete : TContract + { + return ToInstance(typeof(TConcrete), instance); + } + + public BindingConditionSetter ToSingleInstance(TConcrete instance) + where TConcrete : TContract + { + return ToSingleInstance(typeof(TConcrete), null, instance); + } + + public BindingConditionSetter ToSingleInstance(string concreteIdentifier, TConcrete instance) + where TConcrete : TContract + { + return ToSingleInstance(typeof(TConcrete), concreteIdentifier, instance); + } + + public BindingConditionSetter ToSingleMethod(string concreteIdentifier, Func method) + where TConcrete : TContract + { + return ToSingleMethodBase(concreteIdentifier, method); + } + + public BindingConditionSetter ToSingleMethod(Func method) + where TConcrete : TContract + { + return ToSingleMethodBase(null, method); + } + + public BindingConditionSetter ToSingleFactory() + where TFactory : IFactory + { + return ToSingleFactoryBase(null); + } + + public BindingConditionSetter ToSingleFactory(string concreteIdentifier) + where TFactory : IFactory + { + return ToSingleFactoryBase(concreteIdentifier); + } + + public BindingConditionSetter ToSingleFactory() + where TFactory : IFactory + where TConcrete : TContract + { + return ToSingleFactoryBase(null); + } + + public BindingConditionSetter ToSingleFactory(string concreteIdentifier) + where TFactory : IFactory + where TConcrete : TContract + { + return ToSingleFactoryBase(concreteIdentifier); + } + + public BindingConditionSetter ToSingle() + where TConcrete : TContract + { + return ToSingle(typeof(TConcrete), null); + } + +#if !ZEN_NOT_UNITY3D + + public BindingConditionSetter ToResource(string resourcePath) + where TConcrete : TContract + { + return ToResource(typeof(TConcrete), resourcePath); + } + + // Note: Here we assume that the contract is a component on the given prefab + public BindingConditionSetter ToTransientPrefabResource(string resourcePath) + where TConcrete : TContract + { + return ToTransientPrefabResource(typeof(TConcrete), resourcePath); + } + + // Note: Here we assume that the contract is a component on the given prefab + public BindingConditionSetter ToTransientPrefab(GameObject prefab) + where TConcrete : TContract + { + return ToTransientPrefab(typeof(TConcrete), prefab); + } + + // Creates a new game object and adds the given type as a new component on it + // NOTE! The string given here is just a name and not a singleton identifier + public BindingConditionSetter ToSingleGameObject(string name) + where TConcrete : Component, TContract + { + return ToSingleGameObject(typeof(TConcrete), name); + } + + public BindingConditionSetter ToSingleMonoBehaviour(GameObject gameObject) + where TConcrete : TContract + { + return ToSingleMonoBehaviourBase(gameObject); + } + + public BindingConditionSetter ToSinglePrefab(GameObject prefab) + where TConcrete : TContract + { + return ToSinglePrefab(typeof(TConcrete), null, prefab); + } + + public BindingConditionSetter ToSinglePrefab(string identifier, GameObject prefab) + where TConcrete : TContract + { + return ToSinglePrefab(typeof(TConcrete), identifier, prefab); + } + + public BindingConditionSetter ToSinglePrefabResource(string resourcePath) + where TConcrete : TContract + { + return ToSinglePrefabResource(typeof(TConcrete), null, resourcePath); + } + + public BindingConditionSetter ToSinglePrefabResource(string identifier, string resourcePath) + where TConcrete : TContract + { + return ToSinglePrefabResource(typeof(TConcrete), identifier, resourcePath); + } +#endif + } +} + diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestAllInjectionTypes.cs.meta b/UnityProject/Assets/Zenject/Source/Binders/GenericBinder.cs.meta similarity index 85% rename from UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestAllInjectionTypes.cs.meta rename to UnityProject/Assets/Zenject/Source/Binders/GenericBinder.cs.meta index 3121135cc..e4609234f 100644 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestAllInjectionTypes.cs.meta +++ b/UnityProject/Assets/Zenject/Source/Binders/GenericBinder.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6f1a5009cac17b54dac38680a1245f8f +guid: 12a43c7bc62d0dd4096204b34a1b0865 timeCreated: 1450369687 licenseType: Pro MonoImporter: diff --git a/UnityProject/Assets/Zenject/Source/Binders/IFactoryBinder.cs b/UnityProject/Assets/Zenject/Source/Binders/IFactoryBinder.cs new file mode 100644 index 000000000..451cf50bb --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/IFactoryBinder.cs @@ -0,0 +1,399 @@ +using System; +using ModestTree; +using ModestTree.Util; + +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + ////////////////////////////// Zero parameters ////////////////////////////// + [System.Diagnostics.DebuggerStepThrough] + public class IFactoryBinder + { + readonly DiContainer _container; + readonly string _identifier; + + public IFactoryBinder(DiContainer container, string identifier) + { + _container = container; + _identifier = identifier; + } + + public BindingConditionSetter ToInstance(TContract instance) + { + return ToMethod((c) => instance); + } + + public BindingConditionSetter ToMethod( + Func method) + { + return _container.Bind>(_identifier) + .ToMethod((ctx) => ctx.Container.Instantiate>(method)); + } + + public BindingConditionSetter ToFactory() + { + Assert.That(!typeof(TContract).IsAbstract, + "Unable to create abstract type '{0}' in Factory", typeof(TContract).Name()); + return _container.Bind>(_identifier) + .ToTransient>(); + } + + public BindingConditionSetter ToFactory() + where TConcrete : TContract + { + return ToCustomFactory>(); + } + + // Note that we assume here that IFactory is bound somewhere else + public BindingConditionSetter ToIFactory() + where TConcrete : TContract + { + return _container.Bind>(_identifier) + .ToMethod(c => new FactoryNested(c.Container.Resolve>())); + } + + public BindingConditionSetter ToCustomFactory() + where TFactory : IFactory + { + return _container.Bind>(_identifier).ToTransient(); + } + + public BindingConditionSetter ToCustomFactory() + where TFactory : IFactory + where TConcrete : TContract + { + return _container.Bind>(_identifier) + .ToMethod(c => new FactoryNested(c.Container.Instantiate())); + } + +#if !ZEN_NOT_UNITY3D + + public BindingConditionSetter ToPrefab(GameObject prefab) + { + Assert.That(typeof(TContract).DerivesFrom()); + + if (prefab == null) + { + throw new ZenjectBindException( + "Null prefab provided to BindIFactory<{0}>().ToPrefab".Fmt(typeof(TContract).Name())); + } + + return _container.Bind>(_identifier) + .ToMethod((ctx) => ctx.Container.Instantiate>(prefab)); + } +#endif + } + + ////////////////////////////// One parameter ////////////////////////////// + [System.Diagnostics.DebuggerStepThrough] + public class IFactoryBinder + { + readonly DiContainer _container; + readonly string _identifier; + + public IFactoryBinder(DiContainer container, string identifier) + { + _container = container; + _identifier = identifier; + } + + public BindingConditionSetter ToMethod( + Func method) + { + return _container.Bind>(_identifier) + .ToMethod((ctx) => ctx.Container.Instantiate>(method)); + } + + public BindingConditionSetter ToFactory() + { + Assert.That(!typeof(TContract).IsAbstract); + return _container.Bind>(_identifier) + .ToTransient>(); + } + + public BindingConditionSetter ToFactory() + where TConcrete : TContract + { + return ToCustomFactory>(); + } + + // Note that we assume here that IFactory is bound somewhere else + public BindingConditionSetter ToIFactory() + where TConcrete : TContract + { + return _container.Bind>(_identifier) + .ToMethod(c => + new FactoryNested( + c.Container.Resolve>())); + } + + public BindingConditionSetter ToCustomFactory() + where TFactory : IFactory + { + return _container.Bind>(_identifier).ToTransient(); + } + + public BindingConditionSetter ToCustomFactory() + where TFactory : IFactory + where TConcrete : TContract + { + return _container.Bind>(_identifier) + .ToMethod(c => + new FactoryNested( + c.Container.Instantiate())); + } + +#if !ZEN_NOT_UNITY3D + + public BindingConditionSetter ToPrefab(GameObject prefab) + { + Assert.That(typeof(TContract).DerivesFrom()); + + if (prefab == null) + { + throw new ZenjectBindException( + "Null prefab provided to BindIFactory<{0}>().ToPrefab".Fmt(typeof(TContract).Name())); + } + + return _container.Bind>(_identifier) + .ToMethod((ctx) => ctx.Container.Instantiate>(prefab)); + } +#endif + } + + ////////////////////////////// Two parameters ////////////////////////////// + [System.Diagnostics.DebuggerStepThrough] + public class IFactoryBinder + { + readonly DiContainer _container; + readonly string _identifier; + + public IFactoryBinder(DiContainer container, string identifier) + { + _container = container; + _identifier = identifier; + } + + public BindingConditionSetter ToMethod( + Func method) + { + return _container.Bind>(_identifier) + .ToMethod((ctx) => ctx.Container.Instantiate>(method)); + } + + public BindingConditionSetter ToFactory() + { + Assert.That(!typeof(TContract).IsAbstract); + return _container.Bind>(_identifier) + .ToTransient>(); + } + + public BindingConditionSetter ToFactory() + where TConcrete : TContract + { + return ToCustomFactory>(); + } + + // Note that we assume here that IFactory is bound somewhere else + public BindingConditionSetter ToIFactory() + where TConcrete : TContract + { + return _container.Bind>(_identifier) + .ToMethod(c => + new FactoryNested( + c.Container.Resolve>())); + } + + public BindingConditionSetter ToCustomFactory() + where TFactory : IFactory + { + return _container.Bind>(_identifier).ToTransient(); + } + + public BindingConditionSetter ToCustomFactory() + where TFactory : IFactory + where TConcrete : TContract + { + return _container.Bind>(_identifier) + .ToMethod(c => + new FactoryNested( + c.Container.Instantiate())); + } + +#if !ZEN_NOT_UNITY3D + + public BindingConditionSetter ToPrefab(GameObject prefab) + { + Assert.That(typeof(TContract).DerivesFrom()); + + if (prefab == null) + { + throw new ZenjectBindException( + "Null prefab provided to BindIFactory<{0}>().ToPrefab".Fmt(typeof(TContract).Name())); + } + + return _container.Bind>(_identifier) + .ToMethod((ctx) => ctx.Container.Instantiate>(prefab)); + } +#endif + } + + ////////////////////////////// Three parameters ////////////////////////////// + [System.Diagnostics.DebuggerStepThrough] + public class IFactoryBinder + { + readonly DiContainer _container; + readonly string _identifier; + + public IFactoryBinder(DiContainer container, string identifier) + { + _container = container; + _identifier = identifier; + } + + public BindingConditionSetter ToMethod( + Func method) + { + return _container.Bind>(_identifier) + .ToMethod((ctx) => ctx.Container.Instantiate>(method)); + } + + public BindingConditionSetter ToFactory() + { + Assert.That(!typeof(TContract).IsAbstract); + return _container.Bind>(_identifier) + .ToTransient>(); + } + + public BindingConditionSetter ToFactory() + where TConcrete : TContract + { + return ToCustomFactory>(); + } + + // Note that we assume here that IFactory is bound somewhere else + public BindingConditionSetter ToIFactory() + where TConcrete : TContract + { + return _container.Bind>(_identifier) + .ToMethod(c => + new FactoryNested( + c.Container.Resolve>())); + } + + public BindingConditionSetter ToCustomFactory() + where TFactory : IFactory + { + return _container.Bind>(_identifier).ToTransient(); + } + + public BindingConditionSetter ToCustomFactory() + where TFactory : IFactory + where TConcrete : TContract + { + return _container.Bind>(_identifier) + .ToMethod(c => + new FactoryNested( + c.Container.Instantiate())); + } + +#if !ZEN_NOT_UNITY3D + + public BindingConditionSetter ToPrefab(GameObject prefab) + { + Assert.That(typeof(TContract).DerivesFrom()); + + if (prefab == null) + { + throw new ZenjectBindException( + "Null prefab provided to BindIFactory<{0}>().ToPrefab".Fmt(typeof(TContract).Name())); + } + + return _container.Bind>(_identifier) + .ToMethod((ctx) => ctx.Container.Instantiate>(prefab)); + } +#endif + } + + + ////////////////////////////// Four parameters ////////////////////////////// + [System.Diagnostics.DebuggerStepThrough] + public class IFactoryBinder + { + readonly DiContainer _container; + readonly string _identifier; + + public IFactoryBinder(DiContainer container, string identifier) + { + _container = container; + _identifier = identifier; + } + + public BindingConditionSetter ToMethod( + ModestTree.Util.Func method) + { + return _container.Bind>(_identifier) + .ToMethod((ctx) => ctx.Container.Instantiate>(method)); + } + + public BindingConditionSetter ToFactory() + { + Assert.That(!typeof(TContract).IsAbstract); + return _container.Bind>(_identifier) + .ToTransient>(); + } + + public BindingConditionSetter ToFactory() + where TConcrete : TContract + { + return ToCustomFactory>(); + } + + // Note that we assume here that IFactory is bound somewhere else + public BindingConditionSetter ToIFactory() + where TConcrete : TContract + { + return _container.Bind>(_identifier) + .ToMethod(c => + new FactoryNested( + c.Container.Resolve>())); + } + + public BindingConditionSetter ToCustomFactory() + where TFactory : IFactory + { + return _container.Bind>(_identifier).ToTransient(); + } + + public BindingConditionSetter ToCustomFactory() + where TFactory : IFactory + where TConcrete : TContract + { + return _container.Bind>(_identifier) + .ToMethod(c => + new FactoryNested( + c.Container.Instantiate())); + } + +#if !ZEN_NOT_UNITY3D + + public BindingConditionSetter ToPrefab(GameObject prefab) + { + Assert.That(typeof(TContract).DerivesFrom()); + + if (prefab == null) + { + throw new ZenjectBindException( + "Null prefab provided to BindIFactory<{0}>().ToPrefab".Fmt(typeof(TContract).Name())); + } + + return _container.Bind>(_identifier) + .ToMethod((ctx) => ctx.Container.Instantiate>(prefab)); + } +#endif + } +} + diff --git a/UnityProject/Assets/Zenject/Source/Binders/IFactoryBinder.cs.meta b/UnityProject/Assets/Zenject/Source/Binders/IFactoryBinder.cs.meta new file mode 100644 index 000000000..ec266d052 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/IFactoryBinder.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b4160fa04f803ed478328f7f14f547c7 +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Binders/IFactoryUntypedBinder.cs b/UnityProject/Assets/Zenject/Source/Binders/IFactoryUntypedBinder.cs new file mode 100644 index 000000000..09930c6bc --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/IFactoryUntypedBinder.cs @@ -0,0 +1,55 @@ +using System; +using ModestTree; +using ModestTree.Util; + +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class IFactoryUntypedBinder + { + readonly DiContainer _container; + readonly string _identifier; + + public IFactoryUntypedBinder(DiContainer container, string identifier) + { + _container = container; + _identifier = identifier; + } + + public BindingConditionSetter ToInstance(TContract instance) + { + return ToMethod((c, args) => instance); + } + + public BindingConditionSetter ToMethod( + Func method) + { + return _container.Bind>() + .ToMethod(c => new FactoryMethodUntyped(c.Container, method)); + } + + public BindingConditionSetter ToCustomFactory() + where TFactory : IFactoryUntyped + { + return _container.Bind>(_identifier) + .ToTransient(); + } + + public BindingConditionSetter ToFactory() + { + return _container.Bind>() + .ToSingle>(); + } + + public BindingConditionSetter ToFactory() + where TConcrete : TContract + { + return _container.Bind>() + .ToSingle>(); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Binders/IFactoryUntypedBinder.cs.meta b/UnityProject/Assets/Zenject/Source/Binders/IFactoryUntypedBinder.cs.meta new file mode 100644 index 000000000..c08f6600d --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/IFactoryUntypedBinder.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a233db33c08b1434985701a88f4383a4 +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Binders/InjectContext.cs b/UnityProject/Assets/Zenject/Source/Binders/InjectContext.cs new file mode 100644 index 000000000..401bb852a --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/InjectContext.cs @@ -0,0 +1,201 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ModestTree; + +namespace Zenject +{ + public class InjectContext + { + // The type of the object which is having its members injected + // NOTE: This is null for root calls to Resolve<> or Instantiate<> + public readonly Type ObjectType; + + // Parent context that triggered the creation of ObjectType + // This can be used for very complex conditions using parent info such as identifiers, types, etc. + // Note that ParentContext.MemberType is not necessarily the same as ObjectType, + // since the ObjectType could be a derived type from ParentContext.MemberType + public readonly InjectContext ParentContext; + + // The instance which is having its members injected + // Note that this is null when injecting into the constructor + public readonly object ObjectInstance; + + // Identifier - most of the time this is null + // It will match 'foo' in this example: + // ... In an installer somewhere: + // Container.Bind("foo").ToSingle(); + // ... + // ... In a constructor: + // public Foo([Inject("foo") Foo foo) + public readonly string Identifier; + + // ConcreteIdentifier - most of the time this is null + // It will match 'foo' in this example: + // ... In an installer somewhere: + // Container.Bind().ToSingle("foo"); + // Container.Bind().ToSingle("foo"); + // ... + // This allows you to create When() conditionals like this: + // ... + // Container.BindInstance("some text").When(c => c.ConcreteIdentifier == "foo"); + public readonly string ConcreteIdentifier; + + // The constructor parameter name, or field name, or property name + public readonly string MemberName; + + // The type of the constructor parameter, field or property + public readonly Type MemberType; + + // When optional, null is a valid value to be returned + public readonly bool Optional; + + // When set to true, this will only look up dependencies in the local container and will not + // search in parent containers + public readonly bool LocalOnly; + + // When optional, this is used to provide the value + public readonly object FallBackValue; + + // The container used for this injection + public readonly DiContainer Container; + + // Convenience member for use in DiContainer + internal readonly BindingId BindingId; + + public InjectContext( + DiContainer container, Type memberType, string identifier, bool optional, + Type objectType, object objectInstance, string memberName, + InjectContext parentContext, string concreteIdentifier, + object fallBackValue, bool localOnly) + { + ObjectType = objectType; + ObjectInstance = objectInstance; + Identifier = identifier; + ConcreteIdentifier = concreteIdentifier; + MemberName = memberName; + MemberType = memberType; + Optional = optional; + FallBackValue = fallBackValue; + Container = container; + BindingId = new BindingId(memberType, identifier); + ParentContext = parentContext; + LocalOnly = localOnly; + } + + public InjectContext( + DiContainer container, Type memberType, string identifier, bool optional, + Type objectType, object objectInstance, string memberName, InjectContext parentContext) + : this(container, memberType, identifier, optional, objectType, objectInstance, memberName, parentContext, null, null, false) + { + } + + public InjectContext( + DiContainer container, Type memberType, string identifier, bool optional, Type objectType, object objectInstance) + : this(container, memberType, identifier, optional, objectType, objectInstance, "", null) + { + } + + public InjectContext( + DiContainer container, Type memberType, string identifier, bool optional) + : this(container, memberType, identifier, optional, null, null) + { + } + + public InjectContext( + DiContainer container, Type memberType, string identifier) + : this(container, memberType, identifier, false) + { + } + + public InjectContext( + DiContainer container, Type memberType) + : this(container, memberType, null, false) + { + } + + public IEnumerable ParentContexts + { + get + { + if (ParentContext == null) + { + yield break; + } + + yield return ParentContext; + + foreach (var context in ParentContext.ParentContexts) + { + yield return context; + } + } + } + + public IEnumerable ParentContextsAndSelf + { + get + { + yield return this; + + foreach (var context in ParentContexts) + { + yield return context; + } + } + } + + // This will return the types of all the objects that are being injected + // So if you have class Foo which has constructor parameter of type IBar, + // and IBar resolves to Bar, this will be equal to (Bar, Foo) + public IEnumerable AllObjectTypes + { + get + { + foreach (var context in ParentContextsAndSelf) + { + if (context.ObjectType != null) + { + yield return context.ObjectType; + } + } + } + } + + public string GetObjectGraphString() + { + var result = new StringBuilder(); + + foreach (var context in ParentContextsAndSelf.Reverse()) + { + if (context.ObjectType == null) + { + continue; + } + + result.AppendLine(context.ObjectType.Name()); + } + + return result.ToString(); + } + + public InjectContext ChangeObjectInstance(object instance) + { + return new InjectContext( + Container, MemberType, Identifier, Optional, ObjectType, instance, MemberName, ParentContext, ConcreteIdentifier, FallBackValue, LocalOnly); + } + + public InjectContext ChangeMemberType(Type newMemberType) + { + return new InjectContext( + Container, newMemberType, Identifier, Optional, ObjectType, ObjectInstance, MemberName, ParentContext, ConcreteIdentifier, FallBackValue, LocalOnly); + } + + public InjectContext ChangeConcreteIdentifier(string concreteIdentifier) + { + return new InjectContext( + Container, MemberType, Identifier, Optional, ObjectType, ObjectInstance, MemberName, ParentContext, concreteIdentifier, FallBackValue, LocalOnly); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Binders/InjectContext.cs.meta b/UnityProject/Assets/Zenject/Source/Binders/InjectContext.cs.meta new file mode 100644 index 000000000..539c31198 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/InjectContext.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 281173b50245d9e45a9de3df0dd8f309 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Binders/TypeBinder.cs b/UnityProject/Assets/Zenject/Source/Binders/TypeBinder.cs new file mode 100644 index 000000000..619feef2d --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/TypeBinder.cs @@ -0,0 +1,342 @@ +using System; +using ModestTree; +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + public abstract class TypeBinder : BinderBase + { + readonly SingletonProviderMap _singletonMap; + + public TypeBinder( + DiContainer container, + Type contractType, + string bindIdentifier, + SingletonProviderMap singletonMap) + : base(container, contractType, bindIdentifier) + { + _singletonMap = singletonMap; + } + + public BindingConditionSetter ToTransient() + { +#if !ZEN_NOT_UNITY3D + if (ContractType.DerivesFrom(typeof(Component))) + { + throw new ZenjectBindException( + "Should not use ToTransient for Monobehaviours (when binding type '{0}'), you probably want either ToLookup or ToTransientFromPrefab" + .Fmt(ContractType.Name())); + } +#endif + + return ToProvider(new TransientProvider(ContractType)); + } + + public BindingConditionSetter ToTransient(Type concreteType) + { +#if !ZEN_NOT_UNITY3D + if (concreteType.DerivesFrom(typeof(Component))) + { + throw new ZenjectBindException( + "Should not use ToTransient for Monobehaviours (when binding type '{0}'), you probably want either ToLookup or ToTransientFromPrefab" + .Fmt(concreteType.Name())); + } +#endif + + return ToProvider(new TransientProvider(concreteType)); + } + + public BindingConditionSetter ToSingle() + { + return ToSingle((string)null); + } + + public BindingConditionSetter ToSingle(string concreteIdentifier) + { +#if !ZEN_NOT_UNITY3D + if (ContractType.DerivesFrom(typeof(Component))) + { + throw new ZenjectBindException( + "Should not use ToSingle for Monobehaviours (when binding type '{0}'), you probably want either ToLookup or ToSinglePrefab or ToSingleGameObject" + .Fmt(ContractType.Name())); + } +#endif + + return ToProvider(_singletonMap.CreateProviderFromType(concreteIdentifier, ContractType)); + } + + public BindingConditionSetter ToSingle(Type concreteType) + { + return ToSingle(null, concreteType); + } + + public BindingConditionSetter ToSingle(string concreteIdentifier, Type concreteType) + { + if (!concreteType.DerivesFromOrEqual(ContractType)) + { + throw new ZenjectBindException( + "Invalid type given during bind command. Expected type '{0}' to derive from type '{1}'".Fmt(concreteType.Name(), ContractType.Name())); + } + + return ToProvider(_singletonMap.CreateProviderFromType(concreteIdentifier, concreteType)); + } + + public BindingConditionSetter ToSingle(Type concreteType, string concreteIdentifier) + { + if (!concreteType.DerivesFromOrEqual(ContractType)) + { + throw new ZenjectBindException( + "Invalid type given during bind command. Expected type '{0}' to derive from type '{1}'".Fmt(concreteType.Name(), ContractType.Name())); + } + +#if !ZEN_NOT_UNITY3D + if (concreteType.DerivesFrom(typeof(Component))) + { + throw new ZenjectBindException( + "Should not use ToSingle for Monobehaviours (when binding type '{0}' to '{1}'), you probably want either ToLookup or ToSinglePrefab or ToSinglePrefabResource or ToSingleGameObject" + .Fmt(ContractType.Name(), concreteType.Name())); + } +#endif + + return ToProvider(_singletonMap.CreateProviderFromType(concreteIdentifier, concreteType)); + } + +#if !ZEN_NOT_UNITY3D + + // Note that concreteType here could be an interface as well + public BindingConditionSetter ToSinglePrefab( + Type concreteType, string concreteIdentifier, GameObject prefab) + { + if (!concreteType.DerivesFromOrEqual(ContractType)) + { + throw new ZenjectBindException( + "Invalid type given during bind command. Expected type '{0}' to derive from type '{1}'".Fmt(concreteType.Name(), ContractType.Name())); + } + + if (ZenUtil.IsNull(prefab)) + { + throw new ZenjectBindException( + "Received null prefab while binding type '{0}'".Fmt(concreteType.Name())); + } + + var prefabSingletonMap = Container.Resolve(); + return ToProvider( + prefabSingletonMap.CreateProvider(concreteIdentifier, concreteType, prefab, null)); + } + + public BindingConditionSetter ToTransientPrefab(Type concreteType, GameObject prefab) + { + if (!concreteType.DerivesFromOrEqual(ContractType)) + { + throw new ZenjectBindException( + "Invalid type given during bind command. Expected type '{0}' to derive from type '{1}'".Fmt(concreteType.Name(), ContractType.Name())); + } + + // We have to cast to object otherwise we get SecurityExceptions when this function is run outside of unity + if (ZenUtil.IsNull(prefab)) + { + throw new ZenjectBindException("Received null prefab while binding type '{0}'".Fmt(concreteType.Name())); + } + + return ToProvider(new GameObjectTransientProviderFromPrefab(concreteType, prefab)); + } + + public BindingConditionSetter ToSingleGameObject() + { + return ToSingleGameObject(ContractType.Name()); + } + + // Creates a new game object and adds the given type as a new component on it + // NOTE! The string given here is just a name and not a singleton identifier + public BindingConditionSetter ToSingleGameObject(string name) + { + if (!ContractType.IsSubclassOf(typeof(Component))) + { + throw new ZenjectBindException("Expected UnityEngine.Component derived type when binding type '{0}'".Fmt(ContractType.Name())); + } + + return ToProvider(new GameObjectSingletonProvider(ContractType, Container, name)); + } + + // Creates a new game object and adds the given type as a new component on it + // NOTE! The string given here is just a name and not a singleton identifier + public BindingConditionSetter ToSingleGameObject(Type concreteType, string name) + { + if (!concreteType.DerivesFromOrEqual(ContractType)) + { + throw new ZenjectBindException( + "Invalid type given during bind command. Expected type '{0}' to derive from type '{1}'".Fmt(concreteType.Name(), ContractType.Name())); + } + + return ToProvider(new GameObjectSingletonProvider(concreteType, Container, name)); + } + + public BindingConditionSetter ToTransientPrefabResource(string resourcePath) + { + return ToTransientPrefabResource(ContractType, resourcePath); + } + + public BindingConditionSetter ToTransientPrefabResource(Type concreteType, string resourcePath) + { + Assert.IsNotNull(resourcePath); + return ToProvider(new GameObjectTransientProviderFromPrefabResource(concreteType, resourcePath)); + } + + public BindingConditionSetter ToSinglePrefabResource(Type concreteType, string concreteIdentifier, string resourcePath) + { + Assert.That(concreteType.DerivesFromOrEqual(ContractType)); + Assert.IsNotNull(resourcePath); + + var prefabSingletonMap = Container.Resolve(); + return ToProvider( + prefabSingletonMap.CreateProvider(concreteIdentifier, concreteType, null, resourcePath)); + } + + public BindingConditionSetter ToSinglePrefabResource(string resourcePath) + { + return ToSinglePrefabResource(null, resourcePath); + } + + public BindingConditionSetter ToSinglePrefabResource(string identifier, string resourcePath) + { + return ToSinglePrefabResource(ContractType, identifier, resourcePath); + } + + public BindingConditionSetter ToTransientPrefab(GameObject prefab) + { + return ToTransientPrefab(ContractType, prefab); + } + + public BindingConditionSetter ToSinglePrefab(GameObject prefab) + { + return ToSinglePrefab(null, prefab); + } + + public BindingConditionSetter ToSinglePrefab(string identifier, GameObject prefab) + { + return ToSinglePrefab(ContractType, identifier, prefab); + } + +#endif + protected BindingConditionSetter ToSingleMethodBase(string concreteIdentifier, Func method) + { + return ToProvider(_singletonMap.CreateProviderFromMethod(concreteIdentifier, method)); + } + + protected BindingConditionSetter ToSingleFactoryBase(string concreteIdentifier) + where TFactory : IFactory + { + return ToProvider(_singletonMap.CreateProviderFromFactory(concreteIdentifier)); + } + + protected BindingConditionSetter ToMethodBase(Func method) + { + if (!typeof(T).DerivesFromOrEqual(ContractType)) + { + throw new ZenjectBindException( + "Invalid type given during bind command. Expected type '{0}' to derive from type '{1}'".Fmt(typeof(T), ContractType.Name())); + } + + return ToProvider(new MethodProvider(method)); + } + + protected BindingConditionSetter ToLookupBase(string identifier) + { + return ToMethodBase((ctx) => ctx.Container.Resolve( + new InjectContext( + ctx.Container, typeof(TConcrete), identifier, + false, ctx.ObjectType, ctx.ObjectInstance, ctx.MemberName, ctx, null, ctx.FallBackValue, ctx.LocalOnly))); + } + + protected BindingConditionSetter ToGetterBase(string identifier, Func method) + { + return ToMethodBase((ctx) => method(ctx.Container.Resolve( + new InjectContext( + ctx.Container, typeof(TObj), identifier, + false, ctx.ObjectType, ctx.ObjectInstance, ctx.MemberName, ctx, null, ctx.FallBackValue, ctx.LocalOnly)))); + } + + public BindingConditionSetter ToInstance(Type concreteType, object instance) + { + if (ZenUtil.IsNull(instance) && !Container.IsValidating) + { + string message; + + if (ContractType == concreteType) + { + message = "Received null instance during Bind command with type '{0}'".Fmt(ContractType.Name()); + } + else + { + message = + "Received null instance during Bind command when binding type '{0}' to '{1}'".Fmt(ContractType.Name(), concreteType.Name()); + } + + throw new ZenjectBindException(message); + } + + if (!ZenUtil.IsNull(instance) && !instance.GetType().DerivesFromOrEqual(ContractType)) + { + throw new ZenjectBindException( + "Invalid type given during bind command. Expected type '{0}' to derive from type '{1}'".Fmt(concreteType.Name(), ContractType.Name())); + } + + return ToProvider(new InstanceProvider(concreteType, instance)); + } + + protected BindingConditionSetter ToSingleInstance(Type concreteType, string concreteIdentifier, object instance) + { + if (!concreteType.DerivesFromOrEqual(ContractType)) + { + throw new ZenjectBindException( + "Invalid type given during bind command. Expected type '{0}' to derive from type '{1}'".Fmt(concreteType.Name(), ContractType.Name())); + } + + if (ZenUtil.IsNull(instance) && !Container.IsValidating) + { + string message; + + if (ContractType == concreteType) + { + message = "Received null singleton instance during Bind command with type '{0}'".Fmt(ContractType.Name()); + } + else + { + message = + "Received null singleton instance during Bind command when binding type '{0}' to '{1}'".Fmt(ContractType.Name(), concreteType.Name()); + } + + throw new ZenjectBindException(message); + } + + return ToProvider(_singletonMap.CreateProviderFromInstance(concreteIdentifier, concreteType, instance)); + } + +#if !ZEN_NOT_UNITY3D + + protected BindingConditionSetter ToSingleMonoBehaviourBase(GameObject gameObject) + { + return ToProvider(new MonoBehaviourSingletonProvider(typeof(TConcrete), Container, gameObject)); + } + + public BindingConditionSetter ToResource(string resourcePath) + { + return ToResource(ContractType, resourcePath); + } + + public BindingConditionSetter ToResource(Type concreteType, string resourcePath) + { + if (!concreteType.DerivesFromOrEqual(ContractType)) + { + throw new ZenjectBindException( + "Invalid type given during bind command. Expected type '{0}' to derive from type '{1}'".Fmt(concreteType.Name(), ContractType.Name())); + } + + return ToProvider(new ResourceProvider(concreteType, resourcePath)); + } +#endif + } +} + diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBaseClassPropertyInjection.cs.meta b/UnityProject/Assets/Zenject/Source/Binders/TypeBinder.cs.meta similarity index 85% rename from UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBaseClassPropertyInjection.cs.meta rename to UnityProject/Assets/Zenject/Source/Binders/TypeBinder.cs.meta index 3b196b60a..9b8ad1d74 100644 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBaseClassPropertyInjection.cs.meta +++ b/UnityProject/Assets/Zenject/Source/Binders/TypeBinder.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 50369986b09e87b42a3c3fbc427e09fa +guid: 05e9e351ae2ef914f877e0c6ec1680bf timeCreated: 1450369687 licenseType: Pro MonoImporter: diff --git a/UnityProject/Assets/Zenject/Source/Binders/UntypedBinder.cs b/UnityProject/Assets/Zenject/Source/Binders/UntypedBinder.cs new file mode 100644 index 000000000..847bd6b7e --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Binders/UntypedBinder.cs @@ -0,0 +1,148 @@ +using System; +using ModestTree; +using ModestTree.Util; +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + public class UntypedBinder : TypeBinder + { + public UntypedBinder( + DiContainer container, Type contractType, + string identifier, SingletonProviderMap singletonMap) + : base(container, contractType, identifier, singletonMap) + { + } + + public BindingConditionSetter ToLookup() + { + return ToLookupBase(null); + } + + public BindingConditionSetter ToLookup(string identifier) + { + return ToLookupBase(identifier); + } + + public BindingConditionSetter ToMethod(Type returnType, Func method) + { + if (!returnType.DerivesFromOrEqual(ContractType)) + { + throw new ZenjectBindException( + "Invalid type given during bind command. Expected type '{0}' to derive from type '{1}'".Fmt(returnType, ContractType.Name())); + } + + return ToProvider(new MethodProviderUntyped(returnType, method)); + } + + public BindingConditionSetter ToMethod(Func method) + { + return ToMethodBase(method); + } + + public BindingConditionSetter ToGetter(Func method) + { + return ToGetterBase(null, method); + } + + public BindingConditionSetter ToGetter(string identifier, Func method) + { + return ToGetterBase(identifier, method); + } + + public BindingConditionSetter ToTransient() + { + return ToTransient(typeof(TConcrete)); + } + + public BindingConditionSetter ToSingle(string concreteIdentifier) + { + return ToSingle(typeof(TConcrete), concreteIdentifier); + } + + public BindingConditionSetter ToInstance(TConcrete instance) + { + return ToInstance(typeof(TConcrete), instance); + } + + public BindingConditionSetter ToSingleInstance(TConcrete instance) + { + return ToSingleInstance(typeof(TConcrete), null, instance); + } + + public BindingConditionSetter ToSingleInstance(string concreteIdentifier, TConcrete instance) + { + return ToSingleInstance(typeof(TConcrete), concreteIdentifier, instance); + } + + public BindingConditionSetter ToSingleMethod(string concreteIdentifier, Func method) + { + return ToSingleMethodBase(concreteIdentifier, method); + } + + public BindingConditionSetter ToSingleMethod(Func method) + { + return ToSingleMethodBase(null, method); + } + + public BindingConditionSetter ToSingle() + { + return ToSingle(typeof(TConcrete), null); + } + +#if !ZEN_NOT_UNITY3D + + public BindingConditionSetter ToResource(string resourcePath) + { + return ToResource(typeof(TConcrete), resourcePath); + } + + // Note: Here we assume that the contract is a component on the given prefab + public BindingConditionSetter ToTransientPrefabResource(string resourcePath) + { + return ToTransientPrefabResource(typeof(TConcrete), resourcePath); + } + + // Note: Here we assume that the contract is a component on the given prefab + public BindingConditionSetter ToTransientPrefab(GameObject prefab) + { + return ToTransientPrefab(typeof(TConcrete), prefab); + } + + // Creates a new game object and adds the given type as a new component on it + // NOTE! The string given here is just a name and not a singleton identifier + public BindingConditionSetter ToSingleGameObject(string name) + where TConcrete : Component + { + return ToSingleGameObject(typeof(TConcrete), name); + } + + public BindingConditionSetter ToSingleMonoBehaviour(GameObject gameObject) + { + return ToSingleMonoBehaviourBase(gameObject); + } + + public BindingConditionSetter ToSinglePrefab(GameObject prefab) + { + return ToSinglePrefab(typeof(TConcrete), null, prefab); + } + + public BindingConditionSetter ToSinglePrefab(string identifier, GameObject prefab) + { + return ToSinglePrefab(typeof(TConcrete), identifier, prefab); + } + + public BindingConditionSetter ToSinglePrefabResource(string resourcePath) + { + return ToSinglePrefabResource(typeof(TConcrete), null, resourcePath); + } + + public BindingConditionSetter ToSinglePrefabResource(string identifier, string resourcePath) + { + return ToSinglePrefabResource(typeof(TConcrete), identifier, resourcePath); + } +#endif + } +} diff --git a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBothInterfaceAndConcreteBoundToSameSingleton.cs.meta b/UnityProject/Assets/Zenject/Source/Binders/UntypedBinder.cs.meta similarity index 85% rename from UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBothInterfaceAndConcreteBoundToSameSingleton.cs.meta rename to UnityProject/Assets/Zenject/Source/Binders/UntypedBinder.cs.meta index 06a572243..7c7ab84cb 100644 --- a/UnityProject/Assets/Zenject/Extras/ZenjectUnitTests/Editor/TestBothInterfaceAndConcreteBoundToSameSingleton.cs.meta +++ b/UnityProject/Assets/Zenject/Source/Binders/UntypedBinder.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3f6571dba255500479e8525e745cbaf5 +guid: 5bb32807ee856f54cbe1b6b10920476e timeCreated: 1450369687 licenseType: Pro MonoImporter: diff --git a/UnityProject/Assets/Zenject/Source/Main/Exceptions.meta b/UnityProject/Assets/Zenject/Source/Exceptions.meta similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Exceptions.meta rename to UnityProject/Assets/Zenject/Source/Exceptions.meta diff --git a/UnityProject/Assets/Zenject/Source/Exceptions/ZenjectException.cs b/UnityProject/Assets/Zenject/Source/Exceptions/ZenjectException.cs new file mode 100644 index 000000000..f544fc9cb --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Exceptions/ZenjectException.cs @@ -0,0 +1,49 @@ +using System; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class ZenjectException : Exception + { + public ZenjectException(string message) + : base(message) + { + } + + public ZenjectException( + string message, Exception innerException) + : base(message, innerException) + { + } + } + + [System.Diagnostics.DebuggerStepThrough] + public class ZenjectResolveException : ZenjectException + { + public ZenjectResolveException(string message) + : base(message) + { + } + + public ZenjectResolveException( + string message, Exception innerException) + : base(message, innerException) + { + } + } + + [System.Diagnostics.DebuggerStepThrough] + public class ZenjectBindException : ZenjectException + { + public ZenjectBindException(string message) + : base(message) + { + } + + public ZenjectBindException(string message, Exception innerException) + : base(message, innerException) + { + } + } +} + diff --git a/UnityProject/Assets/Zenject/Source/Exceptions/ZenjectException.cs.meta b/UnityProject/Assets/Zenject/Source/Exceptions/ZenjectException.cs.meta new file mode 100644 index 000000000..c1391c425 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Exceptions/ZenjectException.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7b88723a771892a4f8b5df36a04566a4 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/Facade.meta b/UnityProject/Assets/Zenject/Source/Facade.meta similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Facade.meta rename to UnityProject/Assets/Zenject/Source/Facade.meta diff --git a/UnityProject/Assets/Zenject/Source/Facade/Facade.cs b/UnityProject/Assets/Zenject/Source/Facade/Facade.cs new file mode 100644 index 000000000..032d487ff --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Facade/Facade.cs @@ -0,0 +1,73 @@ +using System.Collections.Generic; +using ModestTree; +using ModestTree.Util; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class Facade : IFacade + { + [Inject] + TickableManager _tickableManager = null; + + [Inject] + InitializableManager _initializableManager = null; + + [Inject] + DisposableManager _disposablesManager = null; + + // For cases where you have objects that aren't referenced anywhere but still want them to be + // created on startup + [InjectLocalOptional] + public List _initialObjects = null; + + public TickableManager TickableManager + { + get + { + return _tickableManager; + } + } + + public InitializableManager InitializableManager + { + get + { + return _initializableManager; + } + } + + public DisposableManager DisposableManager + { + get + { + return _disposablesManager; + } + } + + public virtual void Initialize() + { + _initializableManager.Initialize(); + } + + public virtual void Dispose() + { + _disposablesManager.Dispose(); + } + + public virtual void Tick() + { + _tickableManager.Update(); + } + + public virtual void LateTick() + { + _tickableManager.LateUpdate(); + } + + public virtual void FixedTick() + { + _tickableManager.FixedUpdate(); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Facade/Facade.cs.meta b/UnityProject/Assets/Zenject/Source/Facade/Facade.cs.meta new file mode 100644 index 000000000..32684137a --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Facade/Facade.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8ff7cc0a112060e4f928b8b730bc6ccc +timeCreated: 1450369687 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Facade/FacadeBinder.cs b/UnityProject/Assets/Zenject/Source/Facade/FacadeBinder.cs new file mode 100644 index 000000000..3642a8673 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Facade/FacadeBinder.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; + +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + public class FacadeBinder + where TFacade : IFacade + { + readonly Action _installerFunc; + readonly DiContainer _container; + readonly string _identifier; + + public FacadeBinder( + DiContainer container, + string identifier, + Action installerFunc) + { + _identifier = identifier; + _container = container; + _installerFunc = installerFunc; + } + + public void ToSingle() + { + AddValidator(); + _container.Bind().ToLookup(_identifier); + _container.Bind().ToLookup(_identifier); + _container.Bind().ToLookup(_identifier); + _container.Bind().ToLookup(_identifier); + _container.Bind().ToLookup(_identifier); + _container.Bind(_identifier).ToSingleMethod(CreateFacade); + } + + void AddValidator() + { +#if !ZEN_NOT_UNITY3D + if (!Application.isPlaying) +#endif + { + // Unlike with facade factories, we don't really have something to be IValidatable + // so we have to add a separate object for this in this case + _container.Bind().ToInstance(new Validator(_container, _installerFunc)); + } + } + + TFacade CreateFacade(InjectContext ctx) + { + return FacadeFactory.CreateSubContainer(_container, _installerFunc) + .Resolve(); + } + + class Validator : IValidatable + { + readonly DiContainer _container; + readonly Action _installerFunc; + + public Validator(DiContainer container, Action installerFunc) + { + _container = container; + _installerFunc = installerFunc; + } + + public IEnumerable Validate() + { + return FacadeFactory.Validate(_container, _installerFunc); + } + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Facade/FacadeBinder.cs.meta b/UnityProject/Assets/Zenject/Source/Facade/FacadeBinder.cs.meta new file mode 100644 index 000000000..4a2163be3 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Facade/FacadeBinder.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 48f81ecdb6383f24b9a30ea3538cc7e9 +timeCreated: 1450369687 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Facade/FacadeFactory.cs b/UnityProject/Assets/Zenject/Source/Facade/FacadeFactory.cs new file mode 100644 index 000000000..fec534cac --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Facade/FacadeFactory.cs @@ -0,0 +1,352 @@ +using System; +using System.Collections.Generic; +using ModestTree; +using ModestTree.Util; + +namespace Zenject +{ + public abstract class FacadeFactory : IValidatable + where TFacade : IFacade + { + [Inject] + DiContainer _container = null; + + [Inject] + Action _containerInitializer = null; + + public TFacade Create() + { + var facade = CreateSubContainer(_container, _containerInitializer).Resolve(); + facade.Initialize(); + return facade; + } + + // Made static for use by FacadeBinder + public static DiContainer CreateSubContainer( + DiContainer parentContainer, Action containerInitializer) + { + Assert.IsNotNull(containerInitializer); + var subContainer = parentContainer.CreateSubContainer(); + subContainer.IsValidating = parentContainer.IsValidating; + containerInitializer(subContainer); + subContainer.Install>(); + return subContainer; + } + + // Made static for use by FacadeBinder + public static IEnumerable Validate( + DiContainer parentContainer, Action containerInitializer) + { + var subContainer = CreateSubContainer(parentContainer, containerInitializer); + + foreach (var error in subContainer.ValidateResolve()) + { + yield return error; + } + + foreach (var error in subContainer.ValidateValidatables()) + { + yield return error; + } + } + + IEnumerable IValidatable.Validate() + { + return Validate(_container, _containerInitializer); + } + } + + public abstract class FacadeFactory : IValidatable + where TFacade : IFacade + { + [Inject] + DiContainer _container = null; + + [Inject] + Action _containerInitializer = null; + + public TFacade Create(TParam1 param1) + { + var facade = CreateSubContainer(param1).Resolve(); + facade.Initialize(); + return facade; + } + + DiContainer CreateSubContainer(TParam1 param1) + { + Assert.IsNotNull(_containerInitializer); + var subContainer = _container.CreateSubContainer(); + subContainer.IsValidating = _container.IsValidating; + _containerInitializer(subContainer, param1); + subContainer.Install>(); + return subContainer; + } + + IEnumerable IValidatable.Validate() + { + var subContainer = CreateSubContainer(default(TParam1)); + + foreach (var error in subContainer.ValidateResolve()) + { + yield return error; + } + + foreach (var error in subContainer.ValidateValidatables()) + { + yield return error; + } + } + } + + public abstract class FacadeFactory : IValidatable + where TFacade : IFacade + { + [Inject] + DiContainer _container = null; + + [Inject] + Action _containerInitializer = null; + + public TFacade Create(TParam1 param1, TParam2 param2) + { + var facade = CreateSubContainer(param1, param2).Resolve(); + facade.Initialize(); + return facade; + } + + DiContainer CreateSubContainer(TParam1 param1, TParam2 param2) + { + Assert.IsNotNull(_containerInitializer); + var subContainer = _container.CreateSubContainer(); + subContainer.IsValidating = _container.IsValidating; + _containerInitializer(subContainer, param1, param2); + subContainer.Install>(); + return subContainer; + } + + IEnumerable IValidatable.Validate() + { + var subContainer = CreateSubContainer(default(TParam1), default(TParam2)); + + foreach (var error in subContainer.ValidateResolve()) + { + yield return error; + } + + foreach (var error in subContainer.ValidateValidatables()) + { + yield return error; + } + } + } + + public abstract class FacadeFactory : IValidatable + where TFacade : IFacade + { + [Inject] + DiContainer _container = null; + + [Inject] + Action _containerInitializer = null; + + public TFacade Create(TParam1 param1, TParam2 param2, TParam3 param3) + { + var facade = CreateSubContainer(param1, param2, param3).Resolve(); + facade.Initialize(); + return facade; + } + + DiContainer CreateSubContainer(TParam1 param1, TParam2 param2, TParam3 param3) + { + Assert.IsNotNull(_containerInitializer); + var subContainer = _container.CreateSubContainer(); + subContainer.IsValidating = _container.IsValidating; + _containerInitializer(subContainer, param1, param2, param3); + subContainer.Install>(); + return subContainer; + } + + IEnumerable IValidatable.Validate() + { + var subContainer = CreateSubContainer(default(TParam1), default(TParam2), default(TParam3)); + + foreach (var error in subContainer.ValidateResolve()) + { + yield return error; + } + + foreach (var error in subContainer.ValidateValidatables()) + { + yield return error; + } + } + } + + public abstract class FacadeFactory : IValidatable + where TFacade : IFacade + { + [Inject] + DiContainer _container = null; + + [Inject] + ModestTree.Util.Action _containerInitializer = null; + + public TFacade Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4) + { + var facade = CreateSubContainer(param1, param2, param3, param4).Resolve(); + facade.Initialize(); + return facade; + } + + DiContainer CreateSubContainer(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4) + { + Assert.IsNotNull(_containerInitializer); + var subContainer = _container.CreateSubContainer(); + subContainer.IsValidating = _container.IsValidating; + _containerInitializer(subContainer, param1, param2, param3, param4); + subContainer.Install>(); + return subContainer; + } + + IEnumerable IValidatable.Validate() + { + var subContainer = CreateSubContainer(default(TParam1), default(TParam2), default(TParam3), default(TParam4)); + + foreach (var error in subContainer.ValidateResolve()) + { + yield return error; + } + + foreach (var error in subContainer.ValidateValidatables()) + { + yield return error; + } + } + } + + public abstract class FacadeFactory : IValidatable + where TFacade : IFacade + { + [Inject] + DiContainer _container = null; + + [Inject] + ModestTree.Util.Action _containerInitializer = null; + + public TFacade Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5) + { + var facade = CreateSubContainer(param1, param2, param3, param4, param5).Resolve(); + facade.Initialize(); + return facade; + } + + DiContainer CreateSubContainer(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5) + { + Assert.IsNotNull(_containerInitializer); + var subContainer = _container.CreateSubContainer(); + subContainer.IsValidating = _container.IsValidating; + _containerInitializer(subContainer, param1, param2, param3, param4, param5); + subContainer.Install>(); + return subContainer; + } + + IEnumerable IValidatable.Validate() + { + var subContainer = CreateSubContainer(default(TParam1), default(TParam2), default(TParam3), default(TParam4), default(TParam5)); + + foreach (var error in subContainer.ValidateResolve()) + { + yield return error; + } + + foreach (var error in subContainer.ValidateValidatables()) + { + yield return error; + } + } + } + + public abstract class FacadeFactory : IValidatable + where TFacade : IFacade + { + [Inject] + DiContainer _container = null; + + [Inject] + ModestTree.Util.Action _containerInitializer = null; + + public TFacade Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6) + { + var facade = CreateSubContainer(param1, param2, param3, param4, param5, param6).Resolve(); + facade.Initialize(); + return facade; + } + + DiContainer CreateSubContainer(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6) + { + Assert.IsNotNull(_containerInitializer); + var subContainer = _container.CreateSubContainer(); + subContainer.IsValidating = _container.IsValidating; + _containerInitializer(subContainer, param1, param2, param3, param4, param5, param6); + subContainer.Install>(); + return subContainer; + } + + IEnumerable IValidatable.Validate() + { + var subContainer = CreateSubContainer(default(TParam1), default(TParam2), default(TParam3), default(TParam4), default(TParam5), default(TParam6)); + + foreach (var error in subContainer.ValidateResolve()) + { + yield return error; + } + + foreach (var error in subContainer.ValidateValidatables()) + { + yield return error; + } + } + } + + public abstract class FacadeFactory : IValidatable + where TFacade : IFacade + { + [Inject] + DiContainer _container = null; + + [Inject] + ModestTree.Util.Action _containerInitializer = null; + + public TFacade Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7) + { + var facade = CreateSubContainer(param1, param2, param3, param4, param5, param6, param7).Resolve(); + facade.Initialize(); + return facade; + } + + DiContainer CreateSubContainer(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7) + { + Assert.IsNotNull(_containerInitializer); + var subContainer = _container.CreateSubContainer(); + subContainer.IsValidating = _container.IsValidating; + _containerInitializer(subContainer, param1, param2, param3, param4, param5, param6, param7); + subContainer.Install>(); + return subContainer; + } + + IEnumerable IValidatable.Validate() + { + var subContainer = CreateSubContainer(default(TParam1), default(TParam2), default(TParam3), default(TParam4), default(TParam5), default(TParam6), default(TParam7)); + + foreach (var error in subContainer.ValidateResolve()) + { + yield return error; + } + + foreach (var error in subContainer.ValidateValidatables()) + { + yield return error; + } + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Facade/FacadeFactory.cs.meta b/UnityProject/Assets/Zenject/Source/Facade/FacadeFactory.cs.meta new file mode 100644 index 000000000..ff4bcc11f --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Facade/FacadeFactory.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8522e643e5ea2904a90c4db99adefdfc +timeCreated: 1450369687 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Facade/IFacade.cs b/UnityProject/Assets/Zenject/Source/Facade/IFacade.cs new file mode 100644 index 000000000..c2a3063f4 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Facade/IFacade.cs @@ -0,0 +1,9 @@ +using System; +using System.Collections.Generic; + +namespace Zenject +{ + public interface IFacade : IInitializable, IDisposable, ITickable, ILateTickable, IFixedTickable + { + } +} diff --git a/UnityProject/Assets/Zenject/Source/Facade/IFacade.cs.meta b/UnityProject/Assets/Zenject/Source/Facade/IFacade.cs.meta new file mode 100644 index 000000000..a5776a7be --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Facade/IFacade.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2f537c93697315b4aa108120a73aee1a +timeCreated: 1450369687 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/Factories.meta b/UnityProject/Assets/Zenject/Source/Factories.meta similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Factories.meta rename to UnityProject/Assets/Zenject/Source/Factories.meta diff --git a/UnityProject/Assets/Zenject/Source/Factories/Factory.cs b/UnityProject/Assets/Zenject/Source/Factories/Factory.cs new file mode 100644 index 000000000..adccd1ac8 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/Factory.cs @@ -0,0 +1,447 @@ +using System; +using System.Collections.Generic; + +namespace Zenject +{ + // Zero parameters + [System.Diagnostics.DebuggerStepThrough] + public class Factory : IValidatableFactory, IFactory + { + // Use inject rather than a constructor parameter so that + // derived classes aren't also forced to create a constructor + [Inject] + DiContainer _container = null; + + public Type ConstructedType + { + get { return typeof(T); } + } + + public Type[] ProvidedTypes + { + get { return new Type[0]; } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual T Create() + { + return _container.Instantiate(); + } + } + + // One parameter + [System.Diagnostics.DebuggerStepThrough] + public class Factory : IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1) }; } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual TValue Create(TParam1 param) + { + return _container.InstantiateExplicit( + new List() + { + InstantiateUtil.CreateTypePair(param), + }); + } + } + + // Two parameters + [System.Diagnostics.DebuggerStepThrough] + public class Factory : IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2) }; } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual TValue Create(TParam1 param1, TParam2 param2) + { + return _container.InstantiateExplicit( + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + }); + } + } + + // Three parameters + [System.Diagnostics.DebuggerStepThrough] + public class Factory : IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3) }; } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual TValue Create(TParam1 param1, TParam2 param2, TParam3 param3) + { + return _container.InstantiateExplicit( + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + InstantiateUtil.CreateTypePair(param3), + }); + } + } + + // Four parameters + [System.Diagnostics.DebuggerStepThrough] + public class Factory : + IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3), typeof(TParam4) }; } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual TValue Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4) + { + return _container.InstantiateExplicit( + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + InstantiateUtil.CreateTypePair(param3), + InstantiateUtil.CreateTypePair(param4), + }); + } + } + + // Five parameters + [System.Diagnostics.DebuggerStepThrough] + public class Factory : + IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3), typeof(TParam4), typeof(TParam5) }; } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual TValue Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5) + { + return _container.InstantiateExplicit( + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + InstantiateUtil.CreateTypePair(param3), + InstantiateUtil.CreateTypePair(param4), + InstantiateUtil.CreateTypePair(param5), + }); + } + } + + // Six parameters + [System.Diagnostics.DebuggerStepThrough] + public class Factory : + IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3), typeof(TParam4), typeof(TParam5), typeof(TParam6) }; } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual TValue Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6) + { + return _container.InstantiateExplicit( + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + InstantiateUtil.CreateTypePair(param3), + InstantiateUtil.CreateTypePair(param4), + InstantiateUtil.CreateTypePair(param5), + InstantiateUtil.CreateTypePair(param6), + }); + } + } + + // Seven parameters + [System.Diagnostics.DebuggerStepThrough] + public class Factory : + IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3), typeof(TParam4), typeof(TParam5), typeof(TParam6), typeof(TParam7) }; } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual TValue Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7) + { + return _container.InstantiateExplicit( + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + InstantiateUtil.CreateTypePair(param3), + InstantiateUtil.CreateTypePair(param4), + InstantiateUtil.CreateTypePair(param5), + InstantiateUtil.CreateTypePair(param6), + InstantiateUtil.CreateTypePair(param7), + }); + } + } + + // Eigth parameters + [System.Diagnostics.DebuggerStepThrough] + public class Factory : + IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3), typeof(TParam4), typeof(TParam5), typeof(TParam6), typeof(TParam7), typeof(TParam8) }; } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual TValue Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7, TParam8 param8) + { + return _container.InstantiateExplicit( + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + InstantiateUtil.CreateTypePair(param3), + InstantiateUtil.CreateTypePair(param4), + InstantiateUtil.CreateTypePair(param5), + InstantiateUtil.CreateTypePair(param6), + InstantiateUtil.CreateTypePair(param7), + InstantiateUtil.CreateTypePair(param8), + }); + } + } + + // Nine parameters + [System.Diagnostics.DebuggerStepThrough] + public class Factory : + IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3), typeof(TParam4), typeof(TParam5), typeof(TParam6), typeof(TParam7), typeof(TParam8), typeof(TParam9) }; } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual TValue Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7, TParam8 param8, TParam9 param9) + { + return _container.InstantiateExplicit( + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + InstantiateUtil.CreateTypePair(param3), + InstantiateUtil.CreateTypePair(param4), + InstantiateUtil.CreateTypePair(param5), + InstantiateUtil.CreateTypePair(param6), + InstantiateUtil.CreateTypePair(param7), + InstantiateUtil.CreateTypePair(param8), + InstantiateUtil.CreateTypePair(param9), + }); + } + } + + // Ten parameters + [System.Diagnostics.DebuggerStepThrough] + public class Factory : + IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3), typeof(TParam4), typeof(TParam5), typeof(TParam6), typeof(TParam7), typeof(TParam8), typeof(TParam9), typeof(TParam10) }; } + } + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual TValue Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7, TParam8 param8, TParam9 param9, TParam10 param10) + { + return _container.InstantiateExplicit( + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + InstantiateUtil.CreateTypePair(param3), + InstantiateUtil.CreateTypePair(param4), + InstantiateUtil.CreateTypePair(param5), + InstantiateUtil.CreateTypePair(param6), + InstantiateUtil.CreateTypePair(param7), + InstantiateUtil.CreateTypePair(param8), + InstantiateUtil.CreateTypePair(param9), + InstantiateUtil.CreateTypePair(param10), + }); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Factories/Factory.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/Factory.cs.meta new file mode 100644 index 000000000..9827e2808 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/Factory.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 624119ad083de104e8a5aa880cf2db5e +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/FactoryMethod.cs b/UnityProject/Assets/Zenject/Source/Factories/FactoryMethod.cs new file mode 100644 index 000000000..55259566a --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/FactoryMethod.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using ModestTree.Util; + +namespace Zenject +{ + // Zero parameters + [System.Diagnostics.DebuggerStepThrough] + public sealed class FactoryMethod : IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + [Inject] + readonly Func _method = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[0]; } + } + + public TValue Create() + { + return _method(_container); + } + } + + // One parameters + [System.Diagnostics.DebuggerStepThrough] + public sealed class FactoryMethod : IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + [Inject] + readonly Func _method = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1) }; } + } + + public TValue Create(TParam1 param) + { + return _method(_container, param); + } + } + + // Two parameters + [System.Diagnostics.DebuggerStepThrough] + public sealed class FactoryMethod : IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + [Inject] + readonly Func _method = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2) }; } + } + + public TValue Create(TParam1 param1, TParam2 param2) + { + return _method(_container, param1, param2); + } + } + + // Three parameters + [System.Diagnostics.DebuggerStepThrough] + public sealed class FactoryMethod : IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + [Inject] + readonly Func _method = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3) }; } + } + + public TValue Create(TParam1 param1, TParam2 param2, TParam3 param3) + { + return _method(_container, param1, param2, param3); + } + } + + // Three parameters + [System.Diagnostics.DebuggerStepThrough] + public sealed class FactoryMethod : IValidatableFactory, IFactory + { + [Inject] + DiContainer _container = null; + + [Inject] + readonly ModestTree.Util.Func _method = null; + + public Type ConstructedType + { + get { return typeof(TValue); } + } + + public Type[] ProvidedTypes + { + get { return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3), typeof(TParam4) }; } + } + + public TValue Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4) + { + return _method(_container, param1, param2, param3, param4); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Factories/FactoryMethod.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/FactoryMethod.cs.meta new file mode 100644 index 000000000..92b658db0 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/FactoryMethod.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6f064e193a27c57449fcc93111e00ba4 +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/FactoryMethodUntyped.cs b/UnityProject/Assets/Zenject/Source/Factories/FactoryMethodUntyped.cs new file mode 100644 index 000000000..257902a46 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/FactoryMethodUntyped.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace Zenject +{ + // Instantiate using a delegate + [System.Diagnostics.DebuggerStepThrough] + public class FactoryMethodUntyped : IFactoryUntyped + { + readonly DiContainer _container; + readonly Func _method; + + public FactoryMethodUntyped( + DiContainer container, Func method) + { + _container = container; + _method = method; + } + + public TContract Create(params object[] constructorArgs) + { + return _method(_container, constructorArgs); + } + + public IEnumerable Validate(params Type[] extras) + { + yield break; + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Factories/FactoryMethodUntyped.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/FactoryMethodUntyped.cs.meta new file mode 100644 index 000000000..b14e32015 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/FactoryMethodUntyped.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 296203dff91bb794ea73bfe32f96f7d0 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/FactoryNested.cs b/UnityProject/Assets/Zenject/Source/Factories/FactoryNested.cs new file mode 100644 index 000000000..278f4c172 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/FactoryNested.cs @@ -0,0 +1,223 @@ +using System; +using System.Collections.Generic; + +namespace Zenject +{ + // We don't bother implementing IValidatable here because it is assumed that the nested + // factory handles that for us + + // Zero parameters + [System.Diagnostics.DebuggerStepThrough] + public class FactoryNested : IFactory + where TConcrete : TContract + { + readonly IFactory _concreteFactory; + + public FactoryNested(IFactory concreteFactory) + { + _concreteFactory = concreteFactory; + } + + public virtual TContract Create() + { + return _concreteFactory.Create(); + } + } + + // One parameter + [System.Diagnostics.DebuggerStepThrough] + public class FactoryNested : IFactory + where TConcrete : TContract + { + readonly IFactory _concreteFactory; + + public FactoryNested(IFactory concreteFactory) + { + _concreteFactory = concreteFactory; + } + + public virtual TContract Create(TParam1 param) + { + return _concreteFactory.Create(param); + } + } + + // Two parameters + [System.Diagnostics.DebuggerStepThrough] + public class FactoryNested : IFactory + where TConcrete : TContract + { + readonly IFactory _concreteFactory; + + public FactoryNested(IFactory concreteFactory) + { + _concreteFactory = concreteFactory; + } + + + public virtual TContract Create(TParam1 param1, TParam2 param2) + { + return _concreteFactory.Create(param1, param2); + } + } + + // Three parameters + [System.Diagnostics.DebuggerStepThrough] + public class FactoryNested : IFactory + where TConcrete : TContract + { + readonly IFactory _concreteFactory; + + public FactoryNested(IFactory concreteFactory) + { + _concreteFactory = concreteFactory; + } + + public virtual TContract Create(TParam1 param1, TParam2 param2, TParam3 param3) + { + return _concreteFactory.Create(param1, param2, param3); + } + } + + // Four parameters + [System.Diagnostics.DebuggerStepThrough] + public class FactoryNested : + IFactory + where TConcrete : TContract + { + readonly IFactory _concreteFactory; + + public FactoryNested(IFactory concreteFactory) + { + _concreteFactory = concreteFactory; + } + + public virtual TContract Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4) + { + return _concreteFactory.Create(param1, param2, param3, param4); + } + } + + // Five parameters + [System.Diagnostics.DebuggerStepThrough] + public class FactoryNested : + IFactory + where TConcrete : TContract + { + readonly IFactory _concreteFactory; + + public FactoryNested(IFactory concreteFactory) + { + _concreteFactory = concreteFactory; + } + + public virtual TContract Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5) + { + return _concreteFactory.Create(param1, param2, param3, param4, param5); + } + } + + // Six parameters + [System.Diagnostics.DebuggerStepThrough] + public class FactoryNested : + IFactory + where TConcrete : TContract + { + readonly IFactory _concreteFactory; + + public FactoryNested(IFactory concreteFactory) + { + _concreteFactory = concreteFactory; + } + + public virtual TContract Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6) + { + return _concreteFactory.Create(param1, param2, param3, param4, param5, param6); + } + } + + // Seven parameters + [System.Diagnostics.DebuggerStepThrough] + public class FactoryNested : + IFactory + where TConcrete : TContract + { + readonly IFactory _concreteFactory; + + public FactoryNested(IFactory concreteFactory) + { + _concreteFactory = concreteFactory; + } + + public virtual TContract Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7) + { + return _concreteFactory.Create(param1, param2, param3, param4, param5, param6, param7); + } + } + + // Eigth parameters + [System.Diagnostics.DebuggerStepThrough] + public class FactoryNested : + IFactory + where TConcrete : TContract + { + readonly IFactory _concreteFactory; + + public FactoryNested(IFactory concreteFactory) + { + _concreteFactory = concreteFactory; + } + + public virtual TContract Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7, TParam8 param8) + { + return _concreteFactory.Create(param1, param2, param3, param4, param5, param6, param7, param8); + } + } + + // Nine parameters + [System.Diagnostics.DebuggerStepThrough] + public class FactoryNested : + IFactory + where TConcrete : TContract + { + readonly IFactory _concreteFactory; + + public FactoryNested(IFactory concreteFactory) + { + _concreteFactory = concreteFactory; + } + + public virtual TContract Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7, TParam8 param8, TParam9 param9) + { + return _concreteFactory.Create(param1, param2, param3, param4, param5, param6, param7, param8, param9); + } + } + + // Ten parameters + [System.Diagnostics.DebuggerStepThrough] + public class FactoryNested : + IFactory + where TConcrete : TContract + { + readonly IFactory _concreteFactory; + + public FactoryNested(IFactory concreteFactory) + { + _concreteFactory = concreteFactory; + } + + public virtual TContract Create( + TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7, TParam8 param8, TParam9 param9, TParam10 param10) + { + return _concreteFactory.Create(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); + } + } +} + + diff --git a/UnityProject/Assets/Zenject/Source/Factories/FactoryNested.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/FactoryNested.cs.meta new file mode 100644 index 000000000..1bbc2a77a --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/FactoryNested.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6bbe15afff3ed89429a2803a4257f425 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/FactoryUntyped.cs b/UnityProject/Assets/Zenject/Source/Factories/FactoryUntyped.cs new file mode 100644 index 000000000..c06f386f9 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/FactoryUntyped.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Security.Permissions; +using ModestTree; + +namespace Zenject +{ + // Instantiate given concrete class + [System.Diagnostics.DebuggerStepThrough] + public class FactoryUntyped : IFactoryUntyped where TConcrete : TContract + { + [Inject] + DiContainer _container; + + // So it can be created without using container + public DiContainer Container + { + get + { + return _container; + } + set + { + _container = value; + } + } + + public virtual TContract Create(params object[] constructorArgs) + { + return _container.Instantiate(constructorArgs); + } + + public IEnumerable Validate(params Type[] extras) + { + return _container.ValidateObjectGraph(extras); + } + } + + // Instantiate given contract class + [System.Diagnostics.DebuggerStepThrough] + public class FactoryUntyped : IFactoryUntyped + { + [Inject] + DiContainer _container; + + [InjectOptional] + Type _concreteType; + + // So it can be created without using container + public DiContainer Container + { + get + { + return _container; + } + set + { + _container = value; + } + } + + public Type ConcreteType + { + get + { + return _concreteType; + } + set + { + _concreteType = value; + } + } + + [PostInject] + void Initialize() + { + if (_concreteType == null) + { + _concreteType = typeof(TContract); + } + + if (!_concreteType.DerivesFromOrEqual(typeof(TContract))) + { + throw new ZenjectResolveException( + "Expected type '{0}' to derive from '{1}'".Fmt(_concreteType.Name(), typeof(TContract).Name())); + } + } + + public virtual TContract Create(params object[] constructorArgs) + { + return (TContract)_container.Instantiate(_concreteType, constructorArgs); + } + + public IEnumerable Validate(params Type[] extras) + { + return _container.ValidateObjectGraph(_concreteType, extras); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Factories/FactoryUntyped.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/FactoryUntyped.cs.meta new file mode 100644 index 000000000..0e82f34ee --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/FactoryUntyped.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d5d812a416a9e0042956dee38330cb38 +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/GameObjectFactory.cs b/UnityProject/Assets/Zenject/Source/Factories/GameObjectFactory.cs new file mode 100644 index 000000000..c170fdb95 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/GameObjectFactory.cs @@ -0,0 +1,127 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using ModestTree; +using UnityEngine; + +namespace Zenject +{ + public abstract class GameObjectFactory : IValidatable + { + [Inject] + protected readonly DiContainer _container; + + [Inject] + protected readonly GameObject _prefab; + + public abstract IEnumerable Validate(); + } + + public class GameObjectFactory : GameObjectFactory, IFactory + // We can't do this because of the way IFactoryBinder works + //where TValue : Component + { + public GameObjectFactory() + { + Assert.That(typeof(TValue).DerivesFrom()); + } + + public virtual TValue Create() + { + return (TValue)_container.InstantiatePrefabForComponent(typeof(TValue), _prefab); + } + + public override IEnumerable Validate() + { + return _container.ValidateObjectGraph(); + } + } + + // One parameter + public class GameObjectFactory : GameObjectFactory, IFactory + // We can't do this because of the way IFactoryBinder works + //where TValue : Component + { + public GameObjectFactory() + { + Assert.That(typeof(TValue).DerivesFrom()); + } + + public virtual TValue Create(TParam1 param) + { + return (TValue)_container.InstantiatePrefabForComponent(typeof(TValue), _prefab, param); + } + + public override IEnumerable Validate() + { + return _container.ValidateObjectGraph(typeof(TParam1)); + } + } + + // Two parameters + public class GameObjectFactory : GameObjectFactory, IFactory + // We can't do this because of the way IFactoryBinder works + //where TValue : Component + { + public GameObjectFactory() + { + Assert.That(typeof(TValue).DerivesFrom()); + } + + public virtual TValue Create(TParam1 param1, TParam2 param2) + { + return (TValue)_container.InstantiatePrefabForComponent(typeof(TValue), _prefab, param1, param2); + } + + public override IEnumerable Validate() + { + return _container.ValidateObjectGraph(typeof(TParam1), typeof(TParam2)); + } + } + + // Three parameters + public class GameObjectFactory : GameObjectFactory, IFactory + // We can't do this because of the way IFactoryBinder works + //where TValue : Component + { + public GameObjectFactory() + { + Assert.That(typeof(TValue).DerivesFrom()); + } + + public virtual TValue Create(TParam1 param1, TParam2 param2, TParam3 param3) + { + return (TValue)_container.InstantiatePrefabForComponent(typeof(TValue), _prefab, param1, param2, param3); + } + + public override IEnumerable Validate() + { + return _container.ValidateObjectGraph(typeof(TParam1), typeof(TParam2), typeof(TParam3)); + } + } + + // Four parameters + public class GameObjectFactory : GameObjectFactory, IFactory + // We can't do this because of the way IFactoryBinder works + //where TValue : Component + { + public GameObjectFactory() + { + Assert.That(typeof(TValue).DerivesFrom()); + } + + public virtual TValue Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4) + { + return (TValue)_container.InstantiatePrefabForComponent(typeof(TValue), _prefab, param1, param2, param3, param4); + } + + public override IEnumerable Validate() + { + return _container.ValidateObjectGraph(typeof(TParam1), typeof(TParam2), typeof(TParam3), typeof(TParam4)); + } + } +} + +#endif + diff --git a/UnityProject/Assets/Zenject/Source/Factories/GameObjectFactory.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/GameObjectFactory.cs.meta new file mode 100644 index 000000000..b343b7492 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/GameObjectFactory.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 63ce7010df9413c409f5d3b378baf29b +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/GameObjectInstantiator.cs b/UnityProject/Assets/Zenject/Source/Factories/GameObjectInstantiator.cs new file mode 100644 index 000000000..1e646a40f --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/GameObjectInstantiator.cs @@ -0,0 +1,17 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using ModestTree; +using UnityEngine; + +namespace Zenject +{ + public class GameObjectInstantiator + { + // This class was removed in favour of using DiContainer or IInstantiator directly. See IInstantiator class + } +} + +#endif + diff --git a/UnityProject/Assets/Zenject/Source/Factories/GameObjectInstantiator.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/GameObjectInstantiator.cs.meta new file mode 100644 index 000000000..92df795fd --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/GameObjectInstantiator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cf3e0238b9de82143a1eec1bdf7c48b3 +timeCreated: 1435950629 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/IFactory.cs b/UnityProject/Assets/Zenject/Source/Factories/IFactory.cs new file mode 100644 index 000000000..67b9aa518 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/IFactory.cs @@ -0,0 +1,65 @@ +using System; + +namespace Zenject +{ + public interface IFactory + { + } + + // The difference between a factory and a provider: + // Factories create new instances, providers might return an existing instance + public interface IFactory : IFactory + { + T Create(); + } + + public interface IFactory : IFactory + { + T Create(TParam1 param); + } + + public interface IFactory : IFactory + { + T Create(TParam1 param1, TParam2 param2); + } + + public interface IFactory : IFactory + { + T Create(TParam1 param1, TParam2 param2, TParam3 param3); + } + + public interface IFactory : IFactory + { + T Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4); + } + + public interface IFactory : IFactory + { + T Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5); + } + + public interface IFactory : IFactory + { + T Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6); + } + + public interface IFactory : IFactory + { + T Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7); + } + + public interface IFactory : IFactory + { + T Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7, TParam8 param8); + } + + public interface IFactory : IFactory + { + T Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7, TParam8 param8, TParam9 param9); + } + + public interface IFactory : IFactory + { + T Create(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6, TParam7 param7, TParam8 param8, TParam9 param9, TParam10 param10); + } +} diff --git a/UnityProject/Assets/Zenject/Source/Factories/IFactory.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/IFactory.cs.meta new file mode 100644 index 000000000..e6a726b31 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/IFactory.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c29c38ede1f26ae459c497484380172d +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/IFactoryUntyped.cs b/UnityProject/Assets/Zenject/Source/Factories/IFactoryUntyped.cs new file mode 100644 index 000000000..d4d601d34 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/IFactoryUntyped.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Reflection; + +namespace Zenject +{ + // The difference between a factory and a provider: + // Factories create new instances, providers might return an existing instance + // This is the same as IFactory<> except it does not have compile-time checking + // of parameters + public interface IFactoryUntyped + { + // Note that we lose some type safety here when passing the arguments + // We are trading compile time checks for some flexibility + T Create(params object[] constructorArgs); + + IEnumerable Validate(params Type[] extraType); + } +} diff --git a/UnityProject/Assets/Zenject/Source/Factories/IFactoryUntyped.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/IFactoryUntyped.cs.meta new file mode 100644 index 000000000..e68a77440 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/IFactoryUntyped.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 78a24823e7c3d59498101b6cdb89ade8 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/IValidatable.cs b/UnityProject/Assets/Zenject/Source/Factories/IValidatable.cs new file mode 100644 index 000000000..3a00379a7 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/IValidatable.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; + +namespace Zenject +{ + public interface IValidatable + { + IEnumerable Validate(); + } +} diff --git a/UnityProject/Assets/Zenject/Source/Factories/IValidatable.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/IValidatable.cs.meta new file mode 100644 index 000000000..fac1c18f9 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/IValidatable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8491786b02774b745939c474e9c70d0b +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/IValidatableFactory.cs b/UnityProject/Assets/Zenject/Source/Factories/IValidatableFactory.cs new file mode 100644 index 000000000..66ca1575e --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/IValidatableFactory.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace Zenject +{ + public interface IValidatableFactory + { + Type ConstructedType + { + get; + } + + Type[] ProvidedTypes + { + get; + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Factories/IValidatableFactory.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/IValidatableFactory.cs.meta new file mode 100644 index 000000000..18bd1cdee --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/IValidatableFactory.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: aa8f00cb8be444b4cb08728d7c9ac530 +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/InstantiateUtil.cs b/UnityProject/Assets/Zenject/Source/Factories/InstantiateUtil.cs new file mode 100644 index 000000000..4fd962ad4 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/InstantiateUtil.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class TypeValuePair + { + public Type Type; + public object Value; + + public TypeValuePair(Type type, object value) + { + Type = type; + Value = value; + } + } + + [System.Diagnostics.DebuggerStepThrough] + internal static class InstantiateUtil + { + public static List CreateTypeValueList(IEnumerable args) + { + Assert.That(!args.ContainsItem(null)); + return args.Select(x => new TypeValuePair(x.GetType(), x)).ToList(); + } + + public static TypeValuePair CreateTypePair(T param) + { + // Use the most derived type that we can find here + return new TypeValuePair( + param == null ? typeof(T) : param.GetType(), param); + } + + // Find the first match with the given type and remove it from the list + // Return true if it was removed + public static bool PopValueWithType( + List extraArgMap, Type injectedFieldType, out object value) + { + var match = extraArgMap + .Where(x => x.Type.DerivesFromOrEqual(injectedFieldType)) + .FirstOrDefault(); + + if (match != null) + { + // Note that this will only remove the first element which is what we want + extraArgMap.RemoveWithConfirm(match); + value = match.Value; + return true; + } + + value = injectedFieldType.GetDefaultValue(); + return false; + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Factories/InstantiateUtil.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/InstantiateUtil.cs.meta new file mode 100644 index 000000000..3e559ea43 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/InstantiateUtil.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3f8357edd8cea90489728aa9477e21d3 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/KeyedFactory.cs b/UnityProject/Assets/Zenject/Source/Factories/KeyedFactory.cs new file mode 100644 index 000000000..b20e642d1 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/KeyedFactory.cs @@ -0,0 +1,210 @@ +using System; +using System.Collections.Generic; +using Zenject; +using ModestTree.Util; +using ModestTree; +using System.Linq; + +namespace Zenject +{ + public abstract class KeyedFactoryBase : IValidatable + { + [Inject] + readonly DiContainer _container = null; + + [InjectOptional] + readonly List> _typePairs = null; + + Dictionary _typeMap; + + [InjectOptional] + readonly Type _fallbackType = null; + + protected DiContainer Container + { + get + { + return _container; + } + } + + protected abstract Type[] ProvidedTypes + { + get; + } + + public ICollection Keys + { + get { return _typeMap.Keys; } + } + + protected Dictionary TypeMap + { + get { return _typeMap; } + } + + [PostInject] + public void Initialize() + { + Assert.That(_fallbackType == null || _fallbackType.DerivesFromOrEqual(), + "Expected fallback type '{0}' to derive from '{1}'", _fallbackType, typeof(TBase)); + + var duplicates = _typePairs.Select(x => x.First).GetDuplicates(); + + if (!duplicates.IsEmpty()) + { + Assert.Throw("Found duplicate values in KeyedFactory: {0}", duplicates.Select(x => x.ToString()).Join(", ")); + } + + _typeMap = _typePairs.ToDictionary(x => x.First, x => x.Second); + _typePairs.Clear(); + } + + public bool HasKey(TKey key) + { + return _typeMap.ContainsKey(key); + } + + protected Type GetTypeForKey(TKey key) + { + Type keyedType; + + if (!_typeMap.TryGetValue(key, out keyedType)) + { + Assert.IsNotNull(_fallbackType, "Could not find instance for key '{0}'", key); + return _fallbackType; + } + + return keyedType; + } + + public virtual IEnumerable Validate() + { + foreach (var constructType in _typeMap.Values) + { + foreach (var error in _container.ValidateObjectGraph(constructType, ProvidedTypes)) + { + yield return error; + } + } + } + + protected static BindingConditionSetter AddBindingInternal(DiContainer container, TKey key) + where TDerived : TBase + { + return container.Bind>().ToInstance(ModestTree.Util.Tuple.New(key, typeof(TDerived))); + } + } + + // Zero parameters + public class KeyedFactory : KeyedFactoryBase + { + protected override Type[] ProvidedTypes + { + get + { + return new Type[0]; + } + } + + public virtual TBase Create(TKey key) + { + var type = GetTypeForKey(key); + return (TBase)Container.Instantiate(type); + } + } + + // One parameter + public class KeyedFactory : KeyedFactoryBase + { + protected override Type[] ProvidedTypes + { + get + { + return new Type[] { typeof(TParam1) }; + } + } + + public virtual TBase Create(TKey key, TParam1 param1) + { + return (TBase)Container.InstantiateExplicit( + GetTypeForKey(key), + new List() + { + InstantiateUtil.CreateTypePair(param1), + }); + } + } + + // Two parameters + public class KeyedFactory : KeyedFactoryBase + { + protected override Type[] ProvidedTypes + { + get + { + return new Type[] { typeof(TParam1), typeof(TParam2) }; + } + } + + public virtual TBase Create(TKey key, TParam1 param1, TParam2 param2) + { + return (TBase)Container.InstantiateExplicit( + GetTypeForKey(key), + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + }); + } + } + + // Three parameters + public class KeyedFactory : KeyedFactoryBase + { + protected override Type[] ProvidedTypes + { + get + { + return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3) }; + } + } + + public virtual TBase Create(TKey key, TParam1 param1, TParam2 param2, TParam3 param3) + { + return (TBase)Container.InstantiateExplicit( + GetTypeForKey(key), + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + InstantiateUtil.CreateTypePair(param3), + }); + } + } + + // Four parameters + public class KeyedFactory : KeyedFactoryBase + { + protected override Type[] ProvidedTypes + { + get + { + return new Type[] { typeof(TParam1), typeof(TParam2), typeof(TParam3), typeof(TParam4) }; + } + } + + public virtual TBase Create(TKey key, TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4) + { + return (TBase)Container.InstantiateExplicit( + GetTypeForKey(key), + new List() + { + InstantiateUtil.CreateTypePair(param1), + InstantiateUtil.CreateTypePair(param2), + InstantiateUtil.CreateTypePair(param3), + InstantiateUtil.CreateTypePair(param4), + }); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Factories/KeyedFactory.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/KeyedFactory.cs.meta new file mode 100644 index 000000000..bb3f98340 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/KeyedFactory.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 51bd99ee77feaee43955eb9734551279 +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/ListFactory.cs b/UnityProject/Assets/Zenject/Source/Factories/ListFactory.cs new file mode 100644 index 000000000..913d79346 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/ListFactory.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using Zenject; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class ListFactory + { + readonly DiContainer _container; + List _implTypes; + + public ListFactory( + List implTypes, DiContainer container) + { + foreach (var type in implTypes) + { + Assert.That(type.DerivesFromOrEqual()); + } + + _implTypes = implTypes; + _container = container; + } + + public static void Bind() + { + } + + public List Create(params object[] constructorArgs) + { + var list = new List(); + + foreach (var type in _implTypes) + { + list.Add(_container.Instantiate(type, constructorArgs)); + } + + return list; + } + } +} + diff --git a/UnityProject/Assets/Zenject/Source/Factories/ListFactory.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/ListFactory.cs.meta new file mode 100644 index 000000000..9493990f8 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/ListFactory.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 45fdf17be633ddf419f007e74de1066c +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Factories/PrefabFactory.cs b/UnityProject/Assets/Zenject/Source/Factories/PrefabFactory.cs new file mode 100644 index 000000000..c4e48240a --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/PrefabFactory.cs @@ -0,0 +1,158 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using Zenject; +using System.Linq; +using ModestTree; +using UnityEngine; + +namespace Zenject +{ + //No parameters + public class PrefabFactory : IValidatable + where T : Component + { + [Inject] + protected readonly DiContainer _container; + + public T Create(GameObject prefab) + { + Assert.That(prefab != null, + "Null prefab given to factory create method when instantiating object with type '{0}'.", typeof(T)); + + return _container.InstantiatePrefabForComponent(prefab); + } + + public virtual T Create(string prefabResourceName) + { + Assert.That(!string.IsNullOrEmpty(prefabResourceName), + "Null or empty prefab resource name given to factory create method when instantiating object with type '{0}'.", typeof(T)); + + return Create((GameObject)Resources.Load(prefabResourceName)); + } + + public System.Collections.Generic.IEnumerable Validate() + { + return _container.ValidateObjectGraph(); + } + } + + // One parameter + public class PrefabFactory : IValidatable + where T : Component + { + [Inject] + protected readonly DiContainer _container; + + public virtual T Create(GameObject prefab, P1 param) + { + Assert.That(prefab != null, + "Null prefab given to factory create method when instantiating object with type '{0}'.", typeof(T)); + + return _container.InstantiatePrefabForComponent(prefab, param); + } + + public virtual T Create(string prefabResourceName, P1 param) + { + Assert.That(!string.IsNullOrEmpty(prefabResourceName), + "Null or empty prefab resource name given to factory create method when instantiating object with type '{0}'.", typeof(T)); + + return Create((GameObject)Resources.Load(prefabResourceName), param); + } + + public System.Collections.Generic.IEnumerable Validate() + { + return _container.ValidateObjectGraph(typeof(P1)); + } + } + + // Two parameters + public class PrefabFactory : IValidatable + where T : Component + { + [Inject] + protected readonly DiContainer _container; + + public virtual T Create(GameObject prefab, P1 param, P2 param2) + { + Assert.That(prefab != null, + "Null prefab given to factory create method when instantiating object with type '{0}'.", typeof(T)); + + return _container.InstantiatePrefabForComponent(prefab, param, param2); + } + + public virtual T Create(string prefabResourceName, P1 param, P2 param2) + { + Assert.That(!string.IsNullOrEmpty(prefabResourceName), + "Null or empty prefab resource name given to factory create method when instantiating object with type '{0}'.", typeof(T)); + + return Create((GameObject)Resources.Load(prefabResourceName), param, param2); + } + + public System.Collections.Generic.IEnumerable Validate() + { + return _container.ValidateObjectGraph(typeof(P1), typeof(P2)); + } + } + + // Three parameters + public class PrefabFactory : IValidatable + where T : Component + { + [Inject] + protected readonly DiContainer _container; + + public virtual T Create(GameObject prefab, P1 param, P2 param2, P3 param3) + { + Assert.That(prefab != null, + "Null prefab given to factory create method when instantiating object with type '{0}'.", typeof(T)); + + return _container.InstantiatePrefabForComponent(prefab, param, param2, param3); + } + + public virtual T Create(string prefabResourceName, P1 param, P2 param2, P3 param3) + { + Assert.That(!string.IsNullOrEmpty(prefabResourceName), + "Null or empty prefab resource name given to factory create method when instantiating object with type '{0}'.", typeof(T)); + + return Create((GameObject)Resources.Load(prefabResourceName), param, param2, param3); + } + + public System.Collections.Generic.IEnumerable Validate() + { + return _container.ValidateObjectGraph(typeof(P1), typeof(P2), typeof(P3)); + } + } + + // Four parameters + public class PrefabFactory : IValidatable + where T : Component + { + [Inject] + protected readonly DiContainer _container; + + public virtual T Create(GameObject prefab, P1 param, P2 param2, P3 param3, P4 param4) + { + Assert.That(prefab != null, + "Null prefab given to factory create method when instantiating object with type '{0}'.", typeof(T)); + + return _container.InstantiatePrefabForComponent(prefab, param, param2, param3, param4); + } + + public virtual T Create(string prefabResourceName, P1 param, P2 param2, P3 param3, P4 param4) + { + Assert.That(!string.IsNullOrEmpty(prefabResourceName), + "Null or empty prefab resource name given to factory create method when instantiating object with type '{0}'.", typeof(T)); + + return Create((GameObject)Resources.Load(prefabResourceName), param, param2, param3, param4); + } + + public System.Collections.Generic.IEnumerable Validate() + { + return _container.ValidateObjectGraph(typeof(P1), typeof(P2), typeof(P3), typeof(P4)); + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Factories/PrefabFactory.cs.meta b/UnityProject/Assets/Zenject/Source/Factories/PrefabFactory.cs.meta new file mode 100644 index 000000000..2252ec6c2 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Factories/PrefabFactory.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 26cdfc469d2be38409322b5e949157ef +timeCreated: 1443387374 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/Injection.meta b/UnityProject/Assets/Zenject/Source/Injection.meta similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Injection.meta rename to UnityProject/Assets/Zenject/Source/Injection.meta diff --git a/UnityProject/Assets/Zenject/Source/Injection/InjectableInfo.cs b/UnityProject/Assets/Zenject/Source/Injection/InjectableInfo.cs new file mode 100644 index 000000000..372818aea --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Injection/InjectableInfo.cs @@ -0,0 +1,49 @@ +using System; +using System.Linq; + +namespace Zenject +{ + // An injectable is a field or property with [Inject] attribute + // Or a constructor parameter + public class InjectableInfo + { + public readonly bool Optional; + public readonly string Identifier; + + public readonly bool LocalOnly; + + // The field name or property name from source code + public readonly string MemberName; + // The field type or property type from source code + public readonly Type MemberType; + + public readonly Type ObjectType; + + // Null for constructor declared dependencies + public readonly Action Setter; + + public readonly object DefaultValue; + + public InjectableInfo( + bool optional, string identifier, string memberName, + Type memberType, Type objectType, Action setter, object defaultValue, bool localOnly) + { + Optional = optional; + Setter = setter; + ObjectType = objectType; + MemberType = memberType; + MemberName = memberName; + Identifier = identifier; + DefaultValue = defaultValue; + LocalOnly = localOnly; + } + + public InjectContext CreateInjectContext( + DiContainer container, InjectContext currentContext, object targetInstance, string concreteIdentifier) + { + return new InjectContext( + container, MemberType, Identifier, Optional, + ObjectType, targetInstance, MemberName, currentContext, concreteIdentifier, DefaultValue, LocalOnly); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Injection/InjectableInfo.cs.meta b/UnityProject/Assets/Zenject/Source/Injection/InjectableInfo.cs.meta new file mode 100644 index 000000000..68a84f6c8 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Injection/InjectableInfo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fb8b0c84b57ed504c9a63a9ae8f6c37a +timeCreated: 1435941959 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Injection/TypeAnalyzer.cs b/UnityProject/Assets/Zenject/Source/Injection/TypeAnalyzer.cs new file mode 100644 index 000000000..a539ac1c1 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Injection/TypeAnalyzer.cs @@ -0,0 +1,231 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Linq; +using ModestTree; + +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + internal static class TypeAnalyzer + { + static Dictionary _typeInfo = new Dictionary(); + + public static ZenjectTypeInfo GetInfo(Type type) + { + ZenjectTypeInfo info; + +#if ZEN_MULTITHREADING + lock (_typeInfo) +#endif + { + if (!_typeInfo.TryGetValue(type, out info)) + { + info = CreateTypeInfo(type); + _typeInfo.Add(type, info); + } + } + + return info; + } + + static ZenjectTypeInfo CreateTypeInfo(Type type) + { + var constructor = GetInjectConstructor(type); + + return new ZenjectTypeInfo( + type, + GetPostInjectMethods(type), + constructor, + GetFieldInjectables(type).ToList(), + GetPropertyInjectables(type).ToList(), + GetConstructorInjectables(type, constructor).ToList()); + } + + static IEnumerable GetConstructorInjectables(Type parentType, ConstructorInfo constructorInfo) + { + if (constructorInfo == null) + { + return Enumerable.Empty(); + } + + return constructorInfo.GetParameters().Select( + paramInfo => CreateInjectableInfoForParam(parentType, paramInfo)); + } + + static InjectableInfo CreateInjectableInfoForParam( + Type parentType, ParameterInfo paramInfo) + { + var injectAttributes = paramInfo.AllAttributes().ToList(); + + Assert.That(injectAttributes.Count <= 1, + "Found multiple 'Inject' attributes on type parameter '{0}' of type '{1}'. Parameter should only have one", paramInfo.Name, parentType.Name()); + + var injectAttr = injectAttributes.SingleOrDefault(); + + string identifier = null; + bool isOptional = false; + bool localOnly = false; + + if (injectAttr != null) + { + identifier = injectAttr.Identifier; + isOptional = injectAttr.IsOptional; + localOnly = injectAttr.LocalOnly; + } + + bool isOptionalWithADefaultValue = (paramInfo.Attributes & ParameterAttributes.HasDefault) == ParameterAttributes.HasDefault; + + return new InjectableInfo( + isOptionalWithADefaultValue || isOptional, + identifier, + paramInfo.Name, + paramInfo.ParameterType, + parentType, + null, + isOptionalWithADefaultValue ? paramInfo.DefaultValue : null, + localOnly); + } + + static List GetPostInjectMethods(Type type) + { + // Note that unlike with fields and properties we use GetCustomAttributes + // This is so that we can ignore inherited attributes, which is necessary + // otherwise a base class method marked with [Inject] would cause all overridden + // derived methods to be added as well + var methods = type.GetAllMethods( + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance) + .Where(x => x.GetCustomAttributes(typeof(PostInjectAttribute), false).Any()).ToList(); + + var heirarchyList = type.Yield().Concat(type.GetParentTypes()).Reverse().ToList(); + + // Order by base classes first + // This is how constructors work so it makes more sense + var values = methods.OrderBy(x => heirarchyList.IndexOf(x.DeclaringType)); + + var postInjectInfos = new List(); + + foreach (var methodInfo in values) + { + var paramsInfo = methodInfo.GetParameters(); + + postInjectInfos.Add( + new PostInjectableInfo( + methodInfo, + paramsInfo.Select(paramInfo => + CreateInjectableInfoForParam(type, paramInfo)).ToList())); + } + + return postInjectInfos; + } + + static IEnumerable GetPropertyInjectables(Type type) + { + var propInfos = type.GetAllProperties( + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance) + .Where(x => x.HasAttribute(typeof(InjectAttributeBase))); + + foreach (var propInfo in propInfos) + { + yield return CreateForMember(propInfo, type); + } + } + + static IEnumerable GetFieldInjectables(Type type) + { + var fieldInfos = type.GetAllFields( + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance) + .Where(x => x.HasAttribute(typeof(InjectAttributeBase))); + + foreach (var fieldInfo in fieldInfos) + { + yield return CreateForMember(fieldInfo, type); + } + } + + static InjectableInfo CreateForMember(MemberInfo memInfo, Type parentType) + { + var injectAttributes = memInfo.AllAttributes().ToList(); + + Assert.That(injectAttributes.Count <= 1, + "Found multiple 'Inject' attributes on type field '{0}' of type '{1}'. Field should only container one Inject attribute", memInfo.Name, parentType.Name()); + + var injectAttr = injectAttributes.SingleOrDefault(); + + string identifier = null; + bool isOptional = false; + bool localOnly = false; + + if (injectAttr != null) + { + identifier = injectAttr.Identifier; + isOptional = injectAttr.IsOptional; + localOnly = injectAttr.LocalOnly; + } + + Type memberType; + Action setter; + + if (memInfo is FieldInfo) + { + var fieldInfo = (FieldInfo)memInfo; + setter = ((object injectable, object value) => fieldInfo.SetValue(injectable, value)); + memberType = fieldInfo.FieldType; + } + else + { + Assert.That(memInfo is PropertyInfo); + var propInfo = (PropertyInfo)memInfo; + setter = ((object injectable, object value) => propInfo.SetValue(injectable, value, null)); + memberType = propInfo.PropertyType; + } + + return new InjectableInfo( + isOptional, + identifier, + memInfo.Name, + memberType, + parentType, + setter, + null, + localOnly); + } + + static ConstructorInfo GetInjectConstructor(Type parentType) + { + var constructors = parentType.GetConstructors( + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); + +#if !ZEN_NOT_UNITY3D + if (Application.platform == RuntimePlatform.WP8Player) + { + // WP8 generates a dummy constructor with signature (internal Classname(UIntPtr dummy)) + // So just ignore that + constructors = constructors.Where(c => !IsWp8GeneratedConstructor(c)).ToArray(); + } +#endif + + if (constructors.IsEmpty()) + { + return null; + } + + if (constructors.HasMoreThan(1)) + { + // This will return null if there is more than one constructor and none are marked with the [Inject] attribute + return (from c in constructors where c.HasAttribute() select c).SingleOrDefault(); + } + + return constructors[0]; + } + + static bool IsWp8GeneratedConstructor(ConstructorInfo c) + { + ParameterInfo[] args = c.GetParameters(); + return args.Length == 1 && args[0].ParameterType == typeof(UIntPtr) && args[0].Name == "dummy"; + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Injection/TypeAnalyzer.cs.meta b/UnityProject/Assets/Zenject/Source/Injection/TypeAnalyzer.cs.meta new file mode 100644 index 000000000..35d68000a --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Injection/TypeAnalyzer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 163a5de4ea1c53647894e878d5f16237 +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Injection/ZenjectTypeInfo.cs b/UnityProject/Assets/Zenject/Source/Injection/ZenjectTypeInfo.cs new file mode 100644 index 000000000..c93781b91 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Injection/ZenjectTypeInfo.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Reflection; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + public class PostInjectableInfo + { + public readonly MethodInfo MethodInfo; + public readonly ReadOnlyCollection InjectableInfo; + + public PostInjectableInfo( + MethodInfo methodInfo, List injectableInfo) + { + MethodInfo = methodInfo; + InjectableInfo = injectableInfo.AsReadOnly(); + } + } + + public class ZenjectTypeInfo + { + readonly List _postInjectMethods; + readonly List _constructorInjectables; + readonly List _fieldInjectables; + readonly List _propertyInjectables; + readonly ConstructorInfo _injectConstructor; + readonly Type _typeAnalyzed; + + public ZenjectTypeInfo( + Type typeAnalyzed, + List postInjectMethods, + ConstructorInfo injectConstructor, + List fieldInjectables, + List propertyInjectables, + List constructorInjectables) + { + _postInjectMethods = postInjectMethods; + _fieldInjectables = fieldInjectables; + _propertyInjectables = propertyInjectables; + _constructorInjectables = constructorInjectables; + _injectConstructor = injectConstructor; + _typeAnalyzed = typeAnalyzed; + } + + public Type TypeAnalyzed + { + get + { + return _typeAnalyzed; + } + } + + public IEnumerable PostInjectMethods + { + get + { + return _postInjectMethods; + } + } + + public IEnumerable AllInjectables + { + get + { + return _constructorInjectables.Concat(_fieldInjectables).Concat(_propertyInjectables).Concat(_postInjectMethods.SelectMany(x => x.InjectableInfo)); + } + } + + public IEnumerable FieldInjectables + { + get + { + return _fieldInjectables; + } + } + + public IEnumerable PropertyInjectables + { + get + { + return _propertyInjectables; + } + } + + public IEnumerable ConstructorInjectables + { + get + { + return _constructorInjectables; + } + } + + // May be null + public ConstructorInfo InjectConstructor + { + get + { + return _injectConstructor; + } + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Injection/ZenjectTypeInfo.cs.meta b/UnityProject/Assets/Zenject/Source/Injection/ZenjectTypeInfo.cs.meta new file mode 100644 index 000000000..36709e726 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Injection/ZenjectTypeInfo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6bd846771dc207347bae5ef7a497bd00 +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main.meta b/UnityProject/Assets/Zenject/Source/Main.meta index 1447ba6a0..5bdc60968 100644 --- a/UnityProject/Assets/Zenject/Source/Main.meta +++ b/UnityProject/Assets/Zenject/Source/Main.meta @@ -1,9 +1,5 @@ fileFormatVersion: 2 -guid: 58081169dcd383647aba140ad40221c1 +guid: b5f870edd43b85f4dae7b77cc0d75b46 folderAsset: yes -timeCreated: 1452188408 -licenseType: Pro DefaultImporter: userData: - assetBundleName: - assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/BindingId.cs b/UnityProject/Assets/Zenject/Source/Main/BindingId.cs new file mode 100644 index 000000000..8ab64db90 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/BindingId.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class BindingId : IEquatable + { + public readonly Type Type; + public readonly string Identifier; + + public BindingId(Type type, string identifier) + { + Type = type; + Identifier = identifier; + } + + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hash = 17; + hash = hash * 29 + this.Type.GetHashCode(); + hash = hash * 29 + (this.Identifier == null ? 0 : this.Identifier.GetHashCode()); + return hash; + } + } + + public override bool Equals(object other) + { + if (other is BindingId) + { + BindingId otherId = (BindingId)other; + return otherId == this; + } + else + { + return false; + } + } + + public bool Equals(BindingId that) + { + return this == that; + } + + public static bool operator ==(BindingId left, BindingId right) + { + return left.Type == right.Type && object.Equals(left.Identifier, right.Identifier); + } + + public static bool operator !=(BindingId left, BindingId right) + { + return !left.Equals(right); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Main/BindingId.cs.meta b/UnityProject/Assets/Zenject/Source/Main/BindingId.cs.meta new file mode 100644 index 000000000..88d608e22 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/BindingId.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5c446c088f87a214da36e1ec2463cdd6 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/CompositionRoot.cs b/UnityProject/Assets/Zenject/Source/Main/CompositionRoot.cs new file mode 100644 index 000000000..7549e94d5 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/CompositionRoot.cs @@ -0,0 +1,78 @@ +#if !ZEN_NOT_UNITY3D +using System; +using ModestTree; +using ModestTree.Util; +using UnityEngine; + +namespace Zenject +{ + public abstract class CompositionRoot : MonoBehaviour + { + bool _isDisposed; + + public abstract DiContainer Container + { + get; + } + + public abstract IFacade RootFacade + { + get; + } + + public void Awake() + { + Assert.IsNull(Container); + Assert.IsNull(RootFacade); + + Initialize(); + + Assert.IsNotNull(Container); + Assert.IsNotNull(RootFacade); + } + + public void OnApplicationQuit() + { + // In some cases we have monobehaviour's that are bound to IDisposable, and who have + // also been set with Application.DontDestroyOnLoad so that the Dispose() is always + // called instead of OnDestroy. This is nice because we can actually reliably predict the + // order Dispose() is called in which is not the case for OnDestroy. + // However, when the user quits the app, OnDestroy is called even for objects that + // have been marked with Application.DontDestroyOnLoad, and so the destruction order + // changes. So to address this case, dispose before the OnDestroy event below (OnApplicationQuit + // is always called before OnDestroy) and then don't call dispose in OnDestroy + Assert.IsNotNull(!_isDisposed); + RootFacade.Dispose(); + _isDisposed = true; + } + + public void OnDestroy() + { + // See comment in OnApplicationQuit + if (!_isDisposed) + { + _isDisposed = true; + RootFacade.Dispose(); + } + } + + public void Update() + { + RootFacade.Tick(); + } + + public void FixedUpdate() + { + RootFacade.FixedTick(); + } + + public void LateUpdate() + { + RootFacade.LateTick(); + } + + protected abstract void Initialize(); + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Main/CompositionRoot.cs.meta b/UnityProject/Assets/Zenject/Source/Main/CompositionRoot.cs.meta new file mode 100644 index 000000000..2d0a26135 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/CompositionRoot.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1f81fc1ffd8e8764aae8197c8e492991 +timeCreated: 1439256695 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/DiContainer.cs b/UnityProject/Assets/Zenject/Source/Main/DiContainer.cs new file mode 100644 index 000000000..755e852ef --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/DiContainer.cs @@ -0,0 +1,1804 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using ModestTree.Util; + +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + // Responsibilities: + // - Expose methods to configure object graph via Bind() methods + // - Build object graphs via Resolve() method + public class DiContainer : IInstantiator, IResolver, IBinder + { + readonly Dictionary> _providers = new Dictionary>(); + readonly SingletonProviderMap _singletonMap; + readonly HashSet _installedInstallers = new HashSet(); + readonly Stack _installsInProgress = new Stack(); + readonly DiContainer _parentContainer; + readonly Stack _resolvesInProgress = new Stack(); + +#if !ZEN_NOT_UNITY3D + readonly Transform _rootTransform; +#endif + + bool _isValidating; + + public DiContainer() + { + _singletonMap = new SingletonProviderMap(this); + + this.Bind().ToInstance(this); + this.Bind().ToInstance(this); + this.Bind().ToInstance(_singletonMap); + +#if !ZEN_NOT_UNITY3D + this.Bind().ToSingle(); +#endif + this.Bind().ToSingle(); + } + + public DiContainer(DiContainer parentContainer) + : this() + { + _parentContainer = parentContainer; + } + +#if !ZEN_NOT_UNITY3D + public DiContainer(Transform rootTransform, DiContainer parentContainer) + : this() + { + _parentContainer = parentContainer; + _rootTransform = rootTransform; + } + + public DiContainer(Transform rootTransform) + : this() + { + _rootTransform = rootTransform; + } +#endif + + public SingletonProviderMap SingletonProviderMap + { + get + { + return _singletonMap; + } + } + + public DiContainer ParentContainer + { + get + { + return _parentContainer; + } + } + + public bool ChecksForCircularDependencies + { + get + { +#if ZEN_MULTITHREADING + // When multithreading is supported we can't use a static field to track the lookup + // TODO: We could look at the inject context though + return false; +#else + return true; +#endif + } + } + + public IEnumerable InstalledInstallers + { + get + { + return _installedInstallers; + } + } + +#if !ZEN_NOT_UNITY3D + public Transform RootTransform + { + get + { + return _rootTransform; + } + } +#endif + + // True if this container was created for the purposes of validation + // Useful to avoid instantiating things that we shouldn't during this step + public bool IsValidating + { + get + { + return _isValidating; + } + set + { + _isValidating = value; + } + } + + public IEnumerable AllContracts + { + get + { + return _providers.Keys; + } + } + + // Note that this list is not exhaustive or even accurate so use with caution + public IEnumerable AllConcreteTypes + { + get + { + return (from x in _providers from p in x.Value select p.GetInstanceType()).Where(x => x != null && !x.IsInterface && !x.IsAbstract).Distinct(); + } + } + + public DiContainer CreateSubContainer() + { +#if ZEN_NOT_UNITY3D + return new DiContainer(this); +#else + return new DiContainer(_rootTransform, this); +#endif + } + + public void RegisterProvider( + ProviderBase provider, BindingId bindingId) + { + if (_providers.ContainsKey(bindingId)) + { + // Prevent duplicate singleton bindings: + if (_providers[bindingId].Find(item => ReferenceEquals(item, provider)) != null) + { + throw new ZenjectBindException( + "Found duplicate singleton binding for contract '{0}' and id '{1}'".Fmt(bindingId.Type, bindingId.Identifier)); + } + + _providers[bindingId].Add(provider); + } + else + { + _providers.Add(bindingId, new List {provider}); + } + } + + public int UnregisterProvider(ProviderBase provider) + { + int numRemoved = 0; + + foreach (var keyValue in _providers) + { + numRemoved += keyValue.Value.RemoveAll(x => x == provider); + } + + Assert.That(numRemoved > 0, "Tried to unregister provider that was not registered"); + + // Remove any empty contracts + foreach (var bindingId in _providers.Where(x => x.Value.IsEmpty()).Select(x => x.Key).ToList()) + { + _providers.Remove(bindingId); + } + + provider.Dispose(); + + return numRemoved; + } + + public IEnumerable GetDependencyContracts() + { + return GetDependencyContracts(typeof(TContract)); + } + + public IEnumerable ValidateResolve() + { + return ValidateResolve((string)null); + } + + public IEnumerable ValidateResolve(string identifier) + { + return ValidateResolve(new InjectContext(this, typeof(TContract), identifier)); + } + + public IEnumerable ValidateValidatables(params Type[] ignoreTypes) + { + // Use ToList() in case it changes somehow during iteration + foreach (var pair in _providers.ToList()) + { + var bindingId = pair.Key; + + if (ignoreTypes.Where(i => bindingId.Type.DerivesFromOrEqual(i)).Any()) + { + continue; + } + + // Validate all IValidatableFactory's + List validatableFactoryProviders; + + var providers = pair.Value; + + if (bindingId.Type.DerivesFrom()) + { + validatableFactoryProviders = providers; + } + else + { + validatableFactoryProviders = providers.Where(x => x.GetInstanceType().DerivesFrom()).ToList(); + } + + var injectCtx = new InjectContext(this, bindingId.Type, bindingId.Identifier); + + foreach (var provider in validatableFactoryProviders) + { + var factory = (IValidatableFactory)provider.GetInstance(injectCtx); + + var type = factory.ConstructedType; + var providedArgs = factory.ProvidedTypes; + + foreach (var error in ValidateObjectGraph(type, injectCtx, null, providedArgs)) + { + yield return error; + } + } + + // Validate all IValidatable's + List validatableProviders; + + if (bindingId.Type.DerivesFrom()) + { + validatableProviders = providers; + } + else + { + validatableProviders = providers.Where(x => x.GetInstanceType().DerivesFrom()).ToList(); + } + + Assert.That(validatableFactoryProviders.Intersect(validatableProviders).IsEmpty(), + "Found provider implementing both IValidatable and IValidatableFactory. This is not allowed."); + + foreach (var provider in validatableProviders) + { + var factory = (IValidatable)provider.GetInstance(injectCtx); + + foreach (var error in factory.Validate()) + { + yield return error; + } + } + } + } + + // Wrap IEnumerable<> to avoid LINQ mistakes + internal List GetAllProviderMatches(InjectContext context) + { + return GetProviderMatchesInternal(context).Select(x => x.Provider).ToList(); + } + + // Be careful with this method since it is a coroutine + IEnumerable GetProviderMatchesInternal(InjectContext context) + { + return GetProvidersForContract(context.BindingId, context.LocalOnly).Where(x => x.Provider.Matches(context)); + } + + IEnumerable GetProvidersForContract(BindingId bindingId, bool localOnly) + { + var localPairs = GetLocalProviders(bindingId).Select(x => new ProviderPair(x, this)); + + if (localOnly || _parentContainer == null) + { + return localPairs; + } + + return localPairs.Concat( + _parentContainer.GetProvidersForContract(bindingId, false)); + } + + List GetLocalProviders(BindingId bindingId) + { + List localProviders; + + if (_providers.TryGetValue(bindingId, out localProviders)) + { + return localProviders; + } + + // If we are asking for a List, we should also match for any localProviders that are bound to the open generic type List<> + // Currently it only matches one and not the other - not totally sure if this is better than returning both + if (bindingId.Type.IsGenericType && _providers.TryGetValue(new BindingId(bindingId.Type.GetGenericTypeDefinition(), bindingId.Identifier), out localProviders)) + { + return localProviders; + } + + return new List(); + } + + public IList ResolveAll(InjectContext context) + { + // Note that different types can map to the same provider (eg. a base type to a concrete class and a concrete class to itself) + + var matches = GetProviderMatchesInternal(context).ToList(); + + if (matches.Any()) + { + return ReflectionUtil.CreateGenericList( + context.MemberType, matches.Select(x => SafeGetInstance(x.Provider, context)).ToArray()); + } + + if (!context.Optional) + { + throw new ZenjectResolveException( + "Could not find required dependency with type '" + context.MemberType.Name() + "' \nObject graph:\n" + context.GetObjectGraphString()); + } + + return ReflectionUtil.CreateGenericList(context.MemberType, new object[] {}); + } + + public List ResolveTypeAll(InjectContext context) + { + if (_providers.ContainsKey(context.BindingId)) + { + return _providers[context.BindingId].Select(x => x.GetInstanceType()).Where(x => x != null).ToList(); + } + + return new List {}; + } + + public void Install(IEnumerable installers) + { + foreach (var installer in installers) + { + Assert.IsNotNull(installer, "Tried to install a null installer"); + + if (installer.IsEnabled) + { + Install(installer); + } + } + } + + public void Install(IInstaller installer) + { + Assert.That(installer.IsEnabled); + + this.Inject(installer); + InstallInstallerInternal(installer); + } + + public void Install(params object[] extraArgs) + where T : IInstaller + { + Install(typeof(T), extraArgs); + } + + public void Install(Type installerType, params object[] extraArgs) + { + Assert.That(installerType.DerivesFrom()); + +#if !ZEN_NOT_UNITY3D + if (installerType.DerivesFrom()) + { + var installer = InstantiatePrefabResourceForComponent("Installers/" + installerType.Name(), extraArgs); + + try + { + InstallInstallerInternal(installer); + } + finally + { + // When running, it is nice to keep the installer around so that you can change the settings live + // But when validating at edit time, we don't want to add the new game object + if (!Application.isPlaying) + { + GameObject.DestroyImmediate(installer.gameObject); + } + } + } + else +#endif + { + var installer = (IInstaller)this.Instantiate(installerType, extraArgs); + InstallInstallerInternal(installer); + } + } + + public bool HasInstalled() + where T : IInstaller + { + return HasInstalled(typeof(T)); + } + + public bool HasInstalled(Type installerType) + { + return _installedInstallers.Where(x => x == installerType).Any(); + } + + void InstallInstallerInternal(IInstaller installer) + { + var installerType = installer.GetType(); + + Log.Debug("Installing installer '{0}'", installerType); + + Assert.That(!_installsInProgress.Contains(installerType), + "Potential infinite loop detected while installing '{0}'", installerType.Name()); + + Assert.That(!_installedInstallers.Contains(installerType), + "Tried installing installer '{0}' twice", installerType.Name()); + + _installedInstallers.Add(installerType); + _installsInProgress.Push(installerType); + + try + { + installer.InstallBindings(); + } + catch (Exception e) + { + // This context information is really helpful when bind commands fail + throw new Exception( + "Error occurred while running installer '{0}'".Fmt(installer.GetType().Name()), e); + } + finally + { + Assert.That(_installsInProgress.Peek().Equals(installerType)); + _installsInProgress.Pop(); + } + } + + // Try looking up a single provider for a given context + // Note that this method should not throw zenject exceptions + internal ProviderLookupResult TryGetUniqueProvider( + InjectContext context, out ProviderBase provider) + { + // Note that different types can map to the same provider (eg. a base type to a concrete class and a concrete class to itself) + var providers = GetProviderMatchesInternal(context).ToList(); + + if (providers.IsEmpty()) + { + provider = null; + return ProviderLookupResult.None; + } + + if (providers.Count > 1) + { + // If we find multiple providers and we are looking for just one, then + // try to intelligently choose one from the list before giving up + + // First try picking the most 'local' dependencies + // This will bias towards bindings for the lower level specific containers rather than the global high level container + // This will, for example, allow you to just ask for a DiContainer dependency without needing to specify [InjectLocal] + // (otherwise it would always match for a list of DiContainer's for all parent containers) + var sortedProviders = providers.Select(x => new { Pair = x, Distance = GetContainerHeirarchyDistance(x.Container) }).OrderBy(x => x.Distance).ToList(); + + sortedProviders.RemoveAll(x => x.Distance != sortedProviders[0].Distance); + + if (sortedProviders.Count == 1) + { + // We have one match that is the closest + provider = sortedProviders[0].Pair.Provider; + } + else + { + // Try choosing the one with a condition before giving up and throwing an exception + // This is nice because it allows us to bind a default and then override with conditions + provider = sortedProviders.Select(x => x.Pair.Provider).Where(x => x.Condition != null).OnlyOrDefault(); + + if (provider == null) + { + return ProviderLookupResult.Multiple; + } + } + } + else + { + provider = providers.Single().Provider; + } + + Assert.IsNotNull(provider); + return ProviderLookupResult.Success; + } + + // Return single instance of requested type or assert + public object Resolve(InjectContext context) + { + ProviderBase provider; + + var result = TryGetUniqueProvider(context, out provider); + + if (result == ProviderLookupResult.Multiple) + { + throw new ZenjectResolveException( + "Found multiple matches when only one was expected for type '{0}'{1}. \nObject graph:\n {2}" + .Fmt( + context.MemberType.Name(), + (context.ObjectType == null ? "" : " while building object with type '{0}'".Fmt(context.ObjectType.Name())), + context.GetObjectGraphString())); + } + + if (result == ProviderLookupResult.None) + { + // If it's a generic list then try matching multiple instances to its generic type + if (ReflectionUtil.IsGenericList(context.MemberType)) + { + var subType = context.MemberType.GetGenericArguments().Single(); + var subContext = context.ChangeMemberType(subType); + + return ResolveAll(subContext); + } + + if (context.Optional) + { + return context.FallBackValue; + } + + throw new ZenjectResolveException( + "Unable to resolve type '{0}'{1}. \nObject graph:\n{2}" + .Fmt( + context.MemberType.Name() + (context.Identifier == null ? "" : " with ID '" + context.Identifier.ToString() + "'"), + (context.ObjectType == null ? "" : " while building object with type '{0}'".Fmt(context.ObjectType.Name())), + context.GetObjectGraphString())); + } + + Assert.That(result == ProviderLookupResult.Success); + Assert.IsNotNull(provider); + + return SafeGetInstance(provider, context); + } + + object SafeGetInstance(ProviderBase provider, InjectContext context) + { + if (ChecksForCircularDependencies) + { + var lookupId = new LookupId(provider, context.BindingId); + + // Allow one before giving up so that you can do circular dependencies via postinject or fields + if (_resolvesInProgress.Where(x => x.Equals(lookupId)).Count() > 1) + { + throw new ZenjectResolveException( + "Circular dependency detected! \nObject graph:\n {0}".Fmt(context.GetObjectGraphString())); + } + + _resolvesInProgress.Push(lookupId); + try + { + return provider.GetInstance(context); + } + finally + { + Assert.That(_resolvesInProgress.Peek().Equals(lookupId)); + _resolvesInProgress.Pop(); + } + } + else + { + return provider.GetInstance(context); + } + } + + int GetContainerHeirarchyDistance(DiContainer container) + { + return GetContainerHeirarchyDistance(container, 0); + } + + int GetContainerHeirarchyDistance(DiContainer container, int depth) + { + if (container == this) + { + return depth; + } + + Assert.IsNotNull(_parentContainer); + return _parentContainer.GetContainerHeirarchyDistance(container, depth + 1); + } + + public IEnumerable GetDependencyContracts(Type contract) + { + foreach (var injectMember in TypeAnalyzer.GetInfo(contract).AllInjectables) + { + yield return injectMember.MemberType; + } + } + + // Same as Instantiate except you can pass in null value + // however the type for each parameter needs to be explicitly provided in this case + public object InstantiateExplicit( + Type concreteType, List extraArgMap, InjectContext currentContext, string concreteIdentifier, bool autoInject) + { +#if PROFILING_ENABLED + using (ProfileBlock.Start("Zenject.Instantiate({0})", concreteType)) +#endif + { + return InstantiateInternal(concreteType, extraArgMap, currentContext, concreteIdentifier, autoInject); + } + } + + object InstantiateInternal( + Type concreteType, IEnumerable extraArgs, InjectContext currentContext, string concreteIdentifier, bool autoInject) + { +#if !ZEN_NOT_UNITY3D + Assert.That(!concreteType.DerivesFrom(), + "Error occurred while instantiating object of type '{0}'. Instantiator should not be used to create new mono behaviours. Must use InstantiatePrefabForComponent, InstantiatePrefab, InstantiateComponentOnNewGameObject, InstantiateGameObject, or InstantiateComponent. You may also want to use GameObjectFactory class or plain old GameObject.Instantiate.", concreteType.Name()); +#endif + + var typeInfo = TypeAnalyzer.GetInfo(concreteType); + + if (typeInfo.InjectConstructor == null) + { + throw new ZenjectResolveException( + "More than one (or zero) constructors found for type '{0}' when creating dependencies. Use one [Inject] attribute to specify which to use.".Fmt(concreteType)); + } + + // Make a copy since we remove from it below + var extraArgList = extraArgs.ToList(); + var paramValues = new List(); + + foreach (var injectInfo in typeInfo.ConstructorInjectables) + { + object value; + + if (!InstantiateUtil.PopValueWithType(extraArgList, injectInfo.MemberType, out value)) + { + value = Resolve(injectInfo.CreateInjectContext(this, currentContext, null, concreteIdentifier)); + } + + paramValues.Add(value); + } + + object newObj; + + //Log.Debug("Zenject: Instantiating type '{0}'", concreteType.Name()); + try + { +#if PROFILING_ENABLED + using (ProfileBlock.Start("{0}.{0}()", concreteType)) +#endif + { + newObj = typeInfo.InjectConstructor.Invoke(paramValues.ToArray()); + } + } + catch (Exception e) + { + throw new ZenjectResolveException( + "Error occurred while instantiating object with type '{0}'".Fmt(concreteType.Name()), e); + } + + if (autoInject) + { + InjectExplicit(newObj, extraArgList, true, typeInfo, currentContext, concreteIdentifier); + } + else + { + if (!extraArgList.IsEmpty()) + { + throw new ZenjectResolveException( + "Passed unnecessary parameters when injecting into type '{0}'. \nExtra Parameters: {1}\nObject graph:\n{2}" + .Fmt(newObj.GetType().Name(), String.Join(",", extraArgList.Select(x => x.Type.Name()).ToArray()), currentContext.GetObjectGraphString())); + } + } + + return newObj; + } + + // Iterate over fields/properties on the given object and inject any with the [Inject] attribute + public void InjectExplicit( + object injectable, IEnumerable extraArgs, + bool shouldUseAll, ZenjectTypeInfo typeInfo, InjectContext context, string concreteIdentifier) + { + Assert.IsEqual(typeInfo.TypeAnalyzed, injectable.GetType()); + Assert.That(injectable != null); + +#if !ZEN_NOT_UNITY3D + Assert.That(injectable.GetType() != typeof(GameObject), + "Use InjectGameObject to Inject game objects instead of Inject method"); +#endif + + // Make a copy since we remove from it below + var extraArgsList = extraArgs.ToList(); + + foreach (var injectInfo in typeInfo.FieldInjectables.Concat(typeInfo.PropertyInjectables)) + { + object value; + + if (InstantiateUtil.PopValueWithType(extraArgsList, injectInfo.MemberType, out value)) + { + injectInfo.Setter(injectable, value); + } + else + { + value = Resolve( + injectInfo.CreateInjectContext(this, context, injectable, concreteIdentifier)); + + if (injectInfo.Optional && value == null) + { + // Do not override in this case so it retains the hard-coded value + } + else + { + injectInfo.Setter(injectable, value); + } + } + } + + foreach (var method in typeInfo.PostInjectMethods) + { +#if PROFILING_ENABLED + using (ProfileBlock.Start("{0}.{1}()", injectable.GetType(), method.MethodInfo.Name)) +#endif + { + var paramValues = new List(); + + foreach (var injectInfo in method.InjectableInfo) + { + object value; + + if (!InstantiateUtil.PopValueWithType(extraArgsList, injectInfo.MemberType, out value)) + { + value = Resolve( + injectInfo.CreateInjectContext(this, context, injectable, concreteIdentifier)); + } + + paramValues.Add(value); + } + + method.MethodInfo.Invoke(injectable, paramValues.ToArray()); + } + } + + if (shouldUseAll && !extraArgsList.IsEmpty()) + { + throw new ZenjectResolveException( + "Passed unnecessary parameters when injecting into type '{0}'. \nExtra Parameters: {1}\nObject graph:\n{2}" + .Fmt(injectable.GetType().Name(), String.Join(",", extraArgsList.Select(x => x.Type.Name()).ToArray()), context.GetObjectGraphString())); + } + } + +#if !ZEN_NOT_UNITY3D + + // NOTE: gameobject here is not a prefab prototype, it is an instance + public Component InstantiateComponent( + Type componentType, GameObject gameObject, params object[] extraArgMap) + { + Assert.That(componentType.DerivesFrom()); + + var monoBehaviour = (Component)gameObject.AddComponent(componentType); + this.Inject(monoBehaviour, extraArgMap); + return monoBehaviour; + } + + public GameObject InstantiatePrefabResourceExplicit( + string resourcePath, IEnumerable extraArgMap, InjectContext context) + { + return InstantiatePrefabResourceExplicit(resourcePath, extraArgMap, context, false); + } + + public GameObject InstantiatePrefabResourceExplicit( + string resourcePath, IEnumerable extraArgMap, InjectContext context, bool includeInactive) + { + var prefab = (GameObject)Resources.Load(resourcePath); + Assert.IsNotNull(prefab, "Could not find prefab at resource location '{0}'".Fmt(resourcePath)); + return InstantiatePrefabExplicit(prefab, extraArgMap, context, includeInactive); + } + + public GameObject InstantiatePrefabExplicit( + GameObject prefab, IEnumerable extraArgMap, InjectContext context) + { + return InstantiatePrefabExplicit(prefab, extraArgMap, context, false); + } + + public GameObject InstantiatePrefabExplicit( + GameObject prefab, IEnumerable extraArgMap, InjectContext context, bool includeInactive) + { + var gameObj = (GameObject)GameObject.Instantiate(prefab); + + if (_rootTransform != null) + { + // By default parent to comp root + // This is good so that the entire object graph is + // contained underneath it, which is useful for cases + // where you need to delete the entire object graph + gameObj.transform.SetParent(_rootTransform, false); + } + + gameObj.SetActive(true); + + this.InjectGameObject(gameObj, true, includeInactive, extraArgMap, context); + + return gameObj; + } + + // Create a new empty game object under the composition root + public GameObject InstantiateGameObject(string name) + { + var gameObj = new GameObject(name); + + if (_rootTransform != null) + { + gameObj.transform.SetParent(_rootTransform, false); + } + + return gameObj; + } + + public object InstantiateComponentOnNewGameObjectExplicit( + Type componentType, string name, List extraArgMap, InjectContext currentContext) + { + Assert.That(componentType.DerivesFrom(), "Expected type '{0}' to derive from UnityEngine.Component", componentType.Name()); + + var gameObj = new GameObject(name); + + if (_rootTransform != null) + { + gameObj.transform.SetParent(_rootTransform, false); + } + + if (componentType == typeof(Transform)) + { + Assert.That(extraArgMap.IsEmpty()); + return gameObj.transform; + } + + var component = (Component)gameObj.AddComponent(componentType); + + this.InjectExplicit(component, extraArgMap, currentContext); + + return component; + } + + public object InstantiatePrefabResourceForComponentExplicit( + Type componentType, string resourcePath, List extraArgs, InjectContext currentContext) + { + var prefab = (GameObject)Resources.Load(resourcePath); + Assert.IsNotNull(prefab, "Could not find prefab at resource location '{0}'".Fmt(resourcePath)); + return InstantiatePrefabForComponentExplicit( + componentType, prefab, extraArgs, currentContext); + } + + public object InstantiatePrefabForComponentExplicit( + Type componentType, GameObject prefab, List extraArgs, InjectContext currentContext) + { + return InstantiatePrefabForComponentExplicit(componentType, prefab, extraArgs, currentContext, false); + } + + public object InstantiatePrefabForComponentExplicit( + Type componentType, GameObject prefab, List extraArgs, InjectContext currentContext, bool includeInactive) + { + Assert.That(prefab != null, "Null prefab found when instantiating game object"); + + // It could be an interface so this may fail in valid cases so you may want to comment out + // Leaving it in for now to catch the more likely scenario of it being a mistake + Assert.That(componentType.DerivesFrom(), "Expected type '{0}' to derive from UnityEngine.Component", componentType.Name()); + + var gameObj = (GameObject)GameObject.Instantiate(prefab); + + if (_rootTransform != null) + { + // By default parent to comp root + // This is good so that the entire object graph is + // contained underneath it, which is useful for cases + // where you need to delete the entire object graph + gameObj.transform.SetParent(_rootTransform, false); + } + + gameObj.SetActive(true); + + Component requestedScript = null; + + // Inject on the children first since the parent objects are more likely to use them in their post inject methods + foreach (var component in UnityUtil.GetComponentsInChildrenBottomUp(gameObj, includeInactive)) + { + if (component != null) + { + if (component.GetType().DerivesFromOrEqual(componentType)) + { + Assert.IsNull(requestedScript, + "Found multiple matches with type '{0}' when instantiating new game object from prefab '{1}'", componentType, prefab.name); + requestedScript = component; + + this.InjectExplicit(component, extraArgs); + } + else + { + this.Inject(component); + } + } + else + { + Log.Warn("Found null component while instantiating prefab '{0}'. Possible missing script.", prefab.name); + } + } + + if (requestedScript == null) + { + throw new ZenjectResolveException( + "Could not find component with type '{0}' when instantiating new game object".Fmt(componentType)); + } + + return requestedScript; + } +#endif + + ////////////// Convenience methods for IInstantiator //////////////// + + public T Instantiate( + params object[] extraArgs) + { + return (T)Instantiate(typeof(T), extraArgs); + } + + public object Instantiate( + Type concreteType, params object[] extraArgs) + { + Assert.That(!extraArgs.ContainsItem(null), + "Null value given to factory constructor arguments when instantiating object with type '{0}'. In order to use null use InstantiateExplicit", concreteType); + + return InstantiateExplicit( + concreteType, InstantiateUtil.CreateTypeValueList(extraArgs)); + } + + // This is used instead of Instantiate to support specifying null values + public T InstantiateExplicit( + List extraArgMap) + { + return (T)InstantiateExplicit(typeof(T), extraArgMap); + } + + public T InstantiateExplicit( + List extraArgMap, InjectContext context) + { + return (T)InstantiateExplicit( + typeof(T), extraArgMap, context); + } + + public object InstantiateExplicit( + Type concreteType, List extraArgMap) + { + return InstantiateExplicit( + concreteType, extraArgMap, new InjectContext(this, concreteType, null)); + } + + public object InstantiateExplicit( + Type concreteType, List extraArgMap, InjectContext context) + { + return InstantiateExplicit( + concreteType, extraArgMap, context, null, true); + } + +#if !ZEN_NOT_UNITY3D + public TContract InstantiateComponent( + GameObject gameObject, params object[] args) + where TContract : Component + { + return (TContract)InstantiateComponent(typeof(TContract), gameObject, args); + } + + public GameObject InstantiatePrefab( + GameObject prefab, params object[] args) + { + return InstantiatePrefabExplicit(prefab, args, null); + } + + public GameObject InstantiatePrefab( + bool includeInactive, GameObject prefab, params object[] args) + { + return InstantiatePrefabExplicit(prefab, args, null, includeInactive); + } + + public GameObject InstantiatePrefabResource( + string resourcePath, params object[] args) + { + return InstantiatePrefabResourceExplicit(resourcePath, args, null, false); + } + + public GameObject InstantiatePrefabResource( + bool includeInactive, string resourcePath, params object[] args) + { + return InstantiatePrefabResourceExplicit(resourcePath, args, null, includeInactive); + } + + /////////////// InstantiatePrefabForComponent + + public T InstantiatePrefabForComponent( + GameObject prefab, params object[] extraArgs) + { + return (T)InstantiatePrefabForComponent(typeof(T), prefab, extraArgs); + } + + public object InstantiatePrefabForComponent( + Type concreteType, GameObject prefab, params object[] extraArgs) + { + Assert.That(!extraArgs.ContainsItem(null), + "Null value given to factory constructor arguments when instantiating object with type '{0}'. In order to use null use InstantiatePrefabForComponentExplicit", concreteType); + + return InstantiatePrefabForComponentExplicit( + concreteType, prefab, InstantiateUtil.CreateTypeValueList(extraArgs)); + } + + public T InstantiatePrefabForComponent( + bool includeInactive, GameObject prefab, params object[] extraArgs) + { + return (T)InstantiatePrefabForComponent(includeInactive, typeof(T), prefab, extraArgs); + } + + public object InstantiatePrefabForComponent( + bool includeInactive, Type concreteType, GameObject prefab, params object[] extraArgs) + { + Assert.That(!extraArgs.Contains(null), + "Null value given to factory constructor arguments when instantiating object with type '{0}'. In order to use null use InstantiatePrefabForComponentExplicit", concreteType); + + return InstantiatePrefabForComponentExplicit( + concreteType, prefab, + InstantiateUtil.CreateTypeValueList(extraArgs), + new InjectContext(this, concreteType, null), includeInactive); + } + + // This is used instead of Instantiate to support specifying null values + public T InstantiatePrefabForComponentExplicit( + GameObject prefab, List extraArgMap) + { + return (T)InstantiatePrefabForComponentExplicit(typeof(T), prefab, extraArgMap); + } + + public object InstantiatePrefabForComponentExplicit( + Type concreteType, GameObject prefab, List extraArgMap) + { + return InstantiatePrefabForComponentExplicit( + concreteType, prefab, extraArgMap, new InjectContext(this, concreteType, null)); + } + + + /////////////// InstantiatePrefabForComponent + + public T InstantiatePrefabResourceForComponent( + string resourcePath, params object[] extraArgs) + { + return (T)InstantiatePrefabResourceForComponent(typeof(T), resourcePath, extraArgs); + } + + public object InstantiatePrefabResourceForComponent( + Type concreteType, string resourcePath, params object[] extraArgs) + { + Assert.That(!extraArgs.ContainsItem(null), + "Null value given to factory constructor arguments when instantiating object with type '{0}'. In order to use null use InstantiatePrefabForComponentExplicit", concreteType); + + return InstantiatePrefabResourceForComponentExplicit( + concreteType, resourcePath, InstantiateUtil.CreateTypeValueList(extraArgs)); + } + + // This is used instead of Instantiate to support specifying null values + public T InstantiatePrefabResourceForComponentExplicit( + string resourcePath, List extraArgMap) + { + return (T)InstantiatePrefabResourceForComponentExplicit(typeof(T), resourcePath, extraArgMap); + } + + public object InstantiatePrefabResourceForComponentExplicit( + Type concreteType, string resourcePath, List extraArgMap) + { + return InstantiatePrefabResourceForComponentExplicit( + concreteType, resourcePath, extraArgMap, new InjectContext(this, concreteType, null)); + } + + /////////////// InstantiateComponentOnNewGameObject + + public T InstantiateComponentOnNewGameObject( + string name, params object[] extraArgs) + { + return (T)InstantiateComponentOnNewGameObject(typeof(T), name, extraArgs); + } + + public object InstantiateComponentOnNewGameObject( + Type concreteType, string name, params object[] extraArgs) + { + Assert.That(!extraArgs.ContainsItem(null), + "Null value given to factory constructor arguments when instantiating object with type '{0}'. In order to use null use InstantiateComponentOnNewGameObjectExplicit", concreteType); + + return InstantiateComponentOnNewGameObjectExplicit( + concreteType, name, InstantiateUtil.CreateTypeValueList(extraArgs)); + } + + // This is used instead of Instantiate to support specifying null values + public T InstantiateComponentOnNewGameObjectExplicit( + string name, List extraArgMap) + { + return (T)InstantiateComponentOnNewGameObjectExplicit(typeof(T), name, extraArgMap); + } + + public object InstantiateComponentOnNewGameObjectExplicit( + Type concreteType, string name, List extraArgMap) + { + return InstantiateComponentOnNewGameObjectExplicit( + concreteType, name, extraArgMap, new InjectContext(this, concreteType, null)); + } +#endif + + ////////////// Convenience methods for IResolver //////////////// + +#if !ZEN_NOT_UNITY3D + // Inject dependencies into child game objects + public void InjectGameObject( + GameObject gameObject, bool recursive, bool includeInactive) + { + InjectGameObject(gameObject, recursive, includeInactive, Enumerable.Empty()); + } + + public void InjectGameObject( + GameObject gameObject, bool recursive) + { + InjectGameObject(gameObject, recursive, false); + } + + public void InjectGameObject( + GameObject gameObject) + { + InjectGameObject(gameObject, true, false); + } + + public void InjectGameObject( + GameObject gameObject, + bool recursive, bool includeInactive, IEnumerable extraArgs) + { + InjectGameObject( + gameObject, recursive, includeInactive, extraArgs, null); + } + + public void InjectGameObject( + GameObject gameObject, + bool recursive, bool includeInactive, IEnumerable extraArgs, InjectContext context) + { + IEnumerable components; + + if (recursive) + { + components = UnityUtil.GetComponentsInChildrenBottomUp(gameObject, includeInactive); + } + else + { + if (!includeInactive && !gameObject.activeSelf) + { + return; + } + + components = gameObject.GetComponents(); + } + + foreach (var component in components) + { + // null if monobehaviour link is broken + // Do not inject on installers since these are always injected before they are installed + if (component != null && !component.GetType().DerivesFrom()) + { + Inject(component, extraArgs, false, context); + } + } + } +#endif + + public void Inject(object injectable) + { + Inject(injectable, Enumerable.Empty()); + } + + public void Inject(object injectable, IEnumerable additional) + { + Inject(injectable, additional, true); + } + + public void Inject(object injectable, IEnumerable additional, bool shouldUseAll) + { + Inject( + injectable, additional, shouldUseAll, new InjectContext(this, injectable.GetType(), null)); + } + + public void Inject( + object injectable, IEnumerable additional, bool shouldUseAll, InjectContext context) + { + Inject( + injectable, additional, shouldUseAll, context, TypeAnalyzer.GetInfo(injectable.GetType())); + } + + public void Inject( + object injectable, + IEnumerable additional, bool shouldUseAll, InjectContext context, ZenjectTypeInfo typeInfo) + { + Assert.That(!additional.ContainsItem(null), + "Null value given to injection argument list. In order to use null you must provide a List and not just a list of objects"); + + InjectExplicit( + injectable, InstantiateUtil.CreateTypeValueList(additional), shouldUseAll, typeInfo, context, null); + } + + public void InjectExplicit(object injectable, List additional) + { + InjectExplicit( + injectable, additional, new InjectContext(this, injectable.GetType(), null)); + } + + public void InjectExplicit(object injectable, List additional, InjectContext context) + { + InjectExplicit( + injectable, additional, true, + TypeAnalyzer.GetInfo(injectable.GetType()), context, null); + } + + public List ResolveTypeAll(Type type) + { + return ResolveTypeAll(new InjectContext(this, type, null)); + } + + public TContract Resolve() + { + return Resolve((string)null); + } + + public TContract Resolve(string identifier) + { + return Resolve(new InjectContext(this, typeof(TContract), identifier)); + } + + public TContract TryResolve() + where TContract : class + { + return TryResolve((string)null); + } + + public TContract TryResolve(string identifier) + where TContract : class + { + return (TContract)TryResolve(typeof(TContract), identifier); + } + + public object TryResolve(Type contractType) + { + return TryResolve(contractType, null); + } + + public object TryResolve(Type contractType, string identifier) + { + return Resolve(new InjectContext(this, contractType, identifier, true)); + } + + public object Resolve(Type contractType) + { + return Resolve(new InjectContext(this, contractType, null)); + } + + public object Resolve(Type contractType, string identifier) + { + return Resolve(new InjectContext(this, contractType, identifier)); + } + + public TContract Resolve(InjectContext context) + { + Assert.IsEqual(context.MemberType, typeof(TContract)); + return (TContract) Resolve(context); + } + + public List ResolveAll() + { + return ResolveAll((string)null); + } + + public List ResolveAll(bool optional) + { + return ResolveAll(null, optional); + } + + public List ResolveAll(string identifier) + { + return ResolveAll(identifier, false); + } + + public List ResolveAll(string identifier, bool optional) + { + var context = new InjectContext(this, typeof(TContract), identifier, optional); + return ResolveAll(context); + } + + public List ResolveAll(InjectContext context) + { + Assert.IsEqual(context.MemberType, typeof(TContract)); + return (List) ResolveAll(context); + } + + public IList ResolveAll(Type contractType) + { + return ResolveAll(contractType, null); + } + + public IList ResolveAll(Type contractType, string identifier) + { + return ResolveAll(contractType, identifier, false); + } + + public IList ResolveAll(Type contractType, bool optional) + { + return ResolveAll(contractType, null, optional); + } + + public IList ResolveAll(Type contractType, string identifier, bool optional) + { + var context = new InjectContext(this, contractType, identifier, optional); + return ResolveAll(context); + } + + ////////////// IBinder //////////////// + + public bool Unbind(string identifier) + { + List providersToRemove; + var bindingId = new BindingId(typeof(TContract), identifier); + + if (_providers.TryGetValue(bindingId, out providersToRemove)) + { + _providers.Remove(bindingId); + + // Only dispose if the provider is not bound to another type + foreach (var provider in providersToRemove) + { + if (_providers.Where(x => x.Value.ContainsItem(provider)).IsEmpty()) + { + provider.Dispose(); + } + } + + return true; + } + + return false; + } + + public BindingConditionSetter BindInstance(string identifier, TContract obj) + { + return Bind(identifier).ToInstance(obj); + } + + public BindingConditionSetter BindInstance(TContract obj) + { + return Bind().ToInstance(obj); + } + + public GenericBinder Bind() + { + return Bind(null); + } + + public UntypedBinder Bind(Type contractType) + { + return Bind(contractType, null); + } + + public bool Unbind() + { + return Unbind(null); + } + + public bool HasBinding(InjectContext context) + { + List providers; + + if (!_providers.TryGetValue(context.BindingId, out providers)) + { + return false; + } + + return providers.Where(x => x.Matches(context)).HasAtLeast(1); + } + + public bool HasBinding() + { + return HasBinding(null); + } + + public bool HasBinding(string identifier) + { + return HasBinding( + new InjectContext(this, typeof(TContract), identifier)); + } + + public void BindAllInterfacesToSingle() + { + BindAllInterfacesToSingle(typeof(TConcrete)); + } + + public void BindAllInterfacesToSingle(Type concreteType) + { + foreach (var interfaceType in concreteType.GetInterfaces()) + { + Assert.That(concreteType.DerivesFrom(interfaceType)); + Bind(interfaceType).ToSingle(concreteType); + } + } + + public void BindAllInterfacesToInstance(object value) + { + BindAllInterfacesToInstance(value.GetType(), value); + } + + public void BindAllInterfacesToInstance(Type concreteType, object value) + { + Assert.That((value == null && IsValidating) || value.GetType().DerivesFromOrEqual(concreteType)); + + foreach (var interfaceType in concreteType.GetInterfaces()) + { + Assert.That(concreteType.DerivesFrom(interfaceType)); + Bind(interfaceType).ToInstance(concreteType, value); + } + } + + public IFactoryUntypedBinder BindIFactoryUntyped(string identifier) + { + return new IFactoryUntypedBinder(this, identifier); + } + + public IFactoryUntypedBinder BindIFactoryUntyped() + { + return BindIFactoryUntyped(null); + } + + public IFactoryBinder BindIFactory(string identifier) + { + return new IFactoryBinder(this, identifier); + } + + public IFactoryBinder BindIFactory() + { + return BindIFactory(null); + } + + public IFactoryBinder BindIFactory(string identifier) + { + return new IFactoryBinder(this, identifier); + } + + public IFactoryBinder BindIFactory() + { + return BindIFactory(null); + } + + public IFactoryBinder BindIFactory(string identifier) + { + return new IFactoryBinder(this, identifier); + } + + public IFactoryBinder BindIFactory() + { + return BindIFactory(null); + } + + public IFactoryBinder BindIFactory(string identifier) + { + return new IFactoryBinder(this, identifier); + } + + public IFactoryBinder BindIFactory() + { + return BindIFactory(null); + } + + public IFactoryBinder BindIFactory(string identifier) + { + return new IFactoryBinder(this, identifier); + } + + public IFactoryBinder BindIFactory() + { + return BindIFactory(null); + } + + public GenericBinder Rebind() + { + this.Unbind(); + return this.Bind(); + } + + public GenericBinder Bind(string identifier) + { + Assert.That(!typeof(TContract).DerivesFromOrEqual(), + "Deprecated usage of Bind, use Install instead"); + return new GenericBinder(this, identifier, _singletonMap); + } + + public FacadeBinder BindFacade(Action installerFunc) + where TFacade : IFacade + { + return BindFacade(installerFunc, null); + } + + public FacadeBinder BindFacade( + Action installerFunc, string identifier) + where TFacade : IFacade + { + return new FacadeBinder(this, identifier, installerFunc); + } + + // Note that this can include open generic types as well such as List<> + public UntypedBinder Bind(Type contractType, string identifier) + { + Assert.That(!contractType.DerivesFromOrEqual(), + "Deprecated usage of Bind, use Install instead"); + return new UntypedBinder(this, contractType, identifier, _singletonMap); + } + +#if !ZEN_NOT_UNITY3D + public BindingConditionSetter BindGameObjectFactory( + GameObject prefab) + // This would be useful but fails with VerificationException's in webplayer builds for some reason + //where T : GameObjectFactory + where T : class + { + if (prefab == null) + { + throw new ZenjectBindException( + "Null prefab provided to BindGameObjectFactory for type '{0}'".Fmt(typeof(T).Name())); + } + + // We could bind the factory ToSingle but doing it this way is better + // since it allows us to have multiple game object factories that + // use different prefabs and have them injected into different places + return Bind().ToMethod((ctx) => ctx.Container.Instantiate(prefab)); + } +#endif + + public BindingConditionSetter BindFacadeFactory( + Action facadeInstaller) + where TFacade : IFacade + where TFacadeFactory : FacadeFactory + { + return this.Bind().ToMethod( + x => x.Container.Instantiate(facadeInstaller)); + } + + public BindingConditionSetter BindFacadeFactory( + Action facadeInstaller) + where TFacade : IFacade + where TFacadeFactory : FacadeFactory + { + return this.Bind().ToMethod( + x => x.Container.Instantiate(facadeInstaller)); + } + + public BindingConditionSetter BindFacadeFactory( + Action facadeInstaller) + where TFacade : IFacade + where TFacadeFactory : FacadeFactory + { + return this.Bind().ToMethod( + x => x.Container.Instantiate(facadeInstaller)); + } + + public BindingConditionSetter BindFacadeFactory( + Action facadeInstaller) + where TFacade : IFacade + where TFacadeFactory : FacadeFactory + { + return this.Bind().ToMethod( + x => x.Container.Instantiate(facadeInstaller)); + } + + ////////////// Other //////////////// + + // Walk the object graph for the given type + // Should never throw an exception - returns them instead + // Note: If you just want to know whether a binding exists for the given TContract, + // use HasBinding instead + public IEnumerable ValidateResolve(InjectContext context) + { + ProviderBase provider = null; + var result = TryGetUniqueProvider(context, out provider); + + if (result == DiContainer.ProviderLookupResult.Success) + { + Assert.IsNotNull(provider); + + if (ChecksForCircularDependencies) + { + var lookupId = new LookupId(provider, context.BindingId); + + // Allow one before giving up so that you can do circular dependencies via postinject or fields + if (_resolvesInProgress.Where(x => x.Equals(lookupId)).Count() > 1) + { + yield return new ZenjectResolveException( + "Circular dependency detected! \nObject graph:\n {0}".Fmt(context.GetObjectGraphString())); + } + + _resolvesInProgress.Push(lookupId); + try + { + foreach (var error in provider.ValidateBinding(context)) + { + yield return error; + } + } + finally + { + Assert.That(_resolvesInProgress.Peek().Equals(lookupId)); + _resolvesInProgress.Pop(); + } + } + else + { + foreach (var error in provider.ValidateBinding(context)) + { + yield return error; + } + } + } + else if (result == DiContainer.ProviderLookupResult.Multiple) + { + yield return new ZenjectResolveException( + "Found multiple matches when only one was expected for dependency with type '{0}'{1} \nObject graph:\n{2}" + .Fmt( + context.MemberType.Name(), + (context.ObjectType == null ? "" : " when injecting into '{0}'".Fmt(context.ObjectType.Name())), + context.GetObjectGraphString())); + } + else + { + Assert.That(result == DiContainer.ProviderLookupResult.None); + + if (ReflectionUtil.IsGenericList(context.MemberType)) + { + var subType = context.MemberType.GetGenericArguments().Single(); + var subContext = context.ChangeMemberType(subType); + + var matches = GetAllProviderMatches(subContext); + + if (matches.IsEmpty()) + { + if (!context.Optional) + { + yield return new ZenjectResolveException( + "Could not find dependency with type 'List(0)'{1}. If the empty list is also valid, you can allow this by using the [InjectOptional] attribute.' \nObject graph:\n{2}" + .Fmt( + subContext.MemberType.Name(), + (context.ObjectType == null ? "" : " when injecting into '{0}'".Fmt(context.ObjectType.Name())), + context.GetObjectGraphString())); + } + } + else + { + foreach (var match in matches) + { + foreach (var error in match.ValidateBinding(context)) + { + yield return error; + } + } + } + } + else + { + if (!context.Optional) + { + yield return new ZenjectResolveException( + "Could not find required dependency with type '{0}'{1} \nObject graph:\n{2}" + .Fmt( + context.MemberType.Name(), + (context.ObjectType == null ? "" : " when injecting into '{0}'".Fmt(context.ObjectType.Name())), + context.GetObjectGraphString())); + } + } + } + } + + public IEnumerable ValidateObjectGraph(params Type[] extras) + { + return ValidateObjectGraph(typeof(TConcrete), extras); + } + + public IEnumerable ValidateObjectGraph(InjectContext context, params Type[] extras) + { + return ValidateObjectGraph(typeof(TConcrete), context, extras); + } + + public IEnumerable ValidateObjectGraph( + Type contractType, params Type[] extras) + { + return ValidateObjectGraph( + contractType, new InjectContext(this, contractType), extras); + } + + public IEnumerable ValidateObjectGraph( + Type contractType, InjectContext context, params Type[] extras) + { + return ValidateObjectGraph( + contractType, context, null, extras); + } + + public IEnumerable ValidateObjectGraph( + Type concreteType, InjectContext currentContext, string concreteIdentifier, params Type[] extras) + { + if (concreteType.IsAbstract) + { + throw new ZenjectResolveException( + "Expected contract type '{0}' to be non-abstract".Fmt(concreteType.Name())); + } + + var typeInfo = TypeAnalyzer.GetInfo(concreteType); + var extrasList = extras.ToList(); + + foreach (var dependInfo in typeInfo.AllInjectables) + { + Assert.IsEqual(dependInfo.ObjectType, concreteType); + + if (TryTakingFromExtras(dependInfo.MemberType, extrasList)) + { + continue; + } + + var context = dependInfo.CreateInjectContext(this, currentContext, null, concreteIdentifier); + + foreach (var error in ValidateResolve(context)) + { + yield return error; + } + } + + if (!extrasList.IsEmpty()) + { + yield return new ZenjectResolveException( + "Found unnecessary extra parameters passed when injecting into '{0}' with types '{1}'. \nObject graph:\n{2}" + .Fmt(concreteType.Name(), String.Join(",", extrasList.Select(x => x.Name()).ToArray()), currentContext.GetObjectGraphString())); + } + } + + bool TryTakingFromExtras(Type contractType, List extrasList) + { + foreach (var extraType in extrasList) + { + if (extraType.DerivesFromOrEqual(contractType)) + { + var removed = extrasList.Remove(extraType); + Assert.That(removed); + return true; + } + } + + return false; + } + + ////////////// Types //////////////// + + class ProviderPair + { + public readonly ProviderBase Provider; + public readonly DiContainer Container; + + public ProviderPair( + ProviderBase provider, + DiContainer container) + { + Provider = provider; + Container = container; + } + } + + public enum ProviderLookupResult + { + Success, + Multiple, + None + } + + struct LookupId + { + public readonly ProviderBase Provider; + public readonly BindingId BindingId; + + public LookupId( + ProviderBase provider, BindingId bindingId) + { + Provider = provider; + BindingId = bindingId; + } + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Main/DiContainer.cs.meta b/UnityProject/Assets/Zenject/Source/Main/DiContainer.cs.meta new file mode 100644 index 000000000..7caddf2ca --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/DiContainer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 218c26b8969545b44acb0a21117f5d10 +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/GlobalCompositionRoot.cs b/UnityProject/Assets/Zenject/Source/Main/GlobalCompositionRoot.cs new file mode 100644 index 000000000..b11f8186f --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/GlobalCompositionRoot.cs @@ -0,0 +1,101 @@ +#if !ZEN_NOT_UNITY3D + +#pragma warning disable 414 +using ModestTree; + +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace Zenject +{ + public sealed class GlobalCompositionRoot : CompositionRoot + { + static GlobalCompositionRoot _instance; + DiContainer _container; + IFacade _rootFacade; + bool _hasInitialized; + + public const string GlobalInstallersResourceName = "ZenjectGlobalInstallers"; + + public override DiContainer Container + { + get + { + return _container; + } + } + + public override IFacade RootFacade + { + get + { + return _rootFacade; + } + } + + public static GlobalCompositionRoot Instance + { + get + { + if (_instance == null) + { + _instance = new GameObject("Global Composition Root") + .AddComponent(); + } + return _instance; + } + } + + protected override void Initialize() + { + DontDestroyOnLoad(gameObject); + + // Is this a good idea? + //go.hideFlags = HideFlags.HideInHierarchy; + + _container = CreateContainer(false, this); + _rootFacade = _container.Resolve(); + } + + public void InitializeRootIfNecessary() + { + if (!_hasInitialized) + { + _hasInitialized = true; + _rootFacade.Initialize(); + } + } + + public static DiContainer CreateContainer(bool isValidating, GlobalCompositionRoot root) + { + Assert.That(isValidating || root != null); + + var container = new DiContainer(root == null ? null : root.transform); + + container.IsValidating = isValidating; + + container.Bind().ToInstance(root); + container.Bind().ToInstance(root); + + container.Install(); + + container.Install(GetGlobalInstallers()); + + return container; + } + + static IEnumerable GetGlobalInstallers() + { + // For backwards compatibility include the old name + var installerConfigs1 = Resources.LoadAll("ZenjectGlobalCompositionRoot", typeof(GlobalInstallerConfig)); + + var installerConfigs2 = Resources.LoadAll(GlobalInstallersResourceName, typeof(GlobalInstallerConfig)); + + return installerConfigs1.Concat(installerConfigs2).Cast().SelectMany(x => x.Installers).Cast(); + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Main/GlobalCompositionRoot.cs.meta b/UnityProject/Assets/Zenject/Source/Main/GlobalCompositionRoot.cs.meta new file mode 100644 index 000000000..a37cf3f3c --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/GlobalCompositionRoot.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a4e6589720da476459dc6dd71624b071 +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: -9999 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/GlobalInstallerConfig.cs b/UnityProject/Assets/Zenject/Source/Main/GlobalInstallerConfig.cs new file mode 100644 index 000000000..6af4490a3 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/GlobalInstallerConfig.cs @@ -0,0 +1,19 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using UnityEngine; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public sealed class GlobalInstallerConfig : ScriptableObject + { + // We can refer directly to the prefabs in this case because the properties of the installers should not change + // You could do the same for the scene composition root installers BUT this is error prone since the prefab + // may change at run time (for eg. if another scene injects a property into it) so it's often better + // to copy the installer prefabs into your scene + public MonoInstaller[] Installers; + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Main/GlobalInstallerConfig.cs.meta b/UnityProject/Assets/Zenject/Source/Main/GlobalInstallerConfig.cs.meta new file mode 100644 index 000000000..79f43287a --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/GlobalInstallerConfig.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cd6e1e73473c3d14e9ecd75348863ab9 +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/IBinder.cs b/UnityProject/Assets/Zenject/Source/Main/IBinder.cs new file mode 100644 index 000000000..887454249 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/IBinder.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using ModestTree.Util; + +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + public interface IBinder + { + bool Unbind(string identifier); + + bool HasBinding(InjectContext context); + + UntypedBinder Bind(Type contractType, string identifier); + GenericBinder Bind(string identifier); + + GenericBinder Rebind(); + + IFactoryBinder BindIFactory(string identifier); + IFactoryBinder BindIFactory(); + + IFactoryBinder BindIFactory(string identifier); + IFactoryBinder BindIFactory(); + + IFactoryBinder BindIFactory(string identifier); + IFactoryBinder BindIFactory(); + + IFactoryBinder BindIFactory(string identifier); + IFactoryBinder BindIFactory(); + + IFactoryBinder BindIFactory(string identifier); + IFactoryBinder BindIFactory(); + + IFactoryUntypedBinder BindIFactoryUntyped(string identifier); + IFactoryUntypedBinder BindIFactoryUntyped(); + + BindingConditionSetter BindInstance(string identifier, TContract obj); + BindingConditionSetter BindInstance(TContract obj); + + GenericBinder Bind(); + + UntypedBinder Bind(Type contractType); + + bool Unbind(); + + bool HasBinding(); + + bool HasBinding(string identifier); + + void BindAllInterfacesToSingle(); + + void BindAllInterfacesToSingle(Type concreteType); + + void BindAllInterfacesToInstance(object value); + void BindAllInterfacesToInstance(Type concreteType, object value); + + BindingConditionSetter BindFacadeFactory( + Action facadeInstaller) + where TFacade : IFacade + where TFacadeFactory : FacadeFactory; + + BindingConditionSetter BindFacadeFactory( + Action facadeInstaller) + where TFacade : IFacade + where TFacadeFactory : FacadeFactory; + + BindingConditionSetter BindFacadeFactory( + Action facadeInstaller) + where TFacade : IFacade + where TFacadeFactory : FacadeFactory ; + + BindingConditionSetter BindFacadeFactory( + Action facadeInstaller) + where TFacade : IFacade + where TFacadeFactory : FacadeFactory; + +#if !ZEN_NOT_UNITY3D + BindingConditionSetter BindGameObjectFactory( + GameObject prefab) + // This would be useful but fails with VerificationException's in webplayer builds for some reason + //where T : GameObjectFactory + where T : class; +#endif + } +} + diff --git a/UnityProject/Assets/Zenject/Source/Main/IBinder.cs.meta b/UnityProject/Assets/Zenject/Source/Main/IBinder.cs.meta new file mode 100644 index 000000000..f6aba5c50 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/IBinder.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: aa44f5b63d8a9144dbbcf8bbed0d5bd6 +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/IInstaller.cs b/UnityProject/Assets/Zenject/Source/Main/IInstaller.cs new file mode 100644 index 000000000..4b8fc4063 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/IInstaller.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Zenject +{ + // We extract the interface so that monobehaviours can be installers + public interface IInstaller + { + void InstallBindings(); + + bool IsEnabled + { + get; + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Main/IInstaller.cs.meta b/UnityProject/Assets/Zenject/Source/Main/IInstaller.cs.meta new file mode 100644 index 000000000..9531d795c --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/IInstaller.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c7bc5972f7137ca41865b44335290d8b +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/IInstantiator.cs b/UnityProject/Assets/Zenject/Source/Main/IInstantiator.cs new file mode 100644 index 000000000..824acdb0d --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/IInstantiator.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + public interface IInstantiator + { + // Use this method to create any non-monobehaviour + T Instantiate(params object[] extraArgs); + object Instantiate(Type concreteType, params object[] extraArgs); + + // This is used instead of Instantiate to support specifying null values + T InstantiateExplicit(List extraArgMap); + + object InstantiateExplicit(Type concreteType, List extraArgMap); + + // For most cases you can pass in currentContext and concreteIdentifier as null + object InstantiateExplicit( + Type concreteType, List extraArgMap, InjectContext currentContext, string concreteIdentifier, bool autoInject); + +#if !ZEN_NOT_UNITY3D + + // Create a new game object from a given prefab + // Without returning any particular monobehaviour + // If you want to retrieve a specific monobehaviour use InstantiatePrefabForComponent + GameObject InstantiatePrefabExplicit( + GameObject prefab, IEnumerable extraArgMap, InjectContext currentContext); + + GameObject InstantiatePrefabExplicit( + GameObject prefab, IEnumerable extraArgMap, InjectContext currentContext, bool includeInactive); + + // Instantiate an empty game object and then add a component to it of type 'componentType' + object InstantiateComponentOnNewGameObjectExplicit( + Type componentType, string name, List extraArgMap, InjectContext currentContext); + + // Add new monobehaviour to existing game object and fill in its dependencies + // NOTE: Gameobject here is not a prefab prototype, it is an instance + Component InstantiateComponent( + Type componentType, GameObject gameObject, params object[] extraArgMap); + + TContract InstantiateComponent( + GameObject gameObject, params object[] args) + where TContract : Component; + + // Create a new empty game object under the root transform + GameObject InstantiateGameObject(string name); + + // Create a new game object from a prefab and fill in dependencies for all children + GameObject InstantiatePrefab( + GameObject prefab, params object[] args); + + GameObject InstantiatePrefab( + bool includeInactive, GameObject prefab, params object[] args); + + // Create a new game object from a resource path and fill in dependencies for all children + GameObject InstantiatePrefabResource( + string resourcePath, params object[] args); + + GameObject InstantiatePrefabResource( + bool includeInactive, string resourcePath, params object[] args); + + GameObject InstantiatePrefabResourceExplicit( + string resourcePath, IEnumerable extraArgMap, InjectContext context); + + GameObject InstantiatePrefabResourceExplicit( + string resourcePath, IEnumerable extraArgMap, InjectContext context, bool includeInactive); + + /////////////// InstantiatePrefabForComponent + + // Same as InstantiatePrefab but returns a component after it's initialized + + T InstantiatePrefabForComponent( + GameObject prefab, params object[] extraArgs); + + T InstantiatePrefabForComponent( + bool includeInactive, GameObject prefab, params object[] extraArgs); + + object InstantiatePrefabForComponent( + Type concreteType, GameObject prefab, params object[] extraArgs); + + object InstantiatePrefabForComponent( + bool includeInactive, Type concreteType, GameObject prefab, params object[] extraArgs); + + // This is used instead of Instantiate to support specifying null values + T InstantiatePrefabForComponentExplicit( + GameObject prefab, List extraArgMap); + + object InstantiatePrefabForComponentExplicit( + Type concreteType, GameObject prefab, List extraArgMap); + + // Instantiate the given prefab, inject on all MonoBehaviours, then return the instance of 'componentType' + // Any arguments supplied are assumed to be used as extra parameters into 'componentType' + object InstantiatePrefabForComponentExplicit( + Type componentType, GameObject prefab, List extraArgMap, InjectContext currentContext); + + object InstantiatePrefabForComponentExplicit( + Type componentType, GameObject prefab, List extraArgMap, InjectContext currentContext, bool includeInactive); + + /////////////// InstantiatePrefabResourceForComponent + + T InstantiatePrefabResourceForComponent( + string resourcePath, params object[] extraArgs); + + object InstantiatePrefabResourceForComponent( + Type concreteType, string resourcePath, params object[] extraArgs); + + // This is used instead of Instantiate to support specifying null values + T InstantiatePrefabResourceForComponentExplicit( + string resourcePath, List extraArgMap); + + object InstantiatePrefabResourceForComponentExplicit( + Type concreteType, string resourcePath, List extraArgMap); + + /////////////// InstantiateComponentOnNewGameObject + // Create a new game object, and add the given component to it, and fill in dependencies + + T InstantiateComponentOnNewGameObject( + string name, params object[] extraArgs); + + object InstantiateComponentOnNewGameObject( + Type concreteType, string name, params object[] extraArgs); + + // This is used instead of Instantiate to support specifying null values + T InstantiateComponentOnNewGameObjectExplicit( + string name, List extraArgMap); + + object InstantiateComponentOnNewGameObjectExplicit( + Type concreteType, string name, List extraArgMap); +#endif + } +} + diff --git a/UnityProject/Assets/Zenject/Source/Main/IInstantiator.cs.meta b/UnityProject/Assets/Zenject/Source/Main/IInstantiator.cs.meta new file mode 100644 index 000000000..65579bd23 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/IInstantiator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c4c83bb8bd8d56b4586b194e8d48eb0b +timeCreated: 1435941959 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/IResolver.cs b/UnityProject/Assets/Zenject/Source/Main/IResolver.cs new file mode 100644 index 000000000..3fbb7c45c --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/IResolver.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using ModestTree.Util; + +#if !ZEN_NOT_UNITY3D +using UnityEngine; +#endif + +namespace Zenject +{ + public interface IResolver + { + IList ResolveAll(InjectContext context); + + List ResolveTypeAll(InjectContext context); + + object Resolve(InjectContext context); + + void InjectExplicit( + object injectable, IEnumerable extraArgs, + bool shouldUseAll, ZenjectTypeInfo typeInfo, InjectContext context, string concreteIdentifier); + +#if !ZEN_NOT_UNITY3D + // Inject dependencies into child game objects + void InjectGameObject( + GameObject gameObject, bool recursive, bool includeInactive); + + void InjectGameObject( + GameObject gameObject, bool recursive); + + void InjectGameObject( + GameObject gameObject); + + void InjectGameObject( + GameObject gameObject, + bool recursive, bool includeInactive, IEnumerable extraArgs); + + void InjectGameObject( + GameObject gameObject, + bool recursive, bool includeInactive, IEnumerable extraArgs, InjectContext context); +#endif + + void Inject(object injectable); + void Inject(object injectable, IEnumerable additional); + void Inject(object injectable, IEnumerable additional, bool shouldUseAll); + void Inject( + object injectable, IEnumerable additional, bool shouldUseAll, InjectContext context); + void Inject( + object injectable, + IEnumerable additional, bool shouldUseAll, InjectContext context, ZenjectTypeInfo typeInfo); + + void InjectExplicit(object injectable, List additional); + void InjectExplicit(object injectable, List additional, InjectContext context); + + List ResolveTypeAll(Type type); + + TContract Resolve(); + TContract Resolve(string identifier); + + TContract TryResolve() + where TContract : class; + TContract TryResolve(string identifier) + where TContract : class; + + object TryResolve(Type contractType); + object TryResolve(Type contractType, string identifier); + + object Resolve(Type contractType); + object Resolve(Type contractType, string identifier); + + TContract Resolve(InjectContext context); + + List ResolveAll(); + List ResolveAll(bool optional); + List ResolveAll(string identifier); + List ResolveAll(string identifier, bool optional); + List ResolveAll(InjectContext context); + + IList ResolveAll(Type contractType); + IList ResolveAll(Type contractType, string identifier); + IList ResolveAll(Type contractType, bool optional); + IList ResolveAll(Type contractType, string identifier, bool optional); + } +} diff --git a/UnityProject/Assets/Zenject/Source/Main/IResolver.cs.meta b/UnityProject/Assets/Zenject/Source/Main/IResolver.cs.meta new file mode 100644 index 000000000..2f4de3a36 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/IResolver.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fb265bfd419fad646a958f57c573bc36 +timeCreated: 1435941959 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/Installer.cs b/UnityProject/Assets/Zenject/Source/Main/Installer.cs new file mode 100644 index 000000000..1834df3f6 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/Installer.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public abstract class Installer : IInstaller + { + [Inject] + DiContainer _container = null; + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual bool IsEnabled + { + get + { + return true; + } + } + + public abstract void InstallBindings(); + } +} diff --git a/UnityProject/Assets/Zenject/Source/Main/Installer.cs.meta b/UnityProject/Assets/Zenject/Source/Main/Installer.cs.meta new file mode 100644 index 000000000..99d1a70a0 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/Installer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 836f872b95d552044bccb74109d14edd +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/Main.meta b/UnityProject/Assets/Zenject/Source/Main/Main.meta deleted file mode 100644 index 5bdc60968..000000000 --- a/UnityProject/Assets/Zenject/Source/Main/Main.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: b5f870edd43b85f4dae7b77cc0d75b46 -folderAsset: yes -DefaultImporter: - userData: diff --git a/UnityProject/Assets/Zenject/Source/Main/MonoInstaller.cs b/UnityProject/Assets/Zenject/Source/Main/MonoInstaller.cs new file mode 100644 index 000000000..6813a94aa --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/MonoInstaller.cs @@ -0,0 +1,41 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public abstract class MonoInstaller : MonoBehaviour, IInstaller + { + [Inject] + DiContainer _container = null; + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual bool IsEnabled + { + get + { + return this.enabled; + } + } + + public virtual void Start() + { + // Define this method so we expose the enabled check box + } + + public abstract void InstallBindings(); + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Main/MonoInstaller.cs.meta b/UnityProject/Assets/Zenject/Source/Main/MonoInstaller.cs.meta new file mode 100644 index 000000000..7ac971b72 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/MonoInstaller.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 93c066c2bc4e4274286fd686bd1df664 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/SceneCompositionRoot.cs b/UnityProject/Assets/Zenject/Source/Main/SceneCompositionRoot.cs new file mode 100644 index 000000000..e5d550479 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/SceneCompositionRoot.cs @@ -0,0 +1,159 @@ +#if !ZEN_NOT_UNITY3D + +#pragma warning disable 414 +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using ModestTree.Util; +using UnityEngine; + +#if UNITY_5_3 +using UnityEngine.SceneManagement; +#endif + +namespace Zenject +{ + public sealed class SceneCompositionRoot : CompositionRoot + { + public static Action BeforeInstallHooks; + public static Action AfterInstallHooks; + + public bool OnlyInjectWhenActive = false; + + [SerializeField] + public MonoInstaller[] Installers = new MonoInstaller[0]; + + DiContainer _container; + IFacade _rootFacade = null; + + static List _staticInstallers = new List(); + + public override DiContainer Container + { + get + { + return _container; + } + } + + public override IFacade RootFacade + { + get + { + return _rootFacade; + } + } + + string GetCurrentSceneName() + { +#if UNITY_5_3 + return SceneManager.GetActiveScene().name; +#else + return Application.loadedLevelName; +#endif + } + + protected override void Initialize() + { + Log.Debug("Initializing SceneCompositionRoot in scene '{0}'", GetCurrentSceneName()); + InitContainer(); + Log.Debug("SceneCompositionRoot: Finished install phase. Injecting into scene..."); + InitialInject(); + + Log.Debug("SceneCompositionRoot: Resolving root IFacade..."); + _rootFacade = _container.Resolve(); + } + + public void Start() + { + // Always run the IInitializable's at the very beginning of Start() + // This file (SceneCompositionRoot) should always have the earliest execution order (see SceneCompositionRoot.cs.meta) + // This is necessary in some edge cases where parts of Unity do not work the same during Awake() as they do in Start/Update + // For example, changing rectTransform.localPosition does not automatically update rectTransform.position in some cases + // Also, most people treat Awake() as very minimal initialization, such as setting up a valid state for the + // object, initializing variables, etc. and treat Start() as the place where more complex initialization occurs, + // so this is consistent with that convention as well + GlobalCompositionRoot.Instance.InitializeRootIfNecessary(); + _rootFacade.Initialize(); + } + + // This method is used for cases where you need to create the SceneCompositionRoot entirely in code + // Necessary because the Awake() method is called immediately after AddComponent + // so there's no other way to add installers to it + public static SceneCompositionRoot AddComponent( + GameObject gameObject, IInstaller rootInstaller) + { + return AddComponent(gameObject, new List() { rootInstaller }); + } + + public static SceneCompositionRoot AddComponent( + GameObject gameObject, List installers) + { + Assert.That(_staticInstallers.IsEmpty()); + _staticInstallers.AddRange(installers); + return gameObject.AddComponent(); + } + + void InitContainer() + { + _container = CreateContainer( + false, GlobalCompositionRoot.Instance.Container, _staticInstallers); + _staticInstallers.Clear(); + } + + void InitialInject() + { + var rootGameObjects = GameObject.FindObjectsOfType() + .Where(x => x.parent == null && x.GetComponent() == null && (x.GetComponent() == null || x == this.transform)) + .Select(x => x.gameObject).ToList(); + + foreach (var rootObj in rootGameObjects) + { + _container.InjectGameObject(rootObj, true, !OnlyInjectWhenActive); + } + } + + public DiContainer CreateContainer( + bool isValidating, DiContainer parentContainer, List extraInstallers) + { + var container = new DiContainer(this.transform, parentContainer); + + container.IsValidating = isValidating; + + container.Bind().ToInstance(this); + container.Bind().ToInstance(this); + + if (BeforeInstallHooks != null) + { + BeforeInstallHooks(container); + // Reset extra bindings for next time we change scenes + BeforeInstallHooks = null; + } + + container.Install(); + + var allInstallers = extraInstallers.Concat(Installers).ToList(); + + if (allInstallers.Where(x => x != null).IsEmpty()) + { + Log.Warn("No installers found while initializing SceneCompositionRoot"); + } + else + { + container.Install(allInstallers); + } + + if (AfterInstallHooks != null) + { + AfterInstallHooks(container); + // Reset extra bindings for next time we change scenes + AfterInstallHooks = null; + } + + return container; + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Main/SceneCompositionRoot.cs.meta b/UnityProject/Assets/Zenject/Source/Main/SceneCompositionRoot.cs.meta new file mode 100644 index 000000000..31599a8e8 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Main/SceneCompositionRoot.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 89715ad69b973a14899afa2c6730b30b +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: -9998 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/Misc.meta b/UnityProject/Assets/Zenject/Source/Misc.meta similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Misc.meta rename to UnityProject/Assets/Zenject/Source/Misc.meta diff --git a/UnityProject/Assets/Zenject/Source/Misc/DisposableManager.cs b/UnityProject/Assets/Zenject/Source/Misc/DisposableManager.cs new file mode 100644 index 000000000..21ba1fabb --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/DisposableManager.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using ModestTree.Util; + +namespace Zenject +{ + public class DisposableManager : IDisposable + { + readonly SingletonInstanceHelper _singletonInstanceHelper; + readonly List _disposables = new List(); + bool _disposed; + + public DisposableManager( + [InjectLocalOptional] + List disposables, + [InjectLocalOptional] + List> priorities, + SingletonInstanceHelper singletonInstanceHelper) + { + _singletonInstanceHelper = singletonInstanceHelper; + + foreach (var disposable in disposables) + { + // Note that we use zero for unspecified priority + // This is nice because you can use negative or positive for before/after unspecified + var matches = priorities.Where(x => disposable.GetType().DerivesFromOrEqual(x.First)).Select(x => x.Second).ToList(); + int priority = matches.IsEmpty() ? 0 : matches.Single(); + + _disposables.Add(new DisposableInfo(disposable, priority)); + } + + Log.Debug("Loaded {0} IDisposables to DisposablesHandler", _disposables.Count()); + } + + public void Add(IDisposable disposable) + { + Add(disposable, 0); + } + + public void Add(IDisposable disposable, int priority) + { + _disposables.Add( + new DisposableInfo(disposable, priority)); + } + + public void Remove(IDisposable disposable) + { + _disposables.RemoveWithConfirm( + _disposables.Where(x => x.Disposable == disposable).Single()); + } + + public void Dispose() + { + Assert.That(!_disposed); + _disposed = true; + + // Dispose in the reverse order that they are initialized in + var disposablesOrdered = _disposables.OrderBy(x => x.Priority).Reverse().ToList(); + + //WarnForMissingBindings(); + + foreach (var disposable in disposablesOrdered.Select(x => x.Disposable).GetDuplicates()) + { + Assert.That(false, "Found duplicate IDisposable with type '{0}'".Fmt(disposable.GetType())); + } + + foreach (var disposable in disposablesOrdered) + { + Log.Debug("Disposing '" + disposable.Disposable.GetType() + "'"); + + try + { + disposable.Disposable.Dispose(); + } + catch (Exception e) + { + throw new ZenjectException( + "Error occurred while disposing IDisposable with type '{0}'".Fmt(disposable.Disposable.GetType().Name()), e); + } + } + + Log.Debug("Disposed of {0} disposables in DisposablesHandler", disposablesOrdered.Count()); + } + + void WarnForMissingBindings() + { + var ignoredTypes = new Type[] { typeof(DisposableManager) }; + var boundTypes = _disposables.Select(x => x.Disposable.GetType()).Distinct(); + + var unboundTypes = _singletonInstanceHelper.GetActiveSingletonTypesDerivingFrom(boundTypes.Concat(ignoredTypes)); + + foreach (var objType in unboundTypes) + { + Log.Warn("Found unbound IDisposable with type '" + objType.Name() + "'"); + } + } + + class DisposableInfo + { + public IDisposable Disposable; + public int Priority; + + public DisposableInfo(IDisposable disposable, int priority) + { + Disposable = disposable; + Priority = priority; + } + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Misc/DisposableManager.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/DisposableManager.cs.meta new file mode 100644 index 000000000..2bb92a77a --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/DisposableManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: eba259abcb586ff4aa65a56616189018 +timeCreated: 1435941959 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Misc/ExecutionOrderInstaller.cs b/UnityProject/Assets/Zenject/Source/Misc/ExecutionOrderInstaller.cs new file mode 100644 index 000000000..6620377fb --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/ExecutionOrderInstaller.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using Zenject; +using ModestTree; +using ModestTree.Util; + +namespace Zenject +{ + public class ExecutionOrderInstaller : Installer + { + List _typeOrder; + + public ExecutionOrderInstaller(List typeOrder) + { + _typeOrder = typeOrder; + } + + public override void InstallBindings() + { + // All tickables without explicit priorities assigned are given priority of zero, + // so put all of these before that (ie. negative) + int priorityCount = -1 * _typeOrder.Count; + + foreach (var type in _typeOrder) + { + BindPriority(Container, type, priorityCount); + priorityCount++; + } + } + + public static void BindPriority( + DiContainer container, int priorityCount) + { + BindPriority(container, typeof(T), priorityCount); + } + + public static void BindPriority( + DiContainer container, Type type, int priority) + { + Assert.That(type.DerivesFrom() || type.DerivesFrom() || type.DerivesFrom(), + "Expected type '{0}' to derive from ITickable, IInitializable, or IDisposable", type.Name()); + + if (type.DerivesFrom()) + { + container.Bind>().ToInstance( + ModestTree.Util.Tuple.New(type, priority)).WhenInjectedInto(); + } + + if (type.DerivesFrom()) + { + container.Bind>().ToInstance( + ModestTree.Util.Tuple.New(type, priority)).WhenInjectedInto(); + } + + if (type.DerivesFrom()) + { + container.Bind>().ToInstance( + ModestTree.Util.Tuple.New(type, priority)).WhenInjectedInto(); + } + } + } +} + diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/CommandExtensions.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/ExecutionOrderInstaller.cs.meta similarity index 75% rename from UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/CommandExtensions.cs.meta rename to UnityProject/Assets/Zenject/Source/Misc/ExecutionOrderInstaller.cs.meta index 0ee98c7bf..c43539c7a 100644 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/CommandExtensions.cs.meta +++ b/UnityProject/Assets/Zenject/Source/Misc/ExecutionOrderInstaller.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 72687553845562744b81c881963240ce -timeCreated: 1450373896 +guid: 9c585ab8209d85742a15173d57d6d9ed +timeCreated: 1446576147 licenseType: Pro MonoImporter: serializedVersion: 2 diff --git a/UnityProject/Assets/Zenject/Source/Misc/FixedTickablePrioritiesInstaller.cs b/UnityProject/Assets/Zenject/Source/Misc/FixedTickablePrioritiesInstaller.cs new file mode 100644 index 000000000..945dc63df --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/FixedTickablePrioritiesInstaller.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using Zenject; +using ModestTree; +using ModestTree.Util; + +namespace Zenject +{ + public class FixedTickablePrioritiesInstaller : Installer + { + List _tickables; + + public FixedTickablePrioritiesInstaller( + List tickables) + { + _tickables = tickables; + } + + public override void InstallBindings() + { + int priorityCount = 1; + + foreach (var tickableType in _tickables) + { + BindPriority(Container, tickableType, priorityCount); + priorityCount++; + } + } + + public static void BindPriority( + DiContainer container, Type tickableType, int priorityCount) + { + Assert.That(tickableType.DerivesFrom(), + "Expected type '{0}' to derive from IFixedTickable", tickableType.Name()); + + container.Bind>("Fixed").ToInstance( + ModestTree.Util.Tuple.New(tickableType, priorityCount)).WhenInjectedInto(); + } + } +} + diff --git a/UnityProject/Assets/Zenject/Source/Misc/FixedTickablePrioritiesInstaller.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/FixedTickablePrioritiesInstaller.cs.meta new file mode 100644 index 000000000..10f8e4880 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/FixedTickablePrioritiesInstaller.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5bed292415dd4d64c918479fff254cea +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Misc/IInitializable.cs b/UnityProject/Assets/Zenject/Source/Misc/IInitializable.cs new file mode 100644 index 000000000..199fa5f39 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/IInitializable.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Security.Permissions; + +namespace Zenject +{ + public interface IInitializable + { + void Initialize(); + } +} diff --git a/UnityProject/Assets/Zenject/Source/Misc/IInitializable.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/IInitializable.cs.meta new file mode 100644 index 000000000..d28f9116a --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/IInitializable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b3ca5dfc879ec9a40b4747bcaeccae44 +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Misc/ITickable.cs b/UnityProject/Assets/Zenject/Source/Misc/ITickable.cs new file mode 100644 index 000000000..dd4e76f4d --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/ITickable.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using System.Linq; + +namespace Zenject +{ + public interface ITickable + { + void Tick(); + } + + public interface IFixedTickable + { + void FixedTick(); + } + + public interface ILateTickable + { + void LateTick(); + } +} + diff --git a/UnityProject/Assets/Zenject/Source/Misc/ITickable.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/ITickable.cs.meta new file mode 100644 index 000000000..c9f348ed1 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/ITickable.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2e7fe39708b5a3a499fcda1dde5b9ad1 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Misc/InitializableManager.cs b/UnityProject/Assets/Zenject/Source/Misc/InitializableManager.cs new file mode 100644 index 000000000..97595935d --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/InitializableManager.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using ModestTree.Util; + +namespace Zenject +{ + // Responsibilities: + // - Run Initialize() on all Iinitializable's, in the order specified by InitPriority + public class InitializableManager + { + readonly SingletonInstanceHelper _singletonInstanceHelper = null; + + List _initializables = new List(); + + public InitializableManager( + [InjectLocalOptional] + List initializables, + [InjectLocalOptional] + List> priorities, + DiContainer container, + SingletonInstanceHelper singletonInstanceHelper) + { + _singletonInstanceHelper = singletonInstanceHelper; + + WarnForMissingBindings(initializables, container); + + foreach (var initializable in initializables) + { + // Note that we use zero for unspecified priority + // This is nice because you can use negative or positive for before/after unspecified + var matches = priorities.Where(x => initializable.GetType().DerivesFromOrEqual(x.First)).Select(x => x.Second).ToList(); + int priority = matches.IsEmpty() ? 0 : matches.Single(); + + _initializables.Add(new InitializableInfo(initializable, priority)); + } + } + + void WarnForMissingBindings(List initializables, DiContainer container) + { + var boundTypes = initializables.Select(x => x.GetType()).Distinct(); + var unboundTypes = _singletonInstanceHelper.GetActiveSingletonTypesDerivingFrom(boundTypes); + + foreach (var objType in unboundTypes) + { + Log.Warn("Found unbound IInitializable with type '" + objType.Name() + "'"); + } + } + + public void Initialize() + { + _initializables = _initializables.OrderBy(x => x.Priority).ToList(); + + foreach (var initializable in _initializables.Select(x => x.Initializable).GetDuplicates()) + { + Assert.That(false, "Found duplicate IInitializable with type '{0}'".Fmt(initializable.GetType())); + } + + foreach (var initializable in _initializables) + { + Log.Debug("Initializing '" + initializable.Initializable.GetType() + "'"); + + try + { +#if PROFILING_ENABLED + using (ProfileBlock.Start("{0}.Initialize()", initializable.Initializable.GetType().Name())) +#endif + { + initializable.Initializable.Initialize(); + } + } + catch (Exception e) + { + throw new ZenjectException( + "Error occurred while initializing IInitializable with type '{0}'".Fmt(initializable.Initializable.GetType().Name()), e); + } + } + } + + class InitializableInfo + { + public IInitializable Initializable; + public int Priority; + + public InitializableInfo(IInitializable initializable, int priority) + { + Initializable = initializable; + Priority = priority; + } + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Misc/InitializableManager.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/InitializableManager.cs.meta new file mode 100644 index 000000000..45359b5f9 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/InitializableManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9e5434b9933a02e48872e02177bcfc59 +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Misc/KernelUtil.cs b/UnityProject/Assets/Zenject/Source/Misc/KernelUtil.cs new file mode 100644 index 000000000..fe432c793 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/KernelUtil.cs @@ -0,0 +1,20 @@ +using System; +using ModestTree; +using ModestTree.Util; + +namespace Zenject +{ + public static class KernelUtil + { + public static void BindTickable(DiContainer container, int priority) where TTickable : ITickable + { + container.Bind().ToSingle(); + BindTickablePriority(container, priority); + } + + public static void BindTickablePriority(DiContainer container, int priority) + { + container.Bind>().ToInstance(ModestTree.Util.Tuple.New(typeof(TTickable), priority)); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Misc/KernelUtil.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/KernelUtil.cs.meta new file mode 100644 index 000000000..03a84d39b --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/KernelUtil.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1c2492de004be304f8130e9ae2a320df +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Misc/LateTickablePrioritiesInstaller.cs b/UnityProject/Assets/Zenject/Source/Misc/LateTickablePrioritiesInstaller.cs new file mode 100644 index 000000000..035dea6b7 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/LateTickablePrioritiesInstaller.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using Zenject; +using ModestTree; +using ModestTree.Util; + +namespace Zenject +{ + public class LateTickablePrioritiesInstaller : Installer + { + List _tickables; + + public LateTickablePrioritiesInstaller(List tickables) + { + _tickables = tickables; + } + + public override void InstallBindings() + { + // All tickables without explicit priorities assigned are given priority of zero, + // so put all of these before that (ie. negative) + int priorityCount = -1 * _tickables.Count; + + foreach (var tickableType in _tickables) + { + BindPriority(Container, tickableType, priorityCount); + priorityCount++; + } + } + + public static void BindPriority( + DiContainer container, int priorityCount) + where T : ILateTickable + { + BindPriority(container, typeof(T), priorityCount); + } + + public static void BindPriority( + DiContainer container, Type tickableType, int priorityCount) + { + Assert.That(tickableType.DerivesFrom(), + "Expected type '{0}' to derive from ILateTickable", tickableType.Name()); + + container.Bind>("Late").ToInstance( + ModestTree.Util.Tuple.New(tickableType, priorityCount)).WhenInjectedInto(); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Misc/LateTickablePrioritiesInstaller.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/LateTickablePrioritiesInstaller.cs.meta new file mode 100644 index 000000000..ecfdab01f --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/LateTickablePrioritiesInstaller.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ce1a98485a18f024aaf78681912c3e52 +timeCreated: 1442511020 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Misc/SingletonInstanceHelper.cs b/UnityProject/Assets/Zenject/Source/Misc/SingletonInstanceHelper.cs new file mode 100644 index 000000000..50c39b911 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/SingletonInstanceHelper.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class SingletonInstanceHelper + { +#if !ZEN_NOT_UNITY3D + [Inject] + readonly PrefabSingletonProviderMap _prefabSingletonProviderMap = null; +#endif + + [Inject] + readonly SingletonProviderMap _singletonProviderMap = null; + + public IEnumerable GetActiveSingletonTypesDerivingFrom( + IEnumerable ignoreTypes) + { + var unboundTypes = _singletonProviderMap.Creators + .Select(x => x.GetInstanceType()) + .Where(x => x.DerivesFrom()) + .Where(x => !x.DerivesFrom()) + .Where(x => !ignoreTypes.ContainsItem(x)); + +#if ZEN_NOT_UNITY3D + return unboundTypes.Distinct(); +#else + var unboundPrefabTypes = _prefabSingletonProviderMap.Creators + .SelectMany(x => x.GetAllComponentTypes()) + .Where(x => x.DerivesFrom()) + .Where(x => !ignoreTypes.ContainsItem(x)); + + return unboundTypes.Concat(unboundPrefabTypes).Distinct(); +#endif + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Misc/SingletonInstanceHelper.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/SingletonInstanceHelper.cs.meta new file mode 100644 index 000000000..1265ba693 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/SingletonInstanceHelper.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c8c99d7c7b4c8f24d957bae272a4b8a0 +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Misc/StandardInstaller.cs b/UnityProject/Assets/Zenject/Source/Misc/StandardInstaller.cs new file mode 100644 index 000000000..332d1533b --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/StandardInstaller.cs @@ -0,0 +1,24 @@ +using System; +using System.Linq; + +namespace Zenject +{ + public class StandardInstaller : Installer + where TRoot : IFacade + { + // Install basic functionality for most unity apps + public override void InstallBindings() + { + Container.Bind().ToSingle(); + Container.Bind().ToSingle(); + + Container.Bind().ToSingle(); + Container.Bind().ToSingle(); + Container.Bind().ToSingle(); + } + } + + public class StandardInstaller : StandardInstaller + { + } +} diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/Command.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/StandardInstaller.cs.meta similarity index 75% rename from UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/Command.cs.meta rename to UnityProject/Assets/Zenject/Source/Misc/StandardInstaller.cs.meta index eb0b3ac06..223dd94d5 100644 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/Command.cs.meta +++ b/UnityProject/Assets/Zenject/Source/Misc/StandardInstaller.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 2fd2a32a7cb36664cb3a6f05b1ba9bca -timeCreated: 1450373896 +guid: a7d4254673829684cad664c75b6217b7 +timeCreated: 1446589958 licenseType: Pro MonoImporter: serializedVersion: 2 diff --git a/UnityProject/Assets/Zenject/Source/Misc/TaskUpdater.cs b/UnityProject/Assets/Zenject/Source/Misc/TaskUpdater.cs new file mode 100644 index 000000000..e2e3e9e8e --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/TaskUpdater.cs @@ -0,0 +1,190 @@ +using System; +using System.Collections.Generic; +using ModestTree.Util; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + // Update tasks once per frame based on a priority + [System.Diagnostics.DebuggerStepThrough] + public abstract class TaskUpdater + { + readonly LinkedList _tasks = new LinkedList(); + readonly List _queuedTasks = new List(); + + IEnumerable AllTasks + { + get + { + return ActiveTasks.Concat(_queuedTasks); + } + } + + IEnumerable ActiveTasks + { + get + { + return _tasks; + } + } + + public void AddTask(TTask task, int priority) + { + AddTaskInternal(task, priority); + } + + void AddTaskInternal(TTask task, int priority) + { + Assert.That(!AllTasks.Select(x => x.Task).ContainsItem(task), + "Duplicate task added to kernel with name '" + task.GetType().FullName + "'"); + + // Wait until next frame to add the task, otherwise whether it gets updated + // on the current frame depends on where in the update order it was added + // from, so you might get off by one frame issues + _queuedTasks.Add(new TaskInfo(task, priority)); + } + + public void RemoveTask(TTask task) + { + var info = AllTasks.Where(x => ReferenceEquals(x.Task, task)).Single(); + + Assert.That(!info.IsRemoved, "Tried to remove task twice, task = " + task.GetType().Name); + info.IsRemoved = true; + } + + public void OnFrameStart() + { + // See above comment + AddQueuedTasks(); + } + + public void UpdateAll() + { + UpdateRange(int.MinValue, int.MaxValue); + } + + public void UpdateRange(int minPriority, int maxPriority) + { + var node = _tasks.First; + + while (node != null) + { + var next = node.Next; + var taskInfo = node.Value; + + // Make sure that tasks with priority of int.MaxValue are updated when maxPriority is int.MaxValue + if (!taskInfo.IsRemoved && taskInfo.Priority >= minPriority + && (maxPriority == int.MaxValue || taskInfo.Priority < maxPriority)) + { + UpdateItem(taskInfo.Task); + } + + node = next; + } + + ClearRemovedTasks(_tasks); + } + + void ClearRemovedTasks(LinkedList tasks) + { + var node = tasks.First; + + while (node != null) + { + var next = node.Next; + var info = node.Value; + + if (info.IsRemoved) + { + //Log.Debug("Removed task '" + info.Task.GetType().ToString() + "'"); + tasks.Remove(node); + } + + node = next; + } + } + + void AddQueuedTasks() + { + for (int i = 0; i < _queuedTasks.Count; i++) + { + var task = _queuedTasks[i]; + + if (!task.IsRemoved) + { + InsertTaskSorted(task); + } + } + _queuedTasks.Clear(); + } + + void InsertTaskSorted(TaskInfo task) + { + for (var current = _tasks.First; current != null; current = current.Next) + { + if (current.Value.Priority > task.Priority) + { + _tasks.AddBefore(current, task); + return; + } + } + + _tasks.AddLast(task); + } + + protected abstract void UpdateItem(TTask task); + + class TaskInfo + { + public TTask Task; + public int Priority; + public bool IsRemoved; + + public TaskInfo(TTask task, int priority) + { + Task = task; + Priority = priority; + } + } + } + + public class TickablesTaskUpdater : TaskUpdater + { + protected override void UpdateItem(ITickable task) + { +#if PROFILING_ENABLED + using (ProfileBlock.Start("{0}.Tick()".Fmt(task.GetType().Name()))) +#endif + { + task.Tick(); + } + } + } + + public class LateTickablesTaskUpdater : TaskUpdater + { + protected override void UpdateItem(ILateTickable task) + { +#if PROFILING_ENABLED + using (ProfileBlock.Start("{0}.LateTick()".Fmt(task.GetType().Name()))) +#endif + { + task.LateTick(); + } + } + } + + public class FixedTickablesTaskUpdater : TaskUpdater + { + protected override void UpdateItem(IFixedTickable task) + { +#if PROFILING_ENABLED + using (ProfileBlock.Start("{0}.FixedTick()".Fmt(task.GetType().Name()))) +#endif + { + task.FixedTick(); + } + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Misc/TaskUpdater.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/TaskUpdater.cs.meta new file mode 100644 index 000000000..8a1b9453d --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/TaskUpdater.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bf4796a68f44e114bb4f327f62721c10 +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Misc/TickableManager.cs b/UnityProject/Assets/Zenject/Source/Misc/TickableManager.cs new file mode 100644 index 000000000..e48f4fb38 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/TickableManager.cs @@ -0,0 +1,191 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using ModestTree.Util; + +namespace Zenject +{ + public class TickableManager + { + [InjectLocalOptional] + readonly List _tickables = null; + + [InjectLocalOptional] + readonly List _fixedTickables = null; + + [InjectLocalOptional] + readonly List _lateTickables = null; + + [InjectLocalOptional] + readonly List> _priorities = null; + + [InjectLocalOptional("Fixed")] + readonly List> _fixedPriorities = null; + + [InjectLocalOptional("Late")] + readonly List> _latePriorities = null; + + [Inject] + readonly SingletonInstanceHelper _singletonInstanceHelper = null; + + readonly TickablesTaskUpdater _updater = new TickablesTaskUpdater(); + readonly FixedTickablesTaskUpdater _fixedUpdater = new FixedTickablesTaskUpdater(); + readonly LateTickablesTaskUpdater _lateUpdater = new LateTickablesTaskUpdater(); + + [InjectOptional] + bool _warnForMissing = false; + + public IEnumerable Tickables + { + get + { + return _tickables; + } + } + + [PostInject] + public void Initialize() + { + InitTickables(); + InitFixedTickables(); + InitLateTickables(); + + if (_warnForMissing) + { + WarnForMissingBindings(); + } + } + + void WarnForMissingBindings() + { + var ignoreTypes = _tickables.Select(x => x.GetType()).Distinct(); + var unboundTypes = _singletonInstanceHelper.GetActiveSingletonTypesDerivingFrom(ignoreTypes); + + foreach (var objType in unboundTypes) + { + Log.Warn("Found unbound ITickable with type '" + objType.Name() + "'"); + } + } + + void InitFixedTickables() + { + foreach (var type in _fixedPriorities.Select(x => x.First)) + { + Assert.That(type.DerivesFrom(), + "Expected type '{0}' to drive from IFixedTickable while checking priorities in TickableHandler", type.Name()); + } + + foreach (var tickable in _fixedTickables) + { + // Note that we use zero for unspecified priority + // This is nice because you can use negative or positive for before/after unspecified + var matches = _fixedPriorities.Where(x => tickable.GetType().DerivesFromOrEqual(x.First)).Select(x => x.Second).ToList(); + int priority = matches.IsEmpty() ? 0 : matches.Single(); + + _fixedUpdater.AddTask(tickable, priority); + } + } + + void InitTickables() + { + foreach (var type in _priorities.Select(x => x.First)) + { + Assert.That(type.DerivesFrom(), + "Expected type '{0}' to drive from ITickable while checking priorities in TickableHandler", type.Name()); + } + + foreach (var tickable in _tickables) + { + // Note that we use zero for unspecified priority + // This is nice because you can use negative or positive for before/after unspecified + var matches = _priorities.Where(x => tickable.GetType().DerivesFromOrEqual(x.First)).Select(x => x.Second).ToList(); + int priority = matches.IsEmpty() ? 0 : matches.Single(); + + _updater.AddTask(tickable, priority); + } + } + + void InitLateTickables() + { + foreach (var type in _latePriorities.Select(x => x.First)) + { + Assert.That(type.DerivesFrom(), + "Expected type '{0}' to drive from ILateTickable while checking priorities in TickableHandler", type.Name()); + } + + foreach (var tickable in _lateTickables) + { + // Note that we use zero for unspecified priority + // This is nice because you can use negative or positive for before/after unspecified + var matches = _latePriorities.Where(x => tickable.GetType().DerivesFromOrEqual(x.First)).Select(x => x.Second).ToList(); + int priority = matches.IsEmpty() ? 0 : matches.Single(); + + _lateUpdater.AddTask(tickable, priority); + } + } + + public void Add(ITickable tickable, int priority) + { + _updater.AddTask(tickable, priority); + } + + public void Add(ITickable tickable) + { + Add(tickable, 0); + } + + public void AddLate(ILateTickable tickable, int priority) + { + _lateUpdater.AddTask(tickable, priority); + } + + public void AddLate(ILateTickable tickable) + { + AddLate(tickable, 0); + } + + public void AddFixed(IFixedTickable tickable, int priority) + { + _fixedUpdater.AddTask(tickable, priority); + } + + public void AddFixed(IFixedTickable tickable) + { + _fixedUpdater.AddTask(tickable, 0); + } + + public void Remove(ITickable tickable) + { + _updater.RemoveTask(tickable); + } + + public void RemoveLate(ILateTickable tickable) + { + _lateUpdater.RemoveTask(tickable); + } + + public void RemoveFixed(IFixedTickable tickable) + { + _fixedUpdater.RemoveTask(tickable); + } + + public void Update() + { + _updater.OnFrameStart(); + _updater.UpdateAll(); + } + + public void FixedUpdate() + { + _fixedUpdater.OnFrameStart(); + _fixedUpdater.UpdateAll(); + } + + public void LateUpdate() + { + _lateUpdater.OnFrameStart(); + _lateUpdater.UpdateAll(); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Misc/TickableManager.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/TickableManager.cs.meta new file mode 100644 index 000000000..4eae6ed44 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/TickableManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 10bf111e01df1804ca6e8f13e610c7a2 +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Misc/UnityEventManager.cs b/UnityProject/Assets/Zenject/Source/Misc/UnityEventManager.cs new file mode 100644 index 000000000..13ccd1d26 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/UnityEventManager.cs @@ -0,0 +1,151 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using ModestTree.Util; +using UnityEngine; + +namespace Zenject +{ + // Note: this corresponds to the values expected in + // Input.GetMouseButtonDown() and similar methods + public enum MouseButtons + { + Left, + Right, + Middle, + None, + } + + [System.Diagnostics.DebuggerStepThrough] + public class UnityEventManager : MonoBehaviour, ITickable + { + public event Action ApplicationGainedFocus = delegate { }; + public event Action ApplicationLostFocus = delegate { }; + public event Action ApplicationFocusChanged = delegate { }; + public event Action ApplicationQuit = delegate { }; + public event Action ChangingScenes = delegate { }; + public event Action DrawGizmos = delegate { }; + public event Action MouseButtonDown = delegate { }; + public event Action MouseButtonUp = delegate { }; + public event Action LeftMouseButtonDown = delegate { }; + public event Action LeftMouseButtonUp = delegate { }; + public event Action MiddleMouseButtonDown = delegate { }; + public event Action MiddleMouseButtonUp = delegate { }; + public event Action RightMouseButtonDown = delegate { }; + public event Action RightMouseButtonUp = delegate { }; + public event Action MouseMoved = delegate { }; + public event Action ScreenSizeChanged = delegate { }; + public event Action Started = delegate { }; + public event Action MouseWheelMoved = delegate { }; + + Vector3 _lastMousePosition; + + int _lastWidth; + int _lastHeight; + + public bool IsFocused + { + get; + private set; + } + + void Start() + { + _lastWidth = Screen.width; + _lastHeight = Screen.height; + Started(); + } + + public void Tick() + { + if (Input.GetMouseButtonDown((int)MouseButtons.Left)) + { + LeftMouseButtonDown(); + MouseButtonDown(MouseButtons.Left); + } + else if (Input.GetMouseButtonUp((int)MouseButtons.Left)) + { + LeftMouseButtonUp(); + MouseButtonUp(MouseButtons.Left); + } + + if (Input.GetMouseButtonDown((int)MouseButtons.Right)) + { + RightMouseButtonDown(); + MouseButtonDown(MouseButtons.Right); + } + else if (Input.GetMouseButtonUp((int)MouseButtons.Right)) + { + RightMouseButtonUp(); + MouseButtonUp(MouseButtons.Right); + } + + if (Input.GetMouseButtonDown((int)MouseButtons.Middle)) + { + MiddleMouseButtonDown(); + MouseButtonDown(MouseButtons.Middle); + } + else if (Input.GetMouseButtonUp((int)MouseButtons.Middle)) + { + MiddleMouseButtonUp(); + MouseButtonUp(MouseButtons.Middle); + } + + if (_lastMousePosition != Input.mousePosition) + { + _lastMousePosition = Input.mousePosition; + MouseMoved(); + } + + // By default this event returns 1/10 for each discrete rotation + // so correct that + var mouseWheelDelta = 10.0f * Input.GetAxis("Mouse ScrollWheel"); + + if (!Mathf.Approximately(mouseWheelDelta, 0)) + { + MouseWheelMoved(mouseWheelDelta); + } + + if (_lastWidth != Screen.width || _lastHeight != Screen.height) + { + _lastWidth = Screen.width; + _lastHeight = Screen.height; + ScreenSizeChanged(); + } + } + + void OnDestroy() + { + ChangingScenes(); + } + + void OnApplicationQuit() + { + ApplicationQuit(); + } + + void OnDrawGizmos() + { + DrawGizmos(); + } + + void OnApplicationFocus(bool newIsFocused) + { + if (newIsFocused && !IsFocused) + { + IsFocused = true; + ApplicationGainedFocus(); + ApplicationFocusChanged(true); + } + + if (!newIsFocused && IsFocused) + { + IsFocused = false; + ApplicationLostFocus(); + ApplicationFocusChanged(false); + } + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Misc/UnityEventManager.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/UnityEventManager.cs.meta new file mode 100644 index 000000000..e0144a019 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/UnityEventManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6f2d921b15d60bc438a999ea117dd78f +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: -9997 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Misc/ZenUtil.cs b/UnityProject/Assets/Zenject/Source/Misc/ZenUtil.cs new file mode 100644 index 000000000..e215d3df7 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/ZenUtil.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Diagnostics; +using ModestTree; +using ModestTree.Util; + +#if !ZEN_NOT_UNITY3D +#if UNITY_5_3 +using UnityEngine.SceneManagement; +#endif +using UnityEngine; +#endif + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class ZenUtil + { + // Due to the way that Unity overrides the Equals operator, + // normal null checks such as (x == null) do not always work as + // expected + // In those cases you can use this function which will also + // work with non-unity objects + public static bool IsNull(System.Object obj) + { + return obj == null || obj.Equals(null); + } + +#if !ZEN_NOT_UNITY3D + public static void LoadScene(string levelName) + { + LoadSceneInternal(levelName, false, null, null); + } + + public static void LoadScene(string levelName, Action preBindings) + { + LoadSceneInternal(levelName, false, preBindings, null); + } + + public static void LoadScene( + string levelName, Action preBindings, Action postBindings) + { + LoadSceneInternal(levelName, false, preBindings, postBindings); + } + + public static void LoadSceneAdditive(string levelName) + { + LoadSceneInternal(levelName, true, null, null); + } + + public static void LoadSceneAdditive(string levelName, Action preBindings) + { + LoadSceneInternal(levelName, true, preBindings, null); + } + + public static void LoadSceneAdditive( + string levelName, Action preBindings, Action postBindings) + { + LoadSceneInternal(levelName, true, preBindings, postBindings); + } + + static void UnityLoadScene(string levelName, bool isAdditive) + { +#if UNITY_5_3 + SceneManager.LoadScene(levelName, isAdditive ? LoadSceneMode.Additive : LoadSceneMode.Single); +#else + if (isAdditive) + { + Application.LoadLevelAdditive(levelName); + } + else + { + Application.LoadLevel(levelName); + } +#endif + } + + static void LoadSceneInternal( + string levelName, bool isAdditive, Action preBindings, Action postBindings) + { + if (preBindings != null) + { + SceneCompositionRoot.BeforeInstallHooks += preBindings; + } + + if (postBindings != null) + { + SceneCompositionRoot.AfterInstallHooks += postBindings; + } + + Assert.That(Application.CanStreamedLevelBeLoaded(levelName), "Unable to load level '{0}'", levelName); + + Log.Debug("Starting to load scene '{0}'", levelName); + UnityLoadScene(levelName, isAdditive); + Log.Debug("Finished loading scene '{0}'", levelName); + } + + // This method can be used to load the given scene and perform injection on its contents + // Note that the scene we're loading can have [Inject] flags however it should not have + // its own composition root + public static IEnumerator LoadSceneAdditiveWithContainer( + string levelName, DiContainer parentContainer) + { + var rootObjectsBeforeLoad = UnityUtil.GetRootGameObjects(); + + UnityLoadScene(levelName, true); + + // Wait one frame for objects to be added to the scene heirarchy + yield return null; + + var rootObjectsAfterLoad = UnityUtil.GetRootGameObjects(); + + foreach (var newObject in rootObjectsAfterLoad.Except(rootObjectsBeforeLoad)) + { + Assert.That(newObject.GetComponent() == null, + "LoadSceneAdditiveWithContainer does not expect a container to exist in the loaded scene"); + + parentContainer.InjectGameObject(newObject); + } + } + +#if UNITY_5_3 + public static IEnumerator LoadSceneAdditiveWithContainerAsync(string levelName, DiContainer parentContainer) + { + return LoadSceneAdditiveWithContainerAsync(levelName, parentContainer, null); + } + + // This method can be used to load the given scene and perform injection on its contents + // Note that the scene we're loading can have [Inject] flags however it should not have + // its own composition root. + // This Method uses LoadSceneAsync and works in unity from 5.3 and upward. + // After the loading finishes and the callback parameter is set the callback gets called. + public static IEnumerator LoadSceneAdditiveWithContainerAsync(string levelName, DiContainer parentContainer, + Action callback) + { + var asyncOp = SceneManager.LoadSceneAsync(levelName, LoadSceneMode.Additive); + + yield return asyncOp; + + var scene = SceneManager.GetSceneByName(levelName); + + if (scene.IsValid()) + { + foreach (var go in UnityUtil.GetRootGameObjects()) + { + if (go.scene == scene) + { + parentContainer.InjectGameObject(go); + } + } + + if (callback != null) + { + callback(scene); + } + } + } +#endif +#endif + } +} diff --git a/UnityProject/Assets/Zenject/Source/Misc/ZenUtil.cs.meta b/UnityProject/Assets/Zenject/Source/Misc/ZenUtil.cs.meta new file mode 100644 index 000000000..f7b4e9a25 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Misc/ZenUtil.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 21470155b2c17594ab0fd736183df523 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/Providers.meta b/UnityProject/Assets/Zenject/Source/Providers.meta similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Providers.meta rename to UnityProject/Assets/Zenject/Source/Providers.meta diff --git a/UnityProject/Assets/Zenject/Source/Providers/DiContainerProvider.cs b/UnityProject/Assets/Zenject/Source/Providers/DiContainerProvider.cs new file mode 100644 index 000000000..2169bf1d7 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/DiContainerProvider.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Zenject +{ + // This provider can be used to create nested containers + [System.Diagnostics.DebuggerStepThrough] + public class DiContainerProvider : ProviderBase + { + DiContainer _container; + + public DiContainerProvider(DiContainer container) + { + _container = container; + } + + public override Type GetInstanceType() + { + return null; + } + + public override object GetInstance(InjectContext context) + { + return _container.Resolve(context); + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + return _container.ValidateResolve(context); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Providers/DiContainerProvider.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/DiContainerProvider.cs.meta new file mode 100644 index 000000000..cb0bd700c --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/DiContainerProvider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d38acfa0562097348acf7335cb4f741e +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/GameObjectSingletonProvider.cs b/UnityProject/Assets/Zenject/Source/Providers/GameObjectSingletonProvider.cs new file mode 100644 index 000000000..999a9d7bd --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/GameObjectSingletonProvider.cs @@ -0,0 +1,64 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using UnityEngine; + +namespace Zenject +{ + public class GameObjectSingletonProvider : ProviderBase + { + readonly string _name; + readonly DiContainer _container; + readonly Type _componentType; + + object _instance; + + public GameObjectSingletonProvider( + Type componentType, DiContainer container, string name) + { + Assert.That(componentType.DerivesFrom()); + _componentType = componentType; + _name = name; + _container = container; + } + + public override Type GetInstanceType() + { + return _componentType; + } + + public override object GetInstance(InjectContext context) + { + Assert.That(_componentType.DerivesFromOrEqual(context.MemberType)); + + if (_instance == null) + { + // This is valid sometimes + //Assert.That(!_container.IsValidating, + //"Tried to instantiate a MonoBehaviour with type '{0}' during validation. Object graph: {1}", _componentType, DiContainer.GetCurrentObjectGraph()); + + // Note that we always want to cache _container instead of using context.Container + // since for singletons, the container they are accessed from should not determine + // the container they are instantiated with + // Transients can do that but not singletons + + // We don't use the generic version here to avoid duplicate generic arguments to binder + _instance = _container.InstantiateComponentOnNewGameObjectExplicit( + _componentType, _name, new List(), context); + Assert.IsNotNull(_instance); + } + + return _instance; + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + return _container.ValidateObjectGraph(_componentType, context); + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Providers/GameObjectSingletonProvider.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/GameObjectSingletonProvider.cs.meta new file mode 100644 index 000000000..8be66c922 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/GameObjectSingletonProvider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 93f0cc14e67476c4c8fa25bd088ab51f +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefab.cs b/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefab.cs new file mode 100644 index 000000000..1afe1fab9 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefab.cs @@ -0,0 +1,43 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using UnityEngine; + +namespace Zenject +{ + public class GameObjectTransientProviderFromPrefab : ProviderBase + { + readonly Type _concreteType; + readonly GameObject _template; + + public GameObjectTransientProviderFromPrefab(Type concreteType, GameObject template) + { + // Don't do this because it might be an interface + //Assert.That(typeof(T).DerivesFrom()); + + _concreteType = concreteType; + _template = template; + } + + public override Type GetInstanceType() + { + return _concreteType; + } + + public override object GetInstance(InjectContext context) + { + Assert.That(_concreteType.DerivesFromOrEqual(context.MemberType)); + return context.Container.InstantiatePrefabForComponent(_concreteType, _template); + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + return context.Container.ValidateObjectGraph(_concreteType, context); + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefab.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefab.cs.meta new file mode 100644 index 000000000..07077e3db --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefab.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7eb9424deddae0841835c2fb5c24b29b +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefabResource.cs b/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefabResource.cs new file mode 100644 index 000000000..8da57e0cc --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefabResource.cs @@ -0,0 +1,46 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using UnityEngine; + +namespace Zenject +{ + public class GameObjectTransientProviderFromPrefabResource : ProviderBase + { + readonly string _resourcePath; + readonly Type _concreteType; + + public GameObjectTransientProviderFromPrefabResource( + Type concreteType, string resourcePath) + { + // Don't do this because it might be an interface + //Assert.That(_concreteType.DerivesFrom()); + + _concreteType = concreteType; + _resourcePath = resourcePath; + } + + public override Type GetInstanceType() + { + return _concreteType; + } + + public override object GetInstance(InjectContext context) + { + Assert.That(_concreteType.DerivesFromOrEqual(context.MemberType)); + + return context.Container.InstantiatePrefabResourceForComponent(_concreteType, _resourcePath); + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + return context.Container.ValidateObjectGraph(_concreteType, context); + } + } +} + +#endif + diff --git a/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefabResource.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefabResource.cs.meta new file mode 100644 index 000000000..a3e7f8b5f --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/GameObjectTransientProviderFromPrefabResource.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a77560b76b3c931438ee1c355c64851c +timeCreated: 1443386602 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/InstanceProvider.cs b/UnityProject/Assets/Zenject/Source/Providers/InstanceProvider.cs new file mode 100644 index 000000000..f2361daed --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/InstanceProvider.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class InstanceProvider : ProviderBase + { + readonly object _instance; + readonly Type _instanceType; + + public InstanceProvider(Type instanceType, object instance) + { + Assert.That(instance == null || instance.GetType().DerivesFromOrEqual(instanceType)); + + _instance = instance; + _instanceType = instanceType; + } + + public override Type GetInstanceType() + { + return _instanceType; + } + + public override object GetInstance(InjectContext context) + { + // _instance == null during validation sometimes + Assert.That(_instance == null || _instance.GetType().DerivesFromOrEqual(context.MemberType)); + return _instance; + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + return Enumerable.Empty(); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Providers/InstanceProvider.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/InstanceProvider.cs.meta new file mode 100644 index 000000000..c5a1f6f6d --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/InstanceProvider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3055ba14bfae5d94889b7db7bf331358 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/MethodProvider.cs b/UnityProject/Assets/Zenject/Source/Providers/MethodProvider.cs new file mode 100644 index 000000000..7100f2f27 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/MethodProvider.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class MethodProvider : ProviderBase + { + readonly Func _method; + + public MethodProvider(Func method) + { + _method = method; + } + + public override Type GetInstanceType() + { + return typeof(T); + } + + public override object GetInstance(InjectContext context) + { + Assert.That(typeof(T).DerivesFromOrEqual(context.MemberType)); + var obj = _method(context); + + Assert.That(obj != null, () => + "Method provider returned null when looking up type '{0}'. \nObject graph:\n{1}".Fmt(typeof(T).Name(), context.GetObjectGraphString())); + + return obj; + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + return Enumerable.Empty(); + } + } +} + diff --git a/UnityProject/Assets/Zenject/Source/Providers/MethodProvider.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/MethodProvider.cs.meta new file mode 100644 index 000000000..ab924f892 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/MethodProvider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3da14f8e9e6e41e48bfebd51b5f1379a +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/MethodProviderUntyped.cs b/UnityProject/Assets/Zenject/Source/Providers/MethodProviderUntyped.cs new file mode 100644 index 000000000..10071381a --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/MethodProviderUntyped.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class MethodProviderUntyped : ProviderBase + { + readonly Func _method; + readonly Type _returnType; + + public MethodProviderUntyped(Type returnType, Func method) + { + _method = method; + _returnType = returnType; + } + + public override Type GetInstanceType() + { + return _returnType; + } + + public override object GetInstance(InjectContext context) + { + Assert.That(_returnType.DerivesFromOrEqual(context.MemberType)); + + var obj = _method(context); + + Assert.That(obj != null, () => + "Method provider returned null when looking up type '{0}'. \nObject graph:\n{1}".Fmt(_returnType.Name(), context.GetObjectGraphString())); + + return obj; + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + return Enumerable.Empty(); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Providers/MethodProviderUntyped.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/MethodProviderUntyped.cs.meta new file mode 100644 index 000000000..bda94fecd --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/MethodProviderUntyped.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f56ac74018819454dbab8445b7cf3322 +timeCreated: 1442511020 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/MonoBehaviourSingletonProvider.cs b/UnityProject/Assets/Zenject/Source/Providers/MonoBehaviourSingletonProvider.cs new file mode 100644 index 000000000..d33ef06df --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/MonoBehaviourSingletonProvider.cs @@ -0,0 +1,63 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using UnityEngine; + +namespace Zenject +{ + public class MonoBehaviourSingletonProvider : ProviderBase + { + Component _instance; + DiContainer _container; + Type _componentType; + GameObject _gameObject; + + public MonoBehaviourSingletonProvider( + Type componentType, DiContainer container, GameObject gameObject) + { + Assert.That(componentType.DerivesFrom()); + + _gameObject = gameObject; + _componentType = componentType; + _container = container; + } + + public override Type GetInstanceType() + { + return _componentType; + } + + public override object GetInstance(InjectContext context) + { + Assert.That(_componentType.DerivesFromOrEqual(context.MemberType)); + + if (_instance == null) + { + Assert.That(!_container.IsValidating, + "Tried to instantiate a MonoBehaviour with type '{0}' during validation. Object graph: {1}", _componentType, context.GetObjectGraphString()); + + // Note that we always want to cache _container instead of using context.Container + // since for singletons, the container they are accessed from should not determine + // the container they are instantiated with + // Transients can do that but not singletons + + _instance = _gameObject.AddComponent(_componentType); + Assert.That(_instance != null); + + _container.Inject(_instance); + } + + return _instance; + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + return _container.ValidateObjectGraph(_componentType, context); + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Providers/MonoBehaviourSingletonProvider.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/MonoBehaviourSingletonProvider.cs.meta new file mode 100644 index 000000000..63a14e3b4 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/MonoBehaviourSingletonProvider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f559b0155614cfd4897f888080e24a47 +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonId.cs b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonId.cs new file mode 100644 index 000000000..569394137 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonId.cs @@ -0,0 +1,68 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using UnityEngine; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class PrefabSingletonId : IEquatable + { + public readonly string Identifier; + public readonly GameObject Prefab; + public readonly string ResourcePath; + + public PrefabSingletonId(string identifier, GameObject prefab, string resourcePath) + { + Assert.That((resourcePath == null && prefab != null) || (resourcePath != null && prefab == null)); + Identifier = identifier; + Prefab = prefab; + ResourcePath = resourcePath; + } + + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hash = 17; + hash = hash * 29 + (this.Identifier == null ? 0 : this.Identifier.GetHashCode()); + hash = hash * 29 + (ZenUtil.IsNull(this.Prefab) ? 0 : this.Prefab.GetHashCode()); + hash = hash * 29 + (this.ResourcePath == null ? 0 : this.ResourcePath.GetHashCode()); + return hash; + } + } + + public override bool Equals(object other) + { + if (other is PrefabSingletonId) + { + PrefabSingletonId otherId = (PrefabSingletonId)other; + return otherId == this; + } + else + { + return false; + } + } + + public bool Equals(PrefabSingletonId that) + { + return this == that; + } + + public static bool operator ==(PrefabSingletonId left, PrefabSingletonId right) + { + return object.Equals(left.Prefab, right.Prefab) && object.Equals(left.Identifier, right.Identifier) && object.Equals(left.ResourcePath, right.ResourcePath); + } + + public static bool operator !=(PrefabSingletonId left, PrefabSingletonId right) + { + return !left.Equals(right); + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonId.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonId.cs.meta new file mode 100644 index 000000000..6a628cee2 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonId.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 46b451060d8988947a2bc4e4715168bd +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProvider.cs b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProvider.cs new file mode 100644 index 000000000..51fef026e --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProvider.cs @@ -0,0 +1,64 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + // NOTE: we need the provider seperate from the creator because + // if we return the same provider multiple times then the condition + // will get over-written + internal class PrefabSingletonProvider : ProviderBase + { + PrefabSingletonLazyCreator _creator; + DiContainer _container; + Type _concreteType; + + public PrefabSingletonProvider( + DiContainer container, Type concreteType, PrefabSingletonLazyCreator creator) + { + _creator = creator; + _container = container; + _concreteType = concreteType; + } + + public override void Dispose() + { + _creator.DecRefCount(); + } + + public override Type GetInstanceType() + { + return _concreteType; + } + + public override object GetInstance(InjectContext context) + { + return _creator.GetComponent(_concreteType, context); + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + if (!_creator.ContainsComponent(_concreteType)) + { + yield return new ZenjectResolveException( + "Could not find component of type '{0}' in prefab with name '{1}' \nObject graph:\n{2}" + .Fmt(_concreteType.Name(), _creator.Prefab.name, context.GetObjectGraphString())); + yield break; + } + + // Note that we always want to cache _container instead of using context.Container + // since for singletons, the container they are accessed from should not determine + // the container they are instantiated with + // Transients can do that but not singletons + foreach (var err in _container.ValidateObjectGraph(_concreteType, context)) + { + yield return err; + } + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProvider.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProvider.cs.meta new file mode 100644 index 000000000..f865c4a2f --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProvider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d8fbf6eae582f03448d24984c4d592ff +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProviderMap.cs b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProviderMap.cs new file mode 100644 index 000000000..77217b586 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProviderMap.cs @@ -0,0 +1,58 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using UnityEngine; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class PrefabSingletonProviderMap + { + Dictionary _creators = new Dictionary(); + DiContainer _container; + + public PrefabSingletonProviderMap(DiContainer container) + { + _container = container; + } + + public IEnumerable Creators + { + get + { + return _creators.Values; + } + } + + internal void RemoveCreator(PrefabSingletonId id) + { + bool success = _creators.Remove(id); + Assert.That(success); + } + + PrefabSingletonLazyCreator AddCreator(PrefabSingletonId id) + { + PrefabSingletonLazyCreator creator; + + if (!_creators.TryGetValue(id, out creator)) + { + creator = new PrefabSingletonLazyCreator(_container, this, id); + _creators.Add(id, creator); + } + + creator.IncRefCount(); + return creator; + } + + public ProviderBase CreateProvider( + string identifier, Type concreteType, GameObject prefab, string resourcePath) + { + return new PrefabSingletonProvider( + _container, concreteType, AddCreator(new PrefabSingletonId(identifier, prefab, resourcePath))); + } + } +} +#endif diff --git a/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProviderMap.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProviderMap.cs.meta new file mode 100644 index 000000000..009ad8f0d --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/PrefabSingletonProviderMap.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: afd682ea011f4ef4bb76e8e923d9b155 +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/ProviderBase.cs b/UnityProject/Assets/Zenject/Source/Providers/ProviderBase.cs new file mode 100644 index 000000000..2eea60b75 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/ProviderBase.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public abstract class ProviderBase : IDisposable + { + string _identifier; + BindingCondition _condition = null; + + public BindingCondition Condition + { + get + { + return _condition; + } + set + { + _condition = value; + } + } + + public string Identifier + { + get + { + return _identifier; + } + set + { + _identifier = value; + } + } + + public bool Matches(InjectContext context) + { + // Note that identifiers are matches in DiContainer + return _condition == null || _condition(context); + } + + // Return null if not applicable (for eg. if instance type is dependent on contractType) + public abstract Type GetInstanceType(); + + public abstract object GetInstance(InjectContext context); + + public abstract IEnumerable ValidateBinding(InjectContext context); + + public virtual void Dispose() + { + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Providers/ProviderBase.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/ProviderBase.cs.meta new file mode 100644 index 000000000..c0ff1aa1b --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/ProviderBase.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 225a9af6c389cad419e7a49a9d953c79 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/ResourceProvider.cs b/UnityProject/Assets/Zenject/Source/Providers/ResourceProvider.cs new file mode 100644 index 000000000..b114415bd --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/ResourceProvider.cs @@ -0,0 +1,50 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; +using UnityEngine; + +namespace Zenject +{ + public class ResourceProvider : ProviderBase + { + readonly Type _concreteType; + readonly string _resourcePath; + + public ResourceProvider(Type concreteType, string resourcePath) + { + _concreteType = concreteType; + _resourcePath = resourcePath; + } + + public override Type GetInstanceType() + { + return _concreteType; + } + + public override object GetInstance(InjectContext context) + { + var obj = Resources.Load(_resourcePath, _concreteType); + + Assert.IsNotNull(obj, + "Could not find resource at path '{0}' with type '{1}'", _resourcePath, _concreteType); + + return obj; + } + + Type GetTypeToInstantiate(Type contractType) + { + Assert.That(_concreteType.DerivesFromOrEqual(contractType)); + return _concreteType; + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + yield break; + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Providers/ResourceProvider.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/ResourceProvider.cs.meta new file mode 100644 index 000000000..d4b5cf584 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/ResourceProvider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 964fdb29f47beab448d47d80720c2b2c +timeCreated: 1443386602 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Binders.meta b/UnityProject/Assets/Zenject/Source/Providers/SingletonCreators.meta similarity index 67% rename from UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Binders.meta rename to UnityProject/Assets/Zenject/Source/Providers/SingletonCreators.meta index 189107bf7..cd5cc3149 100644 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Binders.meta +++ b/UnityProject/Assets/Zenject/Source/Providers/SingletonCreators.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 0c43d009ebea416488a2be9fa507f048 +guid: abd00e6adfd33924bb95fea7baaad0cd folderAsset: yes -timeCreated: 1450373896 +timeCreated: 1450367571 licenseType: Pro DefaultImporter: userData: diff --git a/UnityProject/Assets/Zenject/Source/Providers/SingletonId.cs b/UnityProject/Assets/Zenject/Source/Providers/SingletonId.cs new file mode 100644 index 000000000..ab9aca8f8 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/SingletonId.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public class SingletonId : IEquatable + { + public readonly Type Type; + public readonly string Identifier; + + public SingletonId(string identifier, Type type) + { + Identifier = identifier; + Type = type; + } + + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hash = 17; + hash = hash * 29 + this.Type.GetHashCode(); + hash = hash * 29 + (this.Identifier == null ? 0 : this.Identifier.GetHashCode()); + return hash; + } + } + + public override bool Equals(object other) + { + if (other is SingletonId) + { + SingletonId otherId = (SingletonId)other; + return otherId == this; + } + else + { + return false; + } + } + + public bool Equals(SingletonId that) + { + return this == that; + } + + public static bool operator ==(SingletonId left, SingletonId right) + { + return left.Type == right.Type && object.Equals(left.Identifier, right.Identifier); + } + + public static bool operator !=(SingletonId left, SingletonId right) + { + return !left.Equals(right); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Providers/SingletonId.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/SingletonId.cs.meta new file mode 100644 index 000000000..17bf0a464 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/SingletonId.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 445159de4daa78446be0c374b16e0f82 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/SingletonProvider.cs b/UnityProject/Assets/Zenject/Source/Providers/SingletonProvider.cs new file mode 100644 index 000000000..1bd31a825 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/SingletonProvider.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using ModestTree; +using System.Linq; + +namespace Zenject +{ + // NOTE: we need the provider seperate from the creator because + // if we return the same provider multiple times then the condition + // will get over-written + internal class SingletonProvider : ProviderBase + { + SingletonLazyCreatorBase _creator; + + public SingletonProvider(SingletonLazyCreatorBase creator) + { + _creator = creator; + } + + public override void Dispose() + { + _creator.DecRefCount(); + } + + public override Type GetInstanceType() + { + return _creator.GetInstanceType(); + } + + public override object GetInstance(InjectContext context) + { + return _creator.GetInstance(context); + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + return _creator.ValidateBinding(context); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Providers/SingletonProvider.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/SingletonProvider.cs.meta new file mode 100644 index 000000000..be90a7457 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/SingletonProvider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 54e551850960d43468153dc71350b5f7 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/SingletonProviderMap.cs b/UnityProject/Assets/Zenject/Source/Providers/SingletonProviderMap.cs new file mode 100644 index 000000000..d615f6fc8 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/SingletonProviderMap.cs @@ -0,0 +1,146 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + //[System.Diagnostics.DebuggerStepThrough] + public class SingletonProviderMap + { + readonly Dictionary _creators = new Dictionary(); + readonly DiContainer _container; + + public SingletonProviderMap(DiContainer container) + { + _container = container; + } + + internal IEnumerable Creators + { + get + { + return _creators.Values; + } + } + + internal void RemoveCreator(SingletonId id) + { + bool success = _creators.Remove(id); + Assert.That(success); + } + + public ProviderBase CreateProviderFromType(string identifier, Type concreteType) + { + return CreateProviderFromType(new SingletonId(identifier, concreteType)); + } + + public ProviderBase CreateProviderFromType(SingletonId singleId) + { + var creator = TryGetCreator(singleId); + + if (creator == null) + { + creator = new SingletonLazyCreatorByType(singleId, this, _container); + _creators.Add(singleId, creator); + } + + return CreateProvider(creator); + } + + public ProviderBase CreateProviderFromFactory(string identifier) + where TFactory : IFactory + { + var singleId = new SingletonId(identifier, typeof(TContract)); + var creator = TryGetCreator>(singleId); + + if (creator == null) + { + creator = new SingletonLazyCreatorByFactory(singleId, this, _container); + _creators.Add(singleId, creator); + } + + return CreateProvider(creator); + } + + public ProviderBase CreateProviderFromMethod( + string identifier, Func method) + { + var singleId = new SingletonId(identifier, typeof(TConcrete)); + var creator = TryGetCreator>(singleId); + + if (creator == null) + { + creator = new SingletonLazyCreatorByMethod(singleId, this, method); + _creators.Add(singleId, creator); + } + else + { + if (!ReferenceEquals(creator.CreateMethod, method)) + { + throw new ZenjectBindException( + "Tried to bind multiple different methods for type '{0}' using ToSingleMethod".Fmt(singleId.Type.Name())); + } + } + + return CreateProvider(creator); + } + + public ProviderBase CreateProviderFromInstance( + string identifier, Type concreteType, object instance) + { + return CreateProviderFromInstance( + new SingletonId(identifier, concreteType), instance); + } + + public ProviderBase CreateProviderFromInstance( + SingletonId singleId, object instance) + { + Assert.That(instance != null || _container.IsValidating); + + var creator = TryGetCreator(singleId); + + if (creator == null) + { + creator = new SingletonLazyCreatorByInstance(singleId, this, _container, instance); + _creators.Add(singleId, creator); + } + else + { + if (!ReferenceEquals(creator.Instance, instance)) + { + throw new ZenjectBindException( + "Tried to bind multiple different instances of type '{0}' using ToSingleInstance".Fmt(singleId.Type.Name())); + } + } + + return CreateProvider(creator); + } + + SingletonProvider CreateProvider(SingletonLazyCreatorBase creator) + { + creator.IncRefCount(); + return new SingletonProvider(creator); + } + + TCreator TryGetCreator(SingletonId singleId) + where TCreator : SingletonLazyCreatorBase + { + SingletonLazyCreatorBase creator; + + if (_creators.TryGetValue(singleId, out creator)) + { + if (creator.GetType() != typeof(TCreator)) + { + throw new ZenjectBindException( + "Cannot bind type '{0}' to multiple different kinds of singleton providers. Singleton providers types: '{1}' and '{2}'" + .Fmt(singleId.Type, creator.GetType(), typeof(TCreator))); + } + + return (TCreator)creator; + } + + return null; + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Providers/SingletonProviderMap.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/SingletonProviderMap.cs.meta new file mode 100644 index 000000000..f8682b064 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/SingletonProviderMap.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9ad7741b63d7260469126c8ac5e264aa +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Providers/TransientProvider.cs b/UnityProject/Assets/Zenject/Source/Providers/TransientProvider.cs new file mode 100644 index 000000000..8ff2a84e9 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/TransientProvider.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using ModestTree; + +namespace Zenject +{ + public class TransientProvider : ProviderBase + { + readonly Type _concreteType; + + public TransientProvider(Type concreteType) + { + _concreteType = concreteType; + } + + public override Type GetInstanceType() + { + return _concreteType; + } + + public override object GetInstance(InjectContext context) + { + var obj = context.Container.InstantiateExplicit( + GetTypeToInstantiate(context.MemberType), new List(), context, null, true); + Assert.That(obj != null); + return obj; + } + + Type GetTypeToInstantiate(Type contractType) + { + if (_concreteType.IsOpenGenericType()) + { + Assert.That(!contractType.IsAbstract); + Assert.That(contractType.GetGenericTypeDefinition() == _concreteType); + return contractType; + } + + Assert.That(_concreteType.DerivesFromOrEqual(contractType)); + return _concreteType; + } + + public override IEnumerable ValidateBinding(InjectContext context) + { + return context.Container.ValidateObjectGraph(_concreteType, context); + } + } +} diff --git a/UnityProject/Assets/Zenject/Source/Providers/TransientProvider.cs.meta b/UnityProject/Assets/Zenject/Source/Providers/TransientProvider.cs.meta new file mode 100644 index 000000000..304e38258 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Providers/TransientProvider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ed36aabf96def2a4cba9a6086cd1c420 +timeCreated: 1435941959 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/Usage.meta b/UnityProject/Assets/Zenject/Source/Usage.meta similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Usage.meta rename to UnityProject/Assets/Zenject/Source/Usage.meta diff --git a/UnityProject/Assets/Zenject/Source/Usage/InjectAttribute.cs b/UnityProject/Assets/Zenject/Source/Usage/InjectAttribute.cs new file mode 100644 index 000000000..8d6b3484c --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Usage/InjectAttribute.cs @@ -0,0 +1,18 @@ +using System; + +namespace Zenject +{ + [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public class InjectAttribute : InjectAttributeBase + { + public InjectAttribute(string identifier) + { + Identifier = identifier; + } + + public InjectAttribute() + { + } + } +} + diff --git a/UnityProject/Assets/Zenject/Source/Usage/InjectAttribute.cs.meta b/UnityProject/Assets/Zenject/Source/Usage/InjectAttribute.cs.meta new file mode 100644 index 000000000..92d1d372d --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Usage/InjectAttribute.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f8ad477dd18b72745a3786d62c24adde +timeCreated: 1443386603 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Usage/InjectAttributeBase.cs b/UnityProject/Assets/Zenject/Source/Usage/InjectAttributeBase.cs new file mode 100644 index 000000000..f4abb079c --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Usage/InjectAttributeBase.cs @@ -0,0 +1,29 @@ +using ModestTree.Util; +using System; + +namespace Zenject +{ + [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public abstract class InjectAttributeBase : PreserveAttribute + { + public bool IsOptional + { + get; + protected set; + } + + public string Identifier + { + get; + protected set; + } + + public bool LocalOnly + { + get; + protected set; + } + } +} + + diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Binders/CommandBinder.cs.meta b/UnityProject/Assets/Zenject/Source/Usage/InjectAttributeBase.cs.meta similarity index 75% rename from UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Binders/CommandBinder.cs.meta rename to UnityProject/Assets/Zenject/Source/Usage/InjectAttributeBase.cs.meta index edc2fd74e..d1b590ad8 100644 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Binders/CommandBinder.cs.meta +++ b/UnityProject/Assets/Zenject/Source/Usage/InjectAttributeBase.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 4daf5e2e3bf1a694bbe5cbd78cbbbcce -timeCreated: 1450373896 +guid: 3ea7472c3a74349459684b1851ee6d99 +timeCreated: 1446576147 licenseType: Pro MonoImporter: serializedVersion: 2 diff --git a/UnityProject/Assets/Zenject/Source/Usage/InjectLocalAttribute.cs b/UnityProject/Assets/Zenject/Source/Usage/InjectLocalAttribute.cs new file mode 100644 index 000000000..0ad001ec9 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Usage/InjectLocalAttribute.cs @@ -0,0 +1,37 @@ +using System; + +namespace Zenject +{ + [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public class InjectLocalAttribute : InjectAttributeBase + { + public InjectLocalAttribute(string identifier) + { + Identifier = identifier; + LocalOnly = true; + } + + public InjectLocalAttribute() + { + LocalOnly = true; + } + } + + [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public class InjectLocalOptionalAttribute : InjectAttributeBase + { + public InjectLocalOptionalAttribute(string identifier) + { + Identifier = identifier; + IsOptional = true; + LocalOnly = true; + } + + public InjectLocalOptionalAttribute() + { + IsOptional = true; + LocalOnly = true; + } + } +} + diff --git a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/ICommandHandler.cs.meta b/UnityProject/Assets/Zenject/Source/Usage/InjectLocalAttribute.cs.meta similarity index 75% rename from UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/ICommandHandler.cs.meta rename to UnityProject/Assets/Zenject/Source/Usage/InjectLocalAttribute.cs.meta index 13f4b364a..d2bd49dbb 100644 --- a/UnityProject/Assets/Zenject/Extras/CommandsAndSignals/Command/ICommandHandler.cs.meta +++ b/UnityProject/Assets/Zenject/Source/Usage/InjectLocalAttribute.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 1a4ae09eca904394c8cf3f0d155019f3 -timeCreated: 1450373896 +guid: 18f67ebb54b876a429514a4810d5e902 +timeCreated: 1446576146 licenseType: Pro MonoImporter: serializedVersion: 2 diff --git a/UnityProject/Assets/Zenject/Source/Usage/InjectOptionalAttribute.cs b/UnityProject/Assets/Zenject/Source/Usage/InjectOptionalAttribute.cs new file mode 100644 index 000000000..ccd425803 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Usage/InjectOptionalAttribute.cs @@ -0,0 +1,20 @@ +using System; + +namespace Zenject +{ + [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] + public class InjectOptionalAttribute : InjectAttributeBase + { + public InjectOptionalAttribute(string identifier) + { + Identifier = identifier; + IsOptional = true; + } + + public InjectOptionalAttribute() + { + IsOptional = true; + } + } +} + diff --git a/UnityProject/Assets/Zenject/Source/Usage/InjectOptionalAttribute.cs.meta b/UnityProject/Assets/Zenject/Source/Usage/InjectOptionalAttribute.cs.meta new file mode 100644 index 000000000..e4c8917f0 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Usage/InjectOptionalAttribute.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6ff05adeaf9c4f04d85ddf70ecbaf630 +timeCreated: 1428524156 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Usage/PostInjectAttribute.cs b/UnityProject/Assets/Zenject/Source/Usage/PostInjectAttribute.cs new file mode 100644 index 000000000..b8345969e --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Usage/PostInjectAttribute.cs @@ -0,0 +1,10 @@ +using System; +using ModestTree.Util; + +namespace Zenject +{ + [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] + public class PostInjectAttribute : PreserveAttribute + { + } +} diff --git a/UnityProject/Assets/Zenject/Source/Usage/PostInjectAttribute.cs.meta b/UnityProject/Assets/Zenject/Source/Usage/PostInjectAttribute.cs.meta new file mode 100644 index 000000000..ac585b217 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Usage/PostInjectAttribute.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 858550ae9f37eae44945de316910a9f4 +timeCreated: 1443386602 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Usage/PreserveAttribute.cs b/UnityProject/Assets/Zenject/Source/Usage/PreserveAttribute.cs new file mode 100644 index 000000000..f1bc8bc05 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Usage/PreserveAttribute.cs @@ -0,0 +1,9 @@ +using System; + +namespace ModestTree.Util +{ + [AttributeUsage(AttributeTargets.All, AllowMultiple = false)] + public class PreserveAttribute : Attribute + { + } +} diff --git a/UnityProject/Assets/Zenject/Source/Usage/PreserveAttribute.cs.meta b/UnityProject/Assets/Zenject/Source/Usage/PreserveAttribute.cs.meta new file mode 100644 index 000000000..053d23d3e --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Usage/PreserveAttribute.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 225d45415cb252c44afc924f53153906 +timeCreated: 1446576147 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/Util.meta b/UnityProject/Assets/Zenject/Source/Util.meta similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Util.meta rename to UnityProject/Assets/Zenject/Source/Util.meta diff --git a/UnityProject/Assets/Zenject/Source/Util/AutoBindInstaller.cs b/UnityProject/Assets/Zenject/Source/Util/AutoBindInstaller.cs new file mode 100644 index 000000000..344d51c23 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Util/AutoBindInstaller.cs @@ -0,0 +1,40 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using ModestTree; +using UnityEngine; + +namespace Zenject +{ + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public class AutoBindAttribute : Attribute + { + } + + public class AutoBindInstaller : Installer + { + GameObject _root; + + public override void InstallBindings() + { + Assert.IsNotNull(_root); + + foreach (var monoBehaviour in _root.GetComponentsInChildren()) + { + if (monoBehaviour != null + && monoBehaviour.GetType().HasAttribute()) + { + Container.Bind(monoBehaviour.GetType()).ToInstance(monoBehaviour); + } + } + } + + [PostInject] + public void Initialize(CompositionRoot compRoot) + { + _root = compRoot.gameObject; + } + } +} + +#endif \ No newline at end of file diff --git a/UnityProject/Assets/Zenject/Source/Util/AutoBindInstaller.cs.meta b/UnityProject/Assets/Zenject/Source/Util/AutoBindInstaller.cs.meta new file mode 100644 index 000000000..797864d3e --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Util/AutoBindInstaller.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bb2af206319f6cd498c18c20e57ef414 +timeCreated: 1435779876 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Util/DecoratorInstaller.cs b/UnityProject/Assets/Zenject/Source/Util/DecoratorInstaller.cs new file mode 100644 index 000000000..ecd3cff1e --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Util/DecoratorInstaller.cs @@ -0,0 +1,32 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using UnityEngine; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public abstract class DecoratorInstaller : MonoBehaviour + { + [Inject] + DiContainer _container = null; + + protected DiContainer Container + { + get + { + return _container; + } + } + + public virtual void PreInstallBindings() + { + } + + public virtual void PostInstallBindings() + { + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Util/DecoratorInstaller.cs.meta b/UnityProject/Assets/Zenject/Source/Util/DecoratorInstaller.cs.meta new file mode 100644 index 000000000..8e3f40765 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Util/DecoratorInstaller.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4d05c4d403304bd4f94d1a9b81468fe3 +timeCreated: 1435779875 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Util/SceneDecoratorCompositionRoot.cs b/UnityProject/Assets/Zenject/Source/Util/SceneDecoratorCompositionRoot.cs new file mode 100644 index 000000000..a25b329c7 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Util/SceneDecoratorCompositionRoot.cs @@ -0,0 +1,101 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections; +using System.Linq; +using ModestTree; +using ModestTree.Util; +using UnityEngine; + +namespace Zenject +{ + [System.Diagnostics.DebuggerStepThrough] + public sealed class SceneDecoratorCompositionRoot : MonoBehaviour + { + public string SceneName; + + [SerializeField] + public DecoratorInstaller[] DecoratorInstallers; + + [SerializeField] + public MonoInstaller[] PreInstallers; + + [SerializeField] + public MonoInstaller[] PostInstallers; + + Action _beforeInstallHooks; + Action _afterInstallHooks; + + public void Awake() + { +#pragma warning disable 168 + // Ensure the global comp root is initialized so that it doesn't get parented to us below + var globalRoot = GlobalCompositionRoot.Instance; +#pragma warning restore 168 + + _beforeInstallHooks = SceneCompositionRoot.BeforeInstallHooks; + SceneCompositionRoot.BeforeInstallHooks = null; + + _afterInstallHooks = SceneCompositionRoot.AfterInstallHooks; + SceneCompositionRoot.AfterInstallHooks = null; + + ZenUtil.LoadSceneAdditive( + SceneName, AddPreBindings, AddPostBindings); + } + + public void AddPreBindings(DiContainer container) + { + if (_beforeInstallHooks != null) + { + _beforeInstallHooks(container); + _beforeInstallHooks = null; + } + + container.Install(PreInstallers); + + ProcessDecoratorInstallers(container, true); + } + + public void AddPostBindings(DiContainer container) + { + container.Install(PostInstallers); + + ProcessDecoratorInstallers(container, false); + + if (_afterInstallHooks != null) + { + _afterInstallHooks(container); + _afterInstallHooks = null; + } + } + + void ProcessDecoratorInstallers(DiContainer container, bool isBefore) + { + if (DecoratorInstallers == null) + { + return; + } + + foreach (var installer in DecoratorInstallers) + { + Assert.IsNotNull(installer, "Found null installer in composition root"); + + if (installer.enabled) + { + container.Inject(installer); + + if (isBefore) + { + installer.PreInstallBindings(); + } + else + { + installer.PostInstallBindings(); + } + } + } + } + } +} + +#endif diff --git a/UnityProject/Assets/Zenject/Source/Util/SceneDecoratorCompositionRoot.cs.meta b/UnityProject/Assets/Zenject/Source/Util/SceneDecoratorCompositionRoot.cs.meta new file mode 100644 index 000000000..aeda3de20 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Util/SceneDecoratorCompositionRoot.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ed7323e8fdd8c26438c6485f2060dad0 +timeCreated: 1435941959 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Util/UnityUtil.cs b/UnityProject/Assets/Zenject/Source/Util/UnityUtil.cs new file mode 100644 index 000000000..65287b7c2 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Util/UnityUtil.cs @@ -0,0 +1,87 @@ +#if !ZEN_NOT_UNITY3D + +using System; +using System.Collections.Generic; +using UnityEngine; +using System.Linq; + +namespace ModestTree.Util +{ + public static class UnityUtil + { + public static bool IsAltKeyDown + { + get + { + return Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt); + } + } + + public static bool IsControlKeyDown + { + get + { + return Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl); + } + } + + public static bool IsShiftKeyDown + { + get + { + return Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift); + } + } + + public static bool WasShiftKeyJustPressed + { + get + { + return Input.GetKeyDown(KeyCode.LeftShift) || Input.GetKeyDown(KeyCode.RightShift); + } + } + + public static bool WasAltKeyJustPressed + { + get + { + return Input.GetKeyDown(KeyCode.LeftAlt) || Input.GetKeyDown(KeyCode.RightAlt); + } + } + + static int GetDepthLevel(Transform transform) + { + if (transform == null) + { + return 0; + } + + return 1 + GetDepthLevel(transform.parent); + } + + public static IEnumerable GetComponentsInChildrenTopDown(GameObject gameObject, bool includeInactive) + { + return gameObject.GetComponentsInChildren(includeInactive) + .OrderBy(x => + x == null ? int.MinValue : GetDepthLevel(x.transform)); + } + + public static IEnumerable GetComponentsInChildrenBottomUp(GameObject gameObject, bool includeInactive) + { + return gameObject.GetComponentsInChildren(includeInactive) + .OrderByDescending(x => + x == null ? int.MinValue : GetDepthLevel(x.transform)); + } + + public static IEnumerable GetAllGameObjectsInScene() + { + return GameObject.FindObjectsOfType().Select(x => x.gameObject); + } + + public static List GetRootGameObjects() + { + return GetAllGameObjectsInScene().Where(x => x.transform.parent == null).ToList(); + } + } +} +#endif diff --git a/UnityProject/Assets/Zenject/Source/Util/UnityUtil.cs.meta b/UnityProject/Assets/Zenject/Source/Util/UnityUtil.cs.meta new file mode 100644 index 000000000..b8b4b88b9 --- /dev/null +++ b/UnityProject/Assets/Zenject/Source/Util/UnityUtil.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7289c8ed2cb5fbf4e9982adc51bfd1a3 +timeCreated: 1435941958 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Zenject/Source/Main/Zenject.csproj b/UnityProject/Assets/Zenject/Source/Zenject.csproj similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Zenject.csproj rename to UnityProject/Assets/Zenject/Source/Zenject.csproj diff --git a/UnityProject/Assets/Zenject/Source/Main/Zenject.csproj.meta b/UnityProject/Assets/Zenject/Source/Zenject.csproj.meta similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Zenject.csproj.meta rename to UnityProject/Assets/Zenject/Source/Zenject.csproj.meta diff --git a/UnityProject/Assets/Zenject/Source/Main/Zenject.csproj.user b/UnityProject/Assets/Zenject/Source/Zenject.csproj.user similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Zenject.csproj.user rename to UnityProject/Assets/Zenject/Source/Zenject.csproj.user diff --git a/UnityProject/Assets/Zenject/Source/Main/Zenject.csproj.user.meta b/UnityProject/Assets/Zenject/Source/Zenject.csproj.user.meta similarity index 100% rename from UnityProject/Assets/Zenject/Source/Main/Zenject.csproj.user.meta rename to UnityProject/Assets/Zenject/Source/Zenject.csproj.user.meta diff --git a/UnityProject/ProjectSettings/EditorBuildSettings.asset b/UnityProject/ProjectSettings/EditorBuildSettings.asset index 2ad3fd5ff..35442542a 100644 --- a/UnityProject/ProjectSettings/EditorBuildSettings.asset +++ b/UnityProject/ProjectSettings/EditorBuildSettings.asset @@ -6,4 +6,4 @@ EditorBuildSettings: serializedVersion: 2 m_Scenes: - enabled: 1 - path: Assets/Zenject/Extras/SampleGame/Asteroids.unity + path: Assets/Zenject/OptionalExtras/SampleGame/Asteroids.unity