├── Lukomor ├── Scripts │ ├── MVVM │ │ ├── IViewModel.cs │ │ ├── Editor.meta │ │ ├── Binders.meta │ │ ├── IViewModel.cs.meta │ │ ├── Binders │ │ │ ├── PrefabCreation.meta │ │ │ ├── MethodBinders │ │ │ │ ├── ButtonMethodBinder.cs.meta │ │ │ │ ├── IntMethodBinder.cs │ │ │ │ ├── FloatMethodBinder.cs │ │ │ │ ├── FloatMethodBinder.cs.meta │ │ │ │ ├── IntMethodBinder.cs.meta │ │ │ │ └── ButtonMethodBinder.cs │ │ │ ├── PrefabCreation │ │ │ │ ├── VMToGameObjectCreationBinder.cs.meta │ │ │ │ ├── VMCollectionToGameObjectCreationBinder.cs.meta │ │ │ │ ├── VMToGameObjectCreationFromListBinder.cs.meta │ │ │ │ ├── VMCollectionToGameObjectFromListCreationBinder.cs.meta │ │ │ │ ├── VMToGameObjectCreationBinder.cs │ │ │ │ ├── VMToGameObjectCreationFromListBinder.cs │ │ │ │ ├── VMCollectionToGameObjectCreationBinder.cs │ │ │ │ └── VMCollectionToGameObjectFromListCreationBinder.cs │ │ │ ├── UnityEventBinders │ │ │ │ ├── BoolUnityEventBinder.cs │ │ │ │ ├── IntUnityEventBinder.cs │ │ │ │ ├── FloatUnityEventBinder.cs │ │ │ │ ├── DoubleUnityEventBinder.cs │ │ │ │ ├── StringUnityEventBinder.cs │ │ │ │ ├── SpriteUnityEventBinder.cs │ │ │ │ ├── MaterialUnityEventBinder.cs │ │ │ │ ├── Vector2UnityEventBinder.cs │ │ │ │ ├── Vector3UnityEventBinder.cs │ │ │ │ ├── TransformUnityEventBinder.cs │ │ │ │ ├── GameObjectUnityEventBinder.cs │ │ │ │ ├── Vector2IntUnityEventBinder.cs │ │ │ │ ├── Vector3IntUnityEventBinder.cs │ │ │ │ ├── ObservableUnitToUnityEventBinder.cs │ │ │ │ ├── IntUnityEventBinder.cs.meta │ │ │ │ ├── UnityEventBinder.cs.meta │ │ │ │ ├── BoolUnityEventBinder.cs.meta │ │ │ │ ├── DoubleUnityEventBinder.cs.meta │ │ │ │ ├── FloatUnityEventBinder.cs.meta │ │ │ │ ├── MaterialUnityEventBinder.cs.meta │ │ │ │ ├── SpriteUnityEventBinder.cs.meta │ │ │ │ ├── StringUnityEventBinder.cs.meta │ │ │ │ ├── Vector2UnityEventBinder.cs.meta │ │ │ │ ├── Vector3UnityEventBinder.cs.meta │ │ │ │ ├── BoolToColorUnityEventBinder.cs.meta │ │ │ │ ├── BoolToSpriteUnityEventBinder.cs.meta │ │ │ │ ├── DoubleToTextUnityEventBinder.cs.meta │ │ │ │ ├── FloatToTextUnityEventBinder.cs.meta │ │ │ │ ├── GameObjectUnityEventBinder.cs.meta │ │ │ │ ├── IntToBoolUnityEventBinder.cs.meta │ │ │ │ ├── IntToColorUnityEventBinder.cs.meta │ │ │ │ ├── IntToSpriteUnityEventBinder.cs.meta │ │ │ │ ├── IntToTextUnityEventBinder.cs.meta │ │ │ │ ├── TransformUnityEventBinder.cs.meta │ │ │ │ ├── Vector2IntUnityEventBinder.cs.meta │ │ │ │ ├── Vector3IntUnityEventBinder.cs.meta │ │ │ │ ├── ObservableUnitToUnityEventBinder.cs.meta │ │ │ │ ├── UnityEventBinder.cs │ │ │ │ ├── IntToTextUnityEventBinder.cs │ │ │ │ ├── FloatToTextUnityEventBinder.cs │ │ │ │ ├── DoubleToTextUnityEventBinder.cs │ │ │ │ ├── BoolToSpriteUnityEventBinder.cs │ │ │ │ ├── BoolToColorUnityEventBinder.cs │ │ │ │ ├── IntToBoolUnityEventBinder.cs │ │ │ │ ├── IntToSpriteUnityEventBinder.cs │ │ │ │ └── IntToColorUnityEventBinder.cs │ │ │ ├── MethodBinder.cs │ │ │ ├── Utils.meta │ │ │ ├── UIBinders.meta │ │ │ ├── MethodBinders.meta │ │ │ ├── UnityEventBinders.meta │ │ │ ├── Utils │ │ │ │ ├── CompareOperation.cs │ │ │ │ ├── CompareOperation.cs.meta │ │ │ │ ├── CompareOperationExtensions.cs.meta │ │ │ │ └── CompareOperationExtensions.cs │ │ │ ├── Binder.cs.meta │ │ │ ├── MethodBinder.cs.meta │ │ │ ├── EmptyMethodBinder.cs.meta │ │ │ ├── ObservableBinder.cs.meta │ │ │ ├── GenericMethodBinder.cs.meta │ │ │ ├── ObservableCollectionBinder.cs.meta │ │ │ ├── UIBinders │ │ │ │ ├── CloseWindowBinder.cs.meta │ │ │ │ └── CloseWindowBinder.cs │ │ │ ├── EmptyMethodBinder.cs │ │ │ ├── GenericMethodBinder.cs │ │ │ ├── ObservableBinder.cs │ │ │ ├── ObservableCollectionBinder.cs │ │ │ └── Binder.cs │ │ ├── Editor │ │ │ ├── StringListSearchProvider.cs.meta │ │ │ ├── BinderEditor.cs.meta │ │ │ ├── MVVMConstants.cs.meta │ │ │ ├── ViewEditor.cs.meta │ │ │ ├── MethodBinderEditor.cs.meta │ │ │ ├── EmptyMethodBinderEditor.cs.meta │ │ │ ├── ObservableBinderBase.cs.meta │ │ │ ├── ObservableBinderEditor.cs.meta │ │ │ ├── ViewModelsEditorUtility.cs.meta │ │ │ ├── GenericMethodBinderEditor.cs.meta │ │ │ ├── ObservableCollectionBinderEditor.cs.meta │ │ │ ├── ViewModelToViewMappingPropertyDrawer.cs.meta │ │ │ ├── MVVMConstants.cs │ │ │ ├── EmptyMethodBinderEditor.cs │ │ │ ├── ObservableBinderEditor.cs │ │ │ ├── ObservableCollectionBinderEditor.cs │ │ │ ├── ViewModelsEditorUtility.cs │ │ │ ├── StringListSearchProvider.cs │ │ │ ├── GenericMethodBinderEditor.cs │ │ │ ├── MethodBinderEditor.cs │ │ │ ├── ObservableBinderBase.cs │ │ │ ├── ViewModelToViewMappingPropertyDrawer.cs │ │ │ ├── BinderEditor.cs │ │ │ └── ViewEditor.cs │ │ ├── ViewModelToViewMapping.cs │ │ ├── View.cs.meta │ │ ├── ViewModelToViewMapper.cs.meta │ │ ├── ViewModelToViewMapping.cs.meta │ │ ├── ViewModelToViewMapper.cs │ │ └── View.cs │ ├── MVVM.meta │ ├── Reactive.meta │ ├── Reactive │ │ ├── IReactiveProperty.cs.meta │ │ ├── ReactiveCollection.cs.meta │ │ ├── ReactiveProperty.cs.meta │ │ ├── IReadOnlyReactiveCollection.cs.meta │ │ ├── IReactiveProperty.cs │ │ ├── ReactiveSubscription.cs.meta │ │ ├── IReadOnlyReactiveCollection.cs │ │ ├── SingleReactiveProperty.cs.meta │ │ ├── ReactiveSubscription.cs │ │ ├── SingleReactiveProperty.cs │ │ ├── ReactiveProperty.cs │ │ └── ReactiveCollection.cs │ ├── DI.meta │ └── DI │ │ ├── DIEntry.cs.meta │ │ ├── DIBuilder.cs.meta │ │ ├── DIContainer.cs.meta │ │ ├── DIEntrySingleton.cs.meta │ │ ├── DIEntryTransient.cs.meta │ │ ├── DIBuilder.cs │ │ ├── DIEntryTransient.cs │ │ ├── DIEntrySingleton.cs │ │ ├── DIEntry.cs │ │ └── DIContainer.cs ├── System.Reactive.dll ├── Lukomor.asmdef.meta ├── Scripts.meta ├── Lukomor.asmdef └── System.Reactive.dll.meta ├── LICENSE.md.meta ├── README.md.meta ├── package.json.meta ├── Lukomor.meta ├── package.json ├── LICENSE.md ├── .gitignore └── README.md /Lukomor/Scripts/MVVM/IViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.MVVM 2 | { 3 | public interface IViewModel { } 4 | } -------------------------------------------------------------------------------- /Lukomor/System.Reactive.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vavilichev/Lukomor/HEAD/Lukomor/System.Reactive.dll -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51fd2e7a5f7f40c1ba1c22ccfd9c697f 3 | timeCreated: 1691936297 -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 234c93a0c5984ab9bdd9a8fb36cda938 3 | timeCreated: 1691936624 -------------------------------------------------------------------------------- /Lukomor/Scripts/Reactive.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 956de90155d541639d72da49e8f3f325 3 | timeCreated: 1691938704 -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e6b385f36224f1ab78909562de7f87c 3 | timeCreated: 1691937849 -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/IViewModel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1529f16c0ab34e1c9c2f59b149946629 3 | timeCreated: 1691936307 -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/PrefabCreation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 692b2fe40e53487fbf37cd78cee89e44 3 | timeCreated: 1692087550 -------------------------------------------------------------------------------- /Lukomor/Scripts/Reactive/IReactiveProperty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b19cf584219432c9bd10ed03023f723 3 | timeCreated: 1691938717 -------------------------------------------------------------------------------- /Lukomor/Scripts/Reactive/ReactiveCollection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b523197f1ea34ee683055386aa105ed1 3 | timeCreated: 1691938956 -------------------------------------------------------------------------------- /Lukomor/Scripts/Reactive/ReactiveProperty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d40a1c8e6204914abea87c680268956 3 | timeCreated: 1691938728 -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/StringListSearchProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83df543a4c2e4cf9a65d485a222e992a 3 | timeCreated: 1691937792 -------------------------------------------------------------------------------- /Lukomor/Scripts/Reactive/IReadOnlyReactiveCollection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebd3ec828812409f9d7f2a1a99d3e372 3 | timeCreated: 1691938916 -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/MethodBinders/ButtonMethodBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 44eae45995fb415ca888029c7beef32d 3 | timeCreated: 1692025708 -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/MethodBinders/IntMethodBinder.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.MVVM.Binders 2 | { 3 | public class IntMethodBinder : GenericMethodBinder { } 4 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/PrefabCreation/VMToGameObjectCreationBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c73028160b244ffe85d461c499c0aee4 3 | timeCreated: 1692087589 -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/MethodBinders/FloatMethodBinder.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.MVVM.Binders 2 | { 3 | public class FloatMethodBinder : GenericMethodBinder { } 4 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/PrefabCreation/VMCollectionToGameObjectCreationBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bca202f1f1c14b379a9d0a701a9dfed3 3 | timeCreated: 1692087788 -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/PrefabCreation/VMToGameObjectCreationFromListBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e87b667d54944e8794ecaa90d365592a 3 | timeCreated: 1692087904 -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/BoolUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.MVVM.Binders 2 | { 3 | public class BoolUnityEventBinder : UnityEventBinder { } 4 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/IntUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.MVVM.Binders 2 | { 3 | public class IntUnityEventBinder : UnityEventBinder { } 4 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/FloatUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.MVVM.Binders 2 | { 3 | public class FloatUnityEventBinder : UnityEventBinder { } 4 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/DoubleUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.MVVM.Binders 2 | { 3 | public class DoubleUnityEventBinder : UnityEventBinder { } 4 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/StringUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.MVVM.Binders 2 | { 3 | public class StringUnityEventBinder : UnityEventBinder { } 4 | } -------------------------------------------------------------------------------- /LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d15ee22a95f953d4ea3c5d12482d8870 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7434ae99102b70429525b01e7a1974a 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c5f704088188e04098a3c2d2db61fde 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Lukomor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3329362455aa7f4497b132c03e83195 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/MethodBinder.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.MVVM.Binders 2 | { 3 | public abstract class MethodBinder : Binder 4 | { 5 | protected string MethodName => PropertyName; 6 | } 7 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/SpriteUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class SpriteUnityEventBinder : UnityEventBinder { } 6 | } -------------------------------------------------------------------------------- /Lukomor/Lukomor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2fab455fa0c0f144b4a28f6fc7d660b 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/MaterialUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class MaterialUnityEventBinder : UnityEventBinder { } 6 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/Vector2UnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class Vector2UnityEventBinder : UnityEventBinder { } 6 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/Vector3UnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class Vector3UnityEventBinder : UnityEventBinder { } 6 | } -------------------------------------------------------------------------------- /Lukomor/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ff237a56a3b71049bb3ff4028b01085 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Lukomor/Scripts/DI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dde1fcc5b69cb2840a2931e221119300 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/TransformUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class TransformUnityEventBinder : UnityEventBinder { } 6 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/GameObjectUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class GameObjectUnityEventBinder : UnityEventBinder { } 6 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/Vector2IntUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class Vector2IntUnityEventBinder : UnityEventBinder { } 6 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/Vector3IntUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class Vector3IntUnityEventBinder : UnityEventBinder { } 6 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/ObservableUnitToUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using System.Reactive; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class ObservableUnitToUnityEventBinder : UnityEventBinder { } 6 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 970ebbfa3b60f714b8d799f98eeae946 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UIBinders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05e9fb3a01919c441855dbaa121aae24 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/MethodBinders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbfbf82faad6cb449861e688aaa9ac64 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df89746364adb614dbc533ef18bef414 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/Utils/CompareOperation.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.MVVM.Utils 2 | { 3 | public enum CompareOperation 4 | { 5 | LessThan, 6 | LessOrEqual, 7 | Equal, 8 | MoreOrEqual, 9 | More 10 | } 11 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/ViewModelToViewMapping.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lukomor.MVVM 4 | { 5 | [Serializable] 6 | public class ViewModelToViewMapping 7 | { 8 | public string ViewModelTypeFullName; 9 | public View PrefabView; 10 | } 11 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/Reactive/IReactiveProperty.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lukomor.Reactive 4 | { 5 | public interface IReactiveProperty : IObservable 6 | { 7 | T Value { get; } 8 | bool HasValue { get; } 9 | 10 | void Unsubscribe(IObserver observer); 11 | } 12 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/DI/DIEntry.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6cd285fc2a18e8c49a07743db6b179e6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/View.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59c2f4280e1cd7340a37aa0a1d7b6d8d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/DI/DIBuilder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a63673c4521042045bb40dc3a1295fac 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/DI/DIContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86b16903055d3134aa93d6d0ced09d26 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/DI/DIEntrySingleton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc2a85b971b4ce54daf6942eb1f06d85 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/DI/DIEntryTransient.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 757f1f7c86a911d46b843dcc5c2ee4c5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/Binder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75e5acefdd0f9ee41933996c0ce1800b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/MethodBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7304e130d037e449a3c5b975df4d68a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/BinderEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 899473d6225a07d4e92a8cace45869e4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/MVVMConstants.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bf41867d63d44148be0dbc43de8739c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/ViewEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce2347e9ca7c88641a2e5ca41cb2a31d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/EmptyMethodBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e42fd23546bf484089a642ac8cdd31a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/ObservableBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8924d3e31a23da540a46c8ac7fe9da7b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/MethodBinderEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d15edef7e5b9e364c8032ed5659f5e68 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/ViewModelToViewMapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9928100adbe80014caca416fee96a1ed 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/ViewModelToViewMapping.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ae86fe649bdd2b4ca471ea0486f4d1f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/Reactive/ReactiveSubscription.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c5d5fb935843574cbf9bd1671683be0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/GenericMethodBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29258dce43c60634fa85e8dd103be322 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/Utils/CompareOperation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1e05d07da8becf4bb355a7bc8ee0279 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/EmptyMethodBinderEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 418d0e3e8a798974499cfcd9cdd9f7df 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/ObservableBinderBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5adeacaf256c1fa4a8685a4f7fc3ad9a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/ObservableBinderEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7b1c37ef91b59f4dbede4af8b98df56 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/ViewModelsEditorUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2382681e1f66cc14e8050ca8e3670c37 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/Reactive/IReadOnlyReactiveCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Lukomor.Reactive 5 | { 6 | public interface IReadOnlyReactiveCollection : IReadOnlyCollection 7 | { 8 | IObservable Added { get; } 9 | IObservable Removed { get; } 10 | } 11 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/Reactive/SingleReactiveProperty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4ae2ffb2f781034a9ddf52937b7ba4f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/ObservableCollectionBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4515326ddfad6db40a4357299774e8f5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UIBinders/CloseWindowBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4a0a372b8250d54d9f38b9ce987be53 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/GenericMethodBinderEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0911949a70dca86418837b5c0caf80da 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/MethodBinders/FloatMethodBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 812626c916dfb794fa81974eb906ca0f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/MethodBinders/IntMethodBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8be9090e46c410445a93eafe0de622b9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/Utils/CompareOperationExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0bd3e0bb152a86049aeaba8727a03466 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/ObservableCollectionBinderEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdc67e71092c4054cb018c4a2b4e1967 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/IntUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 621ff4d407ab1af4ca67e884ed15b5ae 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/UnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 159a36587bf0aae4f8657f6eb48a39a9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/ViewModelToViewMappingPropertyDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5967e639e07b9ac4085c6a8fe568fc99 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/BoolUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab6844eebe8ba3c4ab4d9649773d2d8d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/DoubleUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b67150fbcaeb38943bcbd93f9a9aa9bd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/FloatUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ba7e51fd4daf464c94e671b96434635 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/MaterialUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 775db6d0567e375439001cad142106af 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/SpriteUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4dc20609ee6fa7448dc9d622262dd5a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/StringUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b40c37fb527bf1b48a487320194acaaf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/Vector2UnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f1075852761d674dacf0f37b71572a8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/Vector3UnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80909a0bf272fe848942361c804eb831 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/BoolToColorUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebee3d65c65df084596a97a3b979e384 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/BoolToSpriteUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ac764ce3e8f9364ea98b10861241b31 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/DoubleToTextUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2eaf123eb52603e4dbaa850ab2f108b0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/FloatToTextUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f57e75b6c477be48826bb153a4025fe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/GameObjectUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f8f99aa06c207943b94c3c3c41c9c1c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/IntToBoolUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50789a5b34ca40f4b825ead5ea28dfc0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/IntToColorUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ca16ae64651dfd46881648850e94fbb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/IntToSpriteUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e41c2dcb3dfb2f24b92c9f45cb6de3a9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/IntToTextUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81441db0ec45baa4cad1f20b4b6f7409 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/TransformUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c1f02fdc95c0ef48b50a5fdfb2762ca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/Vector2IntUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc33d5a47127cac47b5baa475a3a70c2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/Vector3IntUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89e9aeeb5ef1c4d44ae4b75d1bd210a1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/ObservableUnitToUnityEventBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 933a87f731cace44c8da069ecfd2741f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/PrefabCreation/VMCollectionToGameObjectFromListCreationBinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40326e04b9dfe274b95557aede2ad387 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Lukomor/Lukomor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Lukomor", 3 | "rootNamespace": "Lukomor", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/DI/DIBuilder.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.DI 2 | { 3 | public sealed class DIBuilder 4 | { 5 | private readonly DIEntry _entry; 6 | 7 | public DIBuilder(DIEntry entry) 8 | { 9 | _entry = entry; 10 | } 11 | 12 | public T CreateInstance() 13 | { 14 | return _entry.Resolve(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/DI/DIEntryTransient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lukomor.DI 4 | { 5 | public sealed class DIEntryTransient: DIEntry 6 | { 7 | public DIEntryTransient(DIContainer diContainer, Func factory) : base(diContainer, factory) { } 8 | 9 | public override T Resolve() 10 | { 11 | return Factory(DiContainer); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/UnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Events; 3 | 4 | namespace Lukomor.MVVM.Binders 5 | { 6 | public abstract class UnityEventBinder : ObservableBinder 7 | { 8 | [SerializeField] private UnityEvent _event; 9 | 10 | protected override void OnPropertyChanged(T newValue) 11 | { 12 | _event.Invoke(newValue); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/IntToTextUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Events; 3 | 4 | namespace Lukomor.MVVM.Binders 5 | { 6 | public class IntToTextUnityEventBinder : ObservableBinder 7 | { 8 | [SerializeField] private UnityEvent _event; 9 | 10 | protected override void OnPropertyChanged(int newValue) 11 | { 12 | _event.Invoke(newValue.ToString()); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/FloatToTextUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Events; 3 | 4 | namespace Lukomor.MVVM.Binders 5 | { 6 | public class FloatToTextUnityEventBinder : ObservableBinder 7 | { 8 | [SerializeField] private UnityEvent _event; 9 | 10 | protected override void OnPropertyChanged(float newValue) 11 | { 12 | _event.Invoke(newValue.ToString("0.00")); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/PrefabCreation/VMToGameObjectCreationBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class VMToGameObjectCreationBinder : ObservableBinder 6 | { 7 | [SerializeField] private View _prefabView; 8 | 9 | protected override void OnPropertyChanged(IViewModel newValue) 10 | { 11 | var createdView = Instantiate(_prefabView, transform); 12 | 13 | createdView.Bind(newValue); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/MVVMConstants.cs: -------------------------------------------------------------------------------- 1 | namespace Lukomor.MVVM.Editor 2 | { 3 | public static class MVVMConstants 4 | { 5 | public const string NONE = "None"; 6 | public const string METHOD_NAME = "Method Name:"; 7 | public const string PROPERTY_NAME = "Property Name:"; 8 | public const string SEARCH = "Search"; 9 | public const string VIEW_MODEL = "ViewModel:"; 10 | public const string SCRIPT = "Script:"; 11 | public const string HIGHLIGHT_PARENT_VIEW = "Highlight Parent View"; 12 | } 13 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/DoubleToTextUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Events; 3 | 4 | namespace Lukomor.MVVM.Binders 5 | { 6 | public class DoubleToTextUnityEventBinder : ObservableBinder 7 | { 8 | [SerializeField] private string _format = "0.00"; 9 | [SerializeField] private UnityEvent _event; 10 | 11 | protected override void OnPropertyChanged(double newValue) 12 | { 13 | _event.Invoke(newValue.ToString(_format)); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/EmptyMethodBinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class EmptyMethodBinder : MethodBinder 6 | { 7 | private event Action _action; 8 | 9 | protected override IDisposable BindInternal(IViewModel viewModel) 10 | { 11 | _action = (Action)Delegate.CreateDelegate(typeof(Action), viewModel, MethodName); 12 | 13 | return null; 14 | } 15 | 16 | public void Perform() 17 | { 18 | _action?.Invoke(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/DI/DIEntrySingleton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lukomor.DI 4 | { 5 | public sealed class DIEntrySingleton : DIEntry 6 | { 7 | private T _instance; 8 | 9 | public DIEntrySingleton(DIContainer diContainer, Func factory) : base(diContainer, factory) { } 10 | 11 | public override T Resolve() 12 | { 13 | if (_instance == null) 14 | { 15 | _instance = Factory(DiContainer); 16 | } 17 | 18 | return _instance; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/BoolToSpriteUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Events; 3 | 4 | namespace Lukomor.MVVM.Binders 5 | { 6 | public class BoolToSpriteUnityEventBinder : ObservableBinder 7 | { 8 | [SerializeField] private Sprite _spriteTrue; 9 | [SerializeField] private Sprite _spriteFalse; 10 | 11 | [SerializeField] private UnityEvent _event; 12 | 13 | protected override void OnPropertyChanged(bool newValue) 14 | { 15 | var sprite = newValue ? _spriteTrue : _spriteFalse; 16 | 17 | _event.Invoke(sprite); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/PrefabCreation/VMToGameObjectCreationFromListBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public class VMToGameObjectCreationFromListBinder : ObservableBinder 6 | { 7 | [SerializeField] private ViewModelToViewMapper _mapper; 8 | 9 | private View _createdView; 10 | 11 | protected override void OnPropertyChanged(IViewModel newValue) 12 | { 13 | var prefabView = _mapper.GetPrefab(newValue.GetType().FullName); 14 | _createdView = Instantiate(prefabView, transform); 15 | 16 | _createdView.Bind(newValue); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/BoolToColorUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Events; 3 | 4 | namespace Lukomor.MVVM.Binders 5 | { 6 | public class BoolToColorUnityEventBinder : ObservableBinder 7 | { 8 | [SerializeField] private Color _colorTrue = Color.white; 9 | [SerializeField] private Color _colorFalse = Color.white; 10 | 11 | [SerializeField] private UnityEvent _event; 12 | 13 | protected override void OnPropertyChanged(bool newValue) 14 | { 15 | var color = newValue ? _colorTrue : _colorFalse; 16 | 17 | _event.Invoke(color); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UIBinders/CloseWindowBinder.cs: -------------------------------------------------------------------------------- 1 | using System.Reactive; 2 | using UnityEngine; 3 | 4 | namespace Lukomor.MVVM.Binders 5 | { 6 | public class CloseWindowBinder : ObservableBinder 7 | { 8 | [SerializeField] private GameObject _destroyingGameObject; 9 | 10 | protected override void OnPropertyChanged(Unit newValue) 11 | { 12 | Destroy(_destroyingGameObject); 13 | } 14 | 15 | #if UNITY_EDITOR 16 | private void Reset() 17 | { 18 | if (!_destroyingGameObject) 19 | { 20 | _destroyingGameObject = gameObject; 21 | } 22 | } 23 | #endif 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/IntToBoolUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using Lukomor.MVVM.Utils; 2 | using UnityEngine; 3 | using UnityEngine.Events; 4 | 5 | namespace Lukomor.MVVM.Binders 6 | { 7 | public class IntToBoolUnityEventBinder : ObservableBinder 8 | { 9 | [SerializeField] private CompareOperation _compareOperation; 10 | [SerializeField] private int _comparingValue; 11 | 12 | [SerializeField] private UnityEvent _event; 13 | 14 | protected override void OnPropertyChanged(int newValue) 15 | { 16 | var result = _compareOperation.Compare(newValue, _comparingValue); 17 | 18 | _event.Invoke(result); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/EmptyMethodBinderEditor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Reflection; 4 | using Lukomor.MVVM.Binders; 5 | using UnityEditor; 6 | 7 | namespace Lukomor.MVVM.Editor 8 | { 9 | [CustomEditor(typeof(EmptyMethodBinder), true)] 10 | public class EmptyMethodBinderEditor : MethodBinderEditor 11 | { 12 | protected override IEnumerable GetMethodsInfo() 13 | { 14 | var viewModelType = GetViewModelType(ViewModelTypeFullName.stringValue); 15 | var allMethods = viewModelType.GetMethods() 16 | .Where(m => m.GetParameters().Length == 0 && m.ReturnType == typeof(void)); 17 | 18 | return allMethods; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Lukomor/System.Reactive.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be0d5820dd0f64d4b89ce3ca95712cec 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Lukomor/Scripts/DI/DIEntry.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lukomor.DI 4 | { 5 | public abstract class DIEntry 6 | { 7 | protected DIContainer DiContainer { get; } 8 | 9 | public DIEntry(DIContainer diContainer) 10 | { 11 | DiContainer = diContainer; 12 | } 13 | 14 | public T Resolve() 15 | { 16 | return ((DIEntry)this).Resolve(); 17 | } 18 | } 19 | 20 | public abstract class DIEntry : DIEntry 21 | { 22 | protected Func Factory { get; } 23 | 24 | public DIEntry(DIContainer diContainer, Func factory) : base(diContainer) 25 | { 26 | Factory = factory; 27 | } 28 | 29 | public abstract T Resolve(); 30 | } 31 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/GenericMethodBinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public abstract class GenericMethodBinder : MethodBinder 6 | { 7 | public abstract Type ParameterType { get; } 8 | } 9 | 10 | public class GenericMethodBinder : GenericMethodBinder 11 | { 12 | public override Type ParameterType => typeof(T); 13 | 14 | private event Action _action; 15 | 16 | protected override IDisposable BindInternal(IViewModel viewModel) 17 | { 18 | _action = (Action)Delegate.CreateDelegate(typeof(Action), viewModel, MethodName); 19 | 20 | return null; 21 | } 22 | 23 | public void Perform(T value) 24 | { 25 | _action?.Invoke(value); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/Reactive/ReactiveSubscription.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lukomor.Reactive 4 | { 5 | public sealed class ReactiveSubscription : IDisposable 6 | { 7 | private IReactiveProperty _propertyOwner; 8 | private IObserver _observer; 9 | 10 | public ReactiveSubscription(IReactiveProperty propertyOwner, IObserver observer) 11 | { 12 | _propertyOwner = propertyOwner; 13 | _observer = observer; 14 | } 15 | 16 | public void Dispose() 17 | { 18 | if (_propertyOwner == null) 19 | { 20 | return; 21 | } 22 | 23 | _propertyOwner.Unsubscribe(_observer); 24 | _propertyOwner = null; 25 | _observer = null; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/ObservableBinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lukomor.MVVM.Binders 4 | { 5 | public abstract class ObservableBinder : Binder 6 | { 7 | public abstract Type ArgumentType { get; } 8 | } 9 | 10 | public abstract class ObservableBinder : ObservableBinder 11 | { 12 | public override Type ArgumentType => typeof(T); 13 | 14 | protected sealed override IDisposable BindInternal(IViewModel viewModel) 15 | { 16 | var property = viewModel.GetType().GetProperty(PropertyName); 17 | var observable = (IObservable)property.GetValue(viewModel); 18 | var subscription = observable.Subscribe(OnPropertyChanged); 19 | 20 | return subscription; 21 | } 22 | 23 | protected abstract void OnPropertyChanged(T newValue); 24 | } 25 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.vavilichev.lukomor", 3 | "version": "5.0.7", 4 | "displayName": "Lukomor Architecture", 5 | "description": "Lukomor is an architectural template with MVVM and DI implementation for games making with Unity.", 6 | "unity": "2022.3", 7 | "keywords": [ 8 | "architecture", 9 | "code", 10 | "project", 11 | "organization", 12 | "dependency injection", 13 | "DI", 14 | "MVVM" 15 | ], 16 | "homepage": "https://github.com/vavilichev/Lukomor.git", 17 | "bugs": { 18 | "url": "https://github.com/vavilichev/Lukomor/issues" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "git+ssh://git@github.com:vavilichev/Lukomor.git" 23 | }, 24 | "license": "MIT", 25 | "author": { 26 | "name": "Andrey Vavilichev", 27 | "email": "andreyvavilichev@gmail.com", 28 | "url": "https://t.me/vavilichev" 29 | }, 30 | "license": "See LICENSE.md file" 31 | } 32 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/Utils/CompareOperationExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lukomor.MVVM.Utils 4 | { 5 | public static class CompareOperationExtensions 6 | { 7 | public static bool Compare(this CompareOperation operation, T valueA, T valueB) where T : IComparable 8 | { 9 | var result = operation switch 10 | { 11 | CompareOperation.LessThan => valueA.CompareTo(valueB) < 0, 12 | CompareOperation.LessOrEqual => valueA.CompareTo(valueB) <= 0, 13 | CompareOperation.Equal => valueA.CompareTo(valueB) == 0, 14 | CompareOperation.MoreOrEqual => valueA.CompareTo(valueB) >= 0, 15 | CompareOperation.More => valueA.CompareTo(valueB) > 0, 16 | _ => throw new ArgumentOutOfRangeException(nameof(operation), operation, null) 17 | }; 18 | 19 | return result; 20 | } 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/ViewModelToViewMapper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace Lukomor.MVVM 5 | { 6 | public class ViewModelToViewMapper : MonoBehaviour 7 | { 8 | [SerializeField] private List _prefabMappings; 9 | [SerializeField] private View _prefabByDefault; 10 | 11 | private readonly Dictionary _mappings = new(); 12 | 13 | private void Awake() 14 | { 15 | foreach (var prefabMapping in _prefabMappings) 16 | { 17 | _mappings.TryAdd(prefabMapping.ViewModelTypeFullName, prefabMapping.PrefabView); 18 | } 19 | } 20 | 21 | public View GetPrefab(string viewModelTypeFullName) 22 | { 23 | if (_mappings.TryGetValue(viewModelTypeFullName, out var value)) 24 | { 25 | return value; 26 | } 27 | 28 | return _prefabByDefault; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/ObservableBinderEditor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Lukomor.MVVM.Binders; 3 | using UnityEditor; 4 | 5 | namespace Lukomor.MVVM.Editor 6 | { 7 | [CustomEditor(typeof(ObservableBinder), true)] 8 | public class ObservableBinderEditor : ObservableBinderBase 9 | { 10 | private ObservableBinder _observableBinder; 11 | protected override SerializedProperty _propertyName { get; set; } 12 | 13 | protected override void OnEnable() 14 | { 15 | base.OnEnable(); 16 | 17 | _observableBinder = (ObservableBinder)target; 18 | _propertyName = serializedObject.FindProperty(nameof(_propertyName)); 19 | } 20 | 21 | protected override bool IsValidProperty(Type propertyType) 22 | { 23 | var requiredArgumentType = _observableBinder.ArgumentType; 24 | var requiredType = typeof(IObservable<>); 25 | 26 | return IsValidProperty(propertyType, requiredType, requiredArgumentType); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/ObservableCollectionBinderEditor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Lukomor.MVVM.Binders; 3 | using Lukomor.Reactive; 4 | using UnityEditor; 5 | 6 | namespace Lukomor.MVVM.Editor 7 | { 8 | [CustomEditor(typeof(ObservableCollectionBinder), true)] 9 | public class ObservableCollectionBinderEditor : ObservableBinderBase 10 | { 11 | private ObservableCollectionBinder _observableBinder; 12 | protected override SerializedProperty _propertyName { get; set; } 13 | 14 | protected override void OnEnable() 15 | { 16 | base.OnEnable(); 17 | 18 | _observableBinder = (ObservableCollectionBinder)target; 19 | _propertyName = serializedObject.FindProperty(nameof(_propertyName)); 20 | } 21 | 22 | protected override bool IsValidProperty(Type propertyType) 23 | { 24 | var requiredArgumentType = _observableBinder.ArgumentType; 25 | var requiredType = typeof(IReadOnlyReactiveCollection<>); 26 | 27 | return IsValidProperty(propertyType, requiredType, requiredArgumentType); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/PrefabCreation/VMCollectionToGameObjectCreationBinder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace Lukomor.MVVM.Binders 5 | { 6 | public class VMCollectionToGameObjectCreationBinder : ObservableCollectionBinder 7 | { 8 | [SerializeField] private View _prefabView; 9 | 10 | private readonly Dictionary _createdViews = new(); 11 | 12 | protected override void OnItemAdded(IViewModel value) 13 | { 14 | if (_createdViews.ContainsKey(value)) 15 | { 16 | return; 17 | } 18 | 19 | var createdView = Instantiate(_prefabView, transform); 20 | 21 | _createdViews.Add(value, createdView); 22 | createdView.Bind(value); 23 | } 24 | 25 | protected override void OnItemRemoved(IViewModel value) 26 | { 27 | if (_createdViews.TryGetValue(value, out var view)) 28 | { 29 | view.Destroy(); 30 | _createdViews.Remove(value); 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Andrey Vavilichev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included 14 | in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/ViewModelsEditorUtility.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEditor; 4 | 5 | namespace Lukomor.MVVM.Editor 6 | { 7 | public static class ViewModelsEditorUtility 8 | { 9 | public static void DefineAllViewModels(Dictionary viewModelNames) 10 | { 11 | viewModelNames.Clear(); 12 | viewModelNames[MVVMConstants.NONE] = null; 13 | 14 | var allViewModelsTypes = TypeCache.GetTypesDerivedFrom() 15 | .Where(myType => myType.IsClass && !myType.IsAbstract); 16 | 17 | foreach (var viewModelsType in allViewModelsTypes) 18 | { 19 | viewModelNames[viewModelsType.Name] = viewModelsType.FullName; 20 | } 21 | } 22 | 23 | public static string ToShortName(string viewModelTypeFullName, TypeCache.TypeCollection allViewModelTypes) 24 | { 25 | var viewModelType = allViewModelTypes.FirstOrDefault(t => t.FullName == viewModelTypeFullName); 26 | 27 | return viewModelType == null ? MVVMConstants.NONE : viewModelType.Name; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | //!/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | 57 | # Crashlytics generated file 58 | crashlytics-build.properties 59 | 60 | -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/PrefabCreation/VMCollectionToGameObjectFromListCreationBinder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace Lukomor.MVVM.Binders 5 | { 6 | public class VMCollectionToGameObjectFromListCreationBinder : ObservableCollectionBinder 7 | { 8 | [SerializeField] private ViewModelToViewMapper _mapper; 9 | 10 | private readonly Dictionary _createdViews = new(); 11 | 12 | protected override void OnItemAdded(IViewModel viewModel) 13 | { 14 | if (_createdViews.ContainsKey(viewModel)) 15 | { 16 | return; 17 | } 18 | 19 | var prefab = _mapper.GetPrefab(viewModel.GetType().FullName); 20 | var createdView = Instantiate(prefab, transform); 21 | 22 | _createdViews.Add(viewModel, createdView); 23 | createdView.Bind(viewModel); 24 | } 25 | 26 | protected override void OnItemRemoved(IViewModel viewModel) 27 | { 28 | if (_createdViews.TryGetValue(viewModel, out var view)) 29 | { 30 | view.Destroy(); 31 | _createdViews.Remove(viewModel); 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/ObservableCollectionBinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reactive.Disposables; 3 | using Lukomor.Reactive; 4 | 5 | namespace Lukomor.MVVM.Binders 6 | { 7 | public abstract class ObservableCollectionBinder : Binder 8 | { 9 | public abstract Type ArgumentType { get; } 10 | } 11 | 12 | public abstract class ObservableCollectionBinder : ObservableCollectionBinder where T : IViewModel 13 | { 14 | public override Type ArgumentType => typeof(T); 15 | 16 | protected sealed override IDisposable BindInternal(IViewModel viewModel) 17 | { 18 | var propertyInfo = viewModel.GetType().GetProperty(PropertyName); 19 | var reactiveCollection = (IReadOnlyReactiveCollection)propertyInfo.GetValue(viewModel); 20 | 21 | var addedSubscription = reactiveCollection.Added.Subscribe(OnItemAdded); 22 | var removedSubscription = reactiveCollection.Removed.Subscribe(OnItemRemoved); 23 | var compositeDisposable = new CompositeDisposable(); 24 | 25 | compositeDisposable.Add(addedSubscription); 26 | compositeDisposable.Add(removedSubscription); 27 | 28 | return compositeDisposable; 29 | } 30 | 31 | protected abstract void OnItemAdded(T value); 32 | protected abstract void OnItemRemoved(T value); 33 | } 34 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/StringListSearchProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEditor.Experimental.GraphView; 4 | using UnityEngine; 5 | 6 | namespace Lukomor.MVVM.Editor 7 | { 8 | public class StringListSearchProvider: ScriptableObject, ISearchWindowProvider 9 | { 10 | private string[] _options; 11 | private Action _callback; 12 | 13 | public void Init(string[] options, Action callback) 14 | { 15 | _options = options; 16 | _callback = callback; 17 | } 18 | 19 | public List CreateSearchTree(SearchWindowContext context) 20 | { 21 | var searchList = new List(); 22 | 23 | searchList.Add(new SearchTreeGroupEntry(new GUIContent(MVVMConstants.SEARCH), 0)); 24 | 25 | foreach (var option in _options) 26 | { 27 | var entry = new SearchTreeEntry(new GUIContent(option)); 28 | entry.level = 1; 29 | entry.userData = option; 30 | searchList.Add(entry); 31 | } 32 | 33 | return searchList; 34 | } 35 | 36 | public bool OnSelectEntry(SearchTreeEntry SearchTreeEntry, SearchWindowContext context) 37 | { 38 | _callback?.Invoke((string) SearchTreeEntry.userData); 39 | return true; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/IntToSpriteUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Events; 5 | 6 | namespace Lukomor.MVVM.Binders 7 | { 8 | public class IntToSpriteUnityEventBinder : ObservableBinder 9 | { 10 | [SerializeField] private List _mappings = new(); 11 | [SerializeField] private Sprite _spriteByDefault; 12 | 13 | [SerializeField] private UnityEvent _event; 14 | 15 | private Dictionary _spritesMap; 16 | 17 | private void Awake() 18 | { 19 | _spritesMap = new Dictionary(); 20 | 21 | foreach (var mapping in _mappings) 22 | { 23 | _spritesMap.Add(mapping.Value, mapping.Sprite); 24 | } 25 | } 26 | 27 | protected override void OnPropertyChanged(int newValue) 28 | { 29 | if (_spritesMap.TryGetValue(newValue, out var sprite)) 30 | { 31 | _event.Invoke(sprite); 32 | } 33 | 34 | _event.Invoke(_spriteByDefault); 35 | } 36 | } 37 | 38 | [Serializable] 39 | public class IntToSpriteMapping 40 | { 41 | [SerializeField] private int _value; 42 | [SerializeField] private Sprite _sprite; 43 | 44 | public int Value => _value; 45 | public Sprite Sprite => _sprite; 46 | } 47 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/UnityEventBinders/IntToColorUnityEventBinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Events; 5 | 6 | namespace Lukomor.MVVM.Binders 7 | { 8 | public class IntToColorUnityEventBinder : ObservableBinder 9 | { 10 | [SerializeField] private List _mappings = new(); 11 | [SerializeField] private Color _colorByDefault = Color.white; 12 | 13 | [SerializeField] private UnityEvent _event; 14 | 15 | private Dictionary _colorsMap; 16 | 17 | private void Awake() 18 | { 19 | _colorsMap = new Dictionary(); 20 | 21 | foreach (var mapping in _mappings) 22 | { 23 | _colorsMap.Add(mapping.Value, mapping.Color); 24 | } 25 | } 26 | 27 | protected override void OnPropertyChanged(int newValue) 28 | { 29 | if (_colorsMap.TryGetValue(newValue, out var color)) 30 | { 31 | _event.Invoke(color); 32 | } 33 | 34 | _event.Invoke(_colorByDefault); 35 | } 36 | } 37 | 38 | [Serializable] 39 | public class IntToColorMapping 40 | { 41 | [SerializeField] private int _value; 42 | [SerializeField] private Color _color = Color.white; 43 | 44 | public int Value => _value; 45 | public Color Color => _color; 46 | } 47 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/Binder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace Lukomor.MVVM.Binders 5 | { 6 | #if UNITY_EDITOR 7 | [ExecuteInEditMode] 8 | #endif 9 | public abstract class Binder : MonoBehaviour 10 | { 11 | [SerializeField, HideInInspector] private string _viewModelTypeFullName; 12 | [SerializeField, HideInInspector] private string _propertyName; 13 | 14 | public string ViewModelTypeFullName => _viewModelTypeFullName; 15 | protected string PropertyName => _propertyName; 16 | 17 | private IDisposable _binding; 18 | 19 | private void Start() 20 | { 21 | #if UNITY_EDITOR 22 | var parentView = GetComponentInParent(); 23 | parentView.RegisterBinder(this); 24 | #endif 25 | 26 | OnStart(); 27 | } 28 | 29 | protected virtual void OnStart() { } 30 | 31 | private void OnDestroy() 32 | { 33 | _binding?.Dispose(); 34 | 35 | #if UNITY_EDITOR 36 | var parentView = GetComponentInParent(); 37 | if (parentView) 38 | { 39 | parentView.RemoveBinder(this); 40 | } 41 | #endif 42 | 43 | OnDestroyed(); 44 | } 45 | 46 | protected virtual void OnDestroyed() { } 47 | 48 | public void Bind(IViewModel viewModel) 49 | { 50 | _binding = BindInternal(viewModel); 51 | } 52 | 53 | protected abstract IDisposable BindInternal(IViewModel viewModel); 54 | } 55 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Editor/GenericMethodBinderEditor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using Lukomor.MVVM.Binders; 6 | using UnityEditor; 7 | 8 | namespace Lukomor.MVVM.Editor 9 | { 10 | [CustomEditor(typeof(GenericMethodBinder), true)] 11 | public class GenericMethodBinderEditor : MethodBinderEditor 12 | { 13 | private GenericMethodBinder _genericMethodBinder; 14 | private Type _parameterType; 15 | 16 | protected override void OnEnable() 17 | { 18 | base.OnEnable(); 19 | 20 | _genericMethodBinder = (GenericMethodBinder)target; 21 | } 22 | 23 | protected override IEnumerable GetMethodsInfo() 24 | { 25 | var viewModelType = GetViewModelType(ViewModelTypeFullName.stringValue); 26 | var requiredType = _genericMethodBinder.ParameterType; 27 | 28 | var allMethods = viewModelType.GetMethods() 29 | .Where(m => 30 | { 31 | var allParameters = m.GetParameters(); 32 | 33 | if (allParameters.Length != 1) 34 | { 35 | return false; 36 | } 37 | 38 | if (m.ReturnType != typeof(void)) 39 | { 40 | return false; 41 | } 42 | 43 | var parameterType = allParameters[0].ParameterType; 44 | 45 | return parameterType == requiredType; 46 | }); 47 | 48 | return allMethods; 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /Lukomor/Scripts/MVVM/Binders/MethodBinders/ButtonMethodBinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | namespace Lukomor.MVVM.Binders 7 | { 8 | [RequireComponent(typeof(Button))] 9 | public class ButtonMethodBinder : EmptyMethodBinder 10 | { 11 | [SerializeField] private Button _button; 12 | 13 | private IViewModel _viewModel; 14 | private MethodInfo _cachedMethod; 15 | 16 | private void OnEnable() 17 | { 18 | #if UNITY_EDITOR 19 | if (!Application.isPlaying) 20 | { 21 | return; 22 | } 23 | #endif 24 | _button.onClick.AddListener(OnClick); 25 | 26 | } 27 | 28 | private void OnDisable() 29 | { 30 | #if UNITY_EDITOR 31 | if (!Application.isPlaying) 32 | { 33 | return; 34 | } 35 | #endif 36 | 37 | _button.onClick.RemoveListener(OnClick); 38 | } 39 | 40 | protected override IDisposable BindInternal(IViewModel viewModel) 41 | { 42 | _viewModel = viewModel; 43 | _cachedMethod = viewModel.GetType().GetMethod(MethodName); 44 | 45 | return base.BindInternal(viewModel); 46 | } 47 | 48 | private void OnClick() 49 | { 50 | _cachedMethod.Invoke(_viewModel, null); 51 | } 52 | 53 | #if UNITY_EDITOR 54 | private void Reset() 55 | { 56 | if (_button == null) 57 | { 58 | _button = GetComponent