├── .gitattributes ├── .gitignore ├── DragonECS-Unity.asmdef ├── DragonECS-Unity.asmdef.meta ├── LICENSE.md ├── LICENSE.md.meta ├── README-RU.md ├── README-RU.md.meta ├── README.md ├── README.md.meta ├── package.json ├── package.json.meta ├── src.meta └── src ├── Buildin.meta ├── Buildin ├── EcsDefaultWorldProvider.cs ├── EcsDefaultWorldProvider.cs.meta ├── EcsDefaultWorldSingletonProvider.cs ├── EcsDefaultWorldSingletonProvider.cs.meta ├── EcsRootUnity.cs ├── EcsRootUnity.cs.meta ├── EcsRootUnitySingleton.cs ├── EcsRootUnitySingleton.cs.meta ├── EcsWorldProvider.cs ├── EcsWorldProvider.cs.meta ├── Editor.meta ├── Editor │ ├── EcsRootUnityEditor.cs │ └── EcsRootUnityEditor.cs.meta ├── UnityComponent.cs ├── UnityComponent.cs.meta ├── UnityGameCyclieProcesses.cs └── UnityGameCyclieProcesses.cs.meta ├── Connectors.meta ├── Connectors ├── AutoEntityCreator.cs ├── AutoEntityCreator.cs.meta ├── EcsEntityConnect.cs ├── EcsEntityConnect.cs.meta ├── EcsPipelineProvider.cs ├── EcsPipelineProvider.cs.meta ├── EcsWorldProvider.cs ├── EcsWorldProvider.cs.meta ├── Editor.meta ├── Editor │ ├── AutoEntityCreatorEditor.cs │ ├── AutoEntityCreatorEditor.cs.meta │ ├── EcsEntityConnectEditor.cs │ ├── EcsEntityConnectEditor.cs.meta │ ├── EcsWorldProviderBaseEditor.cs │ └── EcsWorldProviderBaseEditor.cs.meta ├── GameObjectConnect.cs └── GameObjectConnect.cs.meta ├── Consts.cs ├── Consts.cs.meta ├── DebugUtils.meta ├── DebugUtils ├── DefinesUtility.cs ├── DefinesUtility.cs.meta ├── Editor.meta ├── Editor │ ├── EntlongDrawer.cs │ ├── EntlongDrawer.cs.meta │ ├── SettingsEditor.cs │ ├── SettingsEditor.cs.meta │ ├── UserSettingsPrefs.cs │ └── UserSettingsPrefs.cs.meta ├── Monitors.meta ├── Monitors │ ├── Editor.meta │ ├── Editor │ │ ├── EntityEditorBlockDrawer.cs │ │ ├── EntityEditorBlockDrawer.cs.meta │ │ ├── EntityMonitorEditor.cs │ │ ├── EntityMonitorEditor.cs.meta │ │ ├── PipelineMonitorEditor.cs │ │ ├── PipelineMonitorEditor.cs.meta │ │ ├── PipelineProcessesMonitorEditor.cs │ │ ├── PipelineProcessesMonitorEditor.cs.meta │ │ ├── WorldMonitorEditor.cs │ │ ├── WorldMonitorEditor.cs.meta │ │ ├── WorldQueriesMonitorEditor.cs │ │ └── WorldQueriesMonitorEditor.cs.meta │ ├── EntityMonitor.cs │ ├── EntityMonitor.cs.meta │ ├── PipelineMonitor.cs │ ├── PipelineMonitor.cs.meta │ ├── PipelineProcessMonitor.cs │ ├── PipelineProcessMonitor.cs.meta │ ├── WorldMonitor.cs │ ├── WorldMonitor.cs.meta │ ├── WorldQueriesMonitor.cs │ └── WorldQueriesMonitor.cs.meta ├── UnityDebugModule.cs ├── UnityDebugModule.cs.meta ├── UnityDebugService.meta └── UnityDebugService │ ├── UnityDebugService.cs │ ├── UnityDebugService.cs.meta │ ├── UnityDebugServiceStorage.cs │ └── UnityDebugServiceStorage.cs.meta ├── Internal.meta ├── Internal ├── AddParamsDrawer.cs ├── AddParamsDrawer.cs.meta ├── BitMask.cs ├── BitMask.cs.meta ├── Config.cs ├── Config.cs.meta ├── CustomToggleAttribute.cs ├── CustomToggleAttribute.cs.meta ├── DragonArrayUtility.cs ├── DragonArrayUtility.cs.meta ├── Editor.meta ├── Editor │ ├── DragonGUIContent.cs │ ├── DragonGUIContent.cs.meta │ ├── EcsGUI.Layout.cs │ ├── EcsGUI.Layout.cs.meta │ ├── EcsGUI.cs │ ├── EcsGUI.cs.meta │ ├── ExpandMatrix.cs │ ├── ExpandMatrix.cs.meta │ ├── ExtendedEditor.cs │ ├── ExtendedEditor.cs.meta │ ├── MetaObjectsDropDown.cs │ ├── MetaObjectsDropDown.cs.meta │ ├── RuntimeComponentsDrawer.cs │ ├── RuntimeComponentsDrawer.cs.meta │ ├── SOWrappers.meta │ ├── SOWrappers │ │ ├── RefEditorWrapper.cs │ │ ├── RefEditorWrapper.cs.meta │ │ ├── WrapperBase.cs │ │ └── WrapperBase.cs.meta │ ├── UnityEditorUtility.cs │ └── UnityEditorUtility.cs.meta ├── EntLongExtentions.cs ├── EntLongExtentions.cs.meta ├── EscEditorConsts.cs ├── EscEditorConsts.cs.meta ├── Icons.meta ├── Icons │ ├── AutosetCascadeIcon.png │ ├── AutosetCascadeIcon.png.meta │ ├── AutosetIcon.png │ ├── AutosetIcon.png.meta │ ├── CloseIcon.png │ ├── CloseIcon.png.meta │ ├── CloseIconOn.png │ ├── CloseIconOn.png.meta │ ├── ErrorIcon.png │ ├── ErrorIcon.png.meta │ ├── FileIcon.png │ ├── FileIcon.png.meta │ ├── HelpIcon.png │ ├── HelpIcon.png.meta │ ├── HyperlinkIcon.png │ ├── HyperlinkIcon.png.meta │ ├── Icons.cs │ ├── Icons.cs.meta │ ├── LabelIconMeta.png │ ├── LabelIconMeta.png.meta │ ├── LabelIconType.png │ ├── LabelIconType.png.meta │ ├── MetaIDIcon.png │ ├── MetaIDIcon.png.meta │ ├── PassIocn.png │ ├── PassIocn.png.meta │ ├── RepaireIcon.png │ ├── RepaireIcon.png.meta │ ├── Resources.meta │ ├── Resources │ │ ├── Icons.asset │ │ └── Icons.asset.meta │ ├── SearchIcon.png │ ├── SearchIcon.png.meta │ ├── UnlinkIcon.png │ ├── UnlinkIcon.png.meta │ ├── VisibilityIconOff.png │ ├── VisibilityIconOff.png.meta │ ├── VisibilityIconOn.png │ ├── VisibilityIconOn.png.meta │ ├── WarningIcon.png │ └── WarningIcon.png.meta ├── MonoScriptsAssetProcessor.cs ├── MonoScriptsAssetProcessor.cs.meta ├── ReferenceButtonAttributeDrawer.cs ├── ReferenceButtonAttributeDrawer.cs.meta ├── ReflectionExtensions.cs ├── ReflectionExtensions.cs.meta ├── ScriptsCache.cs ├── ScriptsCache.cs.meta ├── SparseArray.cs ├── SparseArray.cs.meta ├── Utils.meta └── Utils │ ├── ColorUtility.cs │ ├── ColorUtility.cs.meta │ ├── ReadOnlyList.cs │ ├── ReadOnlyList.cs.meta │ ├── RectUtility.cs │ ├── RectUtility.cs.meta │ ├── StructList.cs │ ├── StructList.cs.meta │ ├── Throw.cs │ └── Throw.cs.meta ├── Templates.meta ├── Templates ├── EntityTemplate.meta ├── EntityTemplate │ ├── ComponentTemplateProperty.cs │ ├── ComponentTemplateProperty.cs.meta │ ├── Editor.meta │ ├── Editor │ │ ├── ComponentTemplatePropertyDrawer.cs │ │ ├── ComponentTemplatePropertyDrawer.cs.meta │ │ ├── EntityTemplateEditor.cs │ │ └── EntityTemplateEditor.cs.meta │ ├── ITemplateNode.cs │ ├── ITemplateNode.cs.meta │ ├── Templates.meta │ └── Templates │ │ ├── ComponentTemplateBase.cs │ │ ├── ComponentTemplateBase.cs.meta │ │ ├── MonoEntityTemplate.cs │ │ ├── MonoEntityTemplate.cs.meta │ │ ├── ScriptableEntityTemplate.cs │ │ └── ScriptableEntityTemplate.cs.meta ├── PipelineTemplate.meta └── PipelineTemplate │ ├── Editor.meta │ ├── Editor │ ├── PipelineTemplateEditor.cs │ ├── PipelineTemplateEditor.cs.meta │ ├── PipelineTemplateUtilityRecordDrawer.cs │ └── PipelineTemplateUtilityRecordDrawer.cs.meta │ ├── MonoBehaviourSystemWrapper.cs │ ├── MonoBehaviourSystemWrapper.cs.meta │ ├── PipelineTemplateUtility.cs │ ├── PipelineTemplateUtility.cs.meta │ ├── ScriptableObjectSystemWrapper.cs │ ├── ScriptableObjectSystemWrapper.cs.meta │ ├── Templates.meta │ └── Templates │ ├── MonoPipelineTemplate.cs │ ├── MonoPipelineTemplate.cs.meta │ ├── ScriptablePipelineTemplate.cs │ └── ScriptablePipelineTemplate.cs.meta ├── Tools.meta ├── Tools ├── DeepDebugger.meta ├── DeepDebugger │ ├── Editors.meta │ └── Editors │ │ ├── DeepDebuggerWindow.cs │ │ └── DeepDebuggerWindow.cs.meta ├── DragonDocs.meta ├── DragonDocs │ ├── DragonDocs.cs │ ├── DragonDocs.cs.meta │ ├── DragonDocsMeta.cs │ ├── DragonDocsMeta.cs.meta │ ├── Editors.meta │ └── Editors │ │ ├── DragonDocsPrefs.cs │ │ ├── DragonDocsPrefs.cs.meta │ │ ├── DragonDocsWindow.cs │ │ └── DragonDocsWindow.cs.meta ├── MetaIDgenerator.meta ├── MetaIDgenerator │ ├── Editors.meta │ └── Editors │ │ ├── MetaIDGenerator.cs │ │ └── MetaIDGenerator.cs.meta ├── RefRepairer.meta └── RefRepairer │ ├── CollectedAssetMissingRecord.cs │ ├── CollectedAssetMissingRecord.cs.meta │ ├── Editor.meta │ ├── Editor │ ├── MetaIDRegistry.cs │ ├── MetaIDRegistry.cs.meta │ ├── RefRepairerWindow.cs │ └── RefRepairerWindow.cs.meta │ ├── MissingRefContainer.cs │ ├── MissingRefContainer.cs.meta │ ├── MissingsResolvingData.cs │ ├── MissingsResolvingData.cs.meta │ ├── RepaireFileUtility.cs │ ├── RepaireFileUtility.cs.meta │ ├── TypeData.cs │ ├── TypeData.cs.meta │ ├── UnityObjectDataBase.cs │ └── UnityObjectDataBase.cs.meta ├── Utils.meta └── Utils ├── MetaColorExstensions.cs ├── MetaColorExstensions.cs.meta ├── ReferenceButtonAttribute.cs └── ReferenceButtonAttribute.cs.meta /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.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/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.sln.meta 39 | *.suo 40 | *.tmp 41 | *.user 42 | *.userprefs 43 | *.pidb 44 | *.booproj 45 | *.svd 46 | *.pdb 47 | *.mdb 48 | *.opendb 49 | *.VC.db 50 | 51 | # Unity3D generated meta files 52 | *.pidb.meta 53 | *.pdb.meta 54 | *.mdb.meta 55 | 56 | # Unity3D generated file on crash reports 57 | sysinfo.txt 58 | 59 | # Builds 60 | *.apk 61 | *.aab 62 | *.unitypackage 63 | *.app 64 | 65 | # Crashlytics generated file 66 | crashlytics-build.properties 67 | 68 | # Packed Addressables 69 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 70 | 71 | # Temporary auto-generated Android Assets 72 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 73 | /[Aa]ssets/[Ss]treamingAssets/aa/* 74 | -------------------------------------------------------------------------------- /DragonECS-Unity.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DCFApixels.DragonECS.Unity", 3 | "rootNamespace": "DCFApixels", 4 | "references": [ 5 | "GUID:abb125fa67fff1e45914d0825236f608" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": true, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /DragonECS-Unity.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1b0feb9d48fee64da21a08eeb2fafd4 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Mikhail(DCFApixels) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ef75f5af61ea7c4ea8fe3ef92d02b35 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README-RU.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f22e8e5250fe1d49bd520dfa5b89e47 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

6 | Version 7 | GitHub 8 | Discord 9 | QQ 10 |

11 | 12 | # Integration with Unity for [DragonECS](https://github.com/DCFApixels/DragonECS) 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 33 | 34 |
Readme Languages:
22 | 23 |
24 | Русский 25 |
26 |
28 | 29 |
30 | English(WIP) 31 |
32 |
35 | 36 |
37 | 38 | The extension will add a set of tools for debugging and communicating with the Unity engine. 39 | 40 | > [!WARNING] 41 | > The project is a work in progress, API may change. 42 | > 43 | > While the English version of the README is incomplete, you can view the [Russian version](https://github.com/DCFApixels/DragonECS-Unity/blob/main/README-RU.md). 44 | 45 |
46 | 47 | # Installation 48 | Versioning semantics - [Open](https://gist.github.com/DCFApixels/e53281d4628b19fe5278f3e77a7da9e8#file-dcfapixels_versioning_ru-md) 49 | ## Environment 50 | Requirements: 51 | + Dependency: [DragonECS](https://github.com/DCFApixels/DragonECS) 52 | + Minimum version of C# 8.0; 53 | + Minimum version of Unity 2021.2.0; 54 | 55 | Tested with: 56 | + **Unity:** Minimum version 2021.2.0; 57 | 58 | ## Unity Installation 59 | * ### Unity Package 60 | The package can be installed as a Unity package by adding the Git URL [in the PackageManager](https://docs.unity3d.com/2023.2/Documentation/Manual/upm-ui-giturl.html) or manually adding it to `Packages/manifest.json`: 61 | ``` 62 | https://github.com/DCFApixels/DragonECS-Unity.git 63 | ``` 64 | * ### Source Code 65 | The package can also be added to the project as source code. 66 | 67 |
68 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f63a4d70d00eb641ba88fa50962d963 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.dcfa_pixels.dragonecs-unity", 3 | "author": 4 | { 5 | "name": "DCFApixels", 6 | "url": "https://github.com/DCFApixels" 7 | }, 8 | "displayName": "DragonECS-Unity", 9 | "description": "Integration with Unity for DragonECS", 10 | "unity": "2021.2", 11 | "version": "0.5.15", 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/DCFApixels/DragonECS-Unity.git" 15 | }, 16 | "dependencies": { 17 | "com.dcfa_pixels.dragonecs": "https://github.com/DCFApixels/DragonECS.git" 18 | }, 19 | 20 | "keywords": 21 | [ 22 | "ecs", 23 | "dragonecs", 24 | "extension", 25 | "add-on", 26 | "unity" 27 | ] 28 | } -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fea6f5ebb9d0faa45ae5c702895a98ea 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /src.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d12f3413368d5c4aa87dcfe7c4c2792 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Buildin.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2b9c91714b4752468a3a5691cbf5237 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Buildin/EcsDefaultWorldProvider.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DCFApixels.DragonECS 4 | { 5 | [CreateAssetMenu(fileName = nameof(EcsDefaultWorldProvider), menuName = EcsConsts.FRAMEWORK_NAME + "/Providers/" + nameof(EcsDefaultWorldProvider), order = 1)] 6 | public class EcsDefaultWorldProvider : EcsWorldProvider 7 | { 8 | protected override EcsDefaultWorld BuildWorld(ConfigContainer configs) { return new EcsDefaultWorld(configs, WorldName, WorldID); } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Buildin/EcsDefaultWorldProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 225611c58d4ed2c4997a316a67db3c3a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Buildin/EcsDefaultWorldSingletonProvider.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DCFApixels.DragonECS 4 | { 5 | [CreateAssetMenu(fileName = NAME, menuName = EcsConsts.FRAMEWORK_NAME + "/Providers/" + NAME, order = 1)] 6 | public class EcsDefaultWorldSingletonProvider : EcsWorldProvider 7 | { 8 | private const string NAME = "SingletonDefaultWorld"; 9 | private static EcsDefaultWorldSingletonProvider _instance; 10 | public static EcsDefaultWorldSingletonProvider Instance 11 | { 12 | get 13 | { 14 | if (_instance == null) 15 | { 16 | _instance = FindOrCreateSingleton(NAME); 17 | } 18 | return _instance; 19 | } 20 | } 21 | protected override EcsDefaultWorld BuildWorld(ConfigContainer configs) { return new EcsDefaultWorld(configs, WorldName, WorldID); } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Buildin/EcsDefaultWorldSingletonProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7592c6e5a68845c4abeac089e561d8c7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Buildin/EcsRootUnity.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05638ccfe0703e549a32dd534f99de3b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Buildin/EcsRootUnitySingleton.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DCFApixels.DragonECS 4 | { 5 | [DisallowMultipleComponent] 6 | [RequireComponent(typeof(EcsRootUnity))] 7 | [AddComponentMenu(EcsConsts.FRAMEWORK_NAME + "/" + nameof(EcsRootUnitySingleton), 30)] 8 | public class EcsRootUnitySingleton : MonoBehaviour 9 | { 10 | [SerializeField] 11 | private EcsRootUnity _root; 12 | [SerializeField] 13 | private bool _dontDestroyOnLoad = true; 14 | 15 | private static EcsRootUnitySingleton _singletonInstance; 16 | public static EcsRootUnity Instance 17 | { 18 | get 19 | { 20 | if (_singletonInstance == null) 21 | { 22 | #if UNITY_6000_0_OR_NEWER 23 | _singletonInstance = FindFirstObjectByType(); 24 | #else 25 | _singletonInstance = FindObjectOfType(); 26 | #endif 27 | } 28 | return _singletonInstance?._root; 29 | } 30 | } 31 | private void Awake() 32 | { 33 | if (_dontDestroyOnLoad) 34 | { 35 | DontDestroyOnLoad(gameObject); 36 | } 37 | } 38 | private void OnValidate() 39 | { 40 | _root = GetComponent(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Buildin/EcsRootUnitySingleton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2baa1c20021ec540b0c5399aba0db86 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Buildin/EcsWorldProvider.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DCFApixels.DragonECS 4 | { 5 | [CreateAssetMenu(fileName = nameof(EcsWorldProvider), menuName = EcsConsts.FRAMEWORK_NAME + "/Providers/" + nameof(EcsWorldProvider), order = 1)] 6 | public class EcsWorldProvider : EcsWorldProvider 7 | { 8 | protected override EcsWorld BuildWorld(ConfigContainer configs) { return new EcsWorld(configs, WorldName, WorldID); } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Buildin/EcsWorldProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15b6f990a7e05b34a937a9a850d7c68c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Buildin/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a05eab751afe96d408cfe00ba94603f1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Buildin/Editor/EcsRootUnityEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e88d839647795145973d4327272c6e0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Buildin/UnityComponent.cs: -------------------------------------------------------------------------------- 1 | using DCFApixels.DragonECS.Unity; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.Runtime.CompilerServices; 6 | using UnityEngine; 7 | 8 | namespace DCFApixels.DragonECS 9 | { 10 | using static EcsConsts; 11 | 12 | [Serializable] 13 | [MetaColor(MetaColor.DragonCyan)] 14 | [MetaGroup(EcsUnityConsts.PACK_GROUP, COMPONENTS_GROUP)] 15 | [MetaDescription(AUTHOR, "Component-reference to Unity object for EcsPool.")] 16 | [MetaID("DragonECS_734F667C9201B80F1913388C2A8BB689")] 17 | [MetaTags(MetaTags.ENGINE_MEMBER)] 18 | public struct UnityComponent : IEcsComponent, IEnumerable//IntelliSense hack 19 | where T : Component 20 | { 21 | public T obj; 22 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 23 | public UnityComponent(T obj) 24 | { 25 | this.obj = obj; 26 | } 27 | IEnumerator IEnumerable.GetEnumerator() { throw new NotSupportedException(); }//IntelliSense hack 28 | IEnumerator IEnumerable.GetEnumerator() { throw new NotSupportedException(); }//IntelliSense hack 29 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 30 | public static implicit operator T(UnityComponent a) { return a.obj; } 31 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 32 | public static implicit operator UnityComponent(T a) { return new UnityComponent(a); } 33 | public override string ToString() 34 | { 35 | return $"UnityComponent<{typeof(T).ToMeta().TypeName}>"; 36 | } 37 | } 38 | 39 | internal static class UnityComponentConsts 40 | { 41 | internal const string UNITY_COMPONENT_NAME = "UnityComponent"; 42 | public static readonly MetaGroup BaseGroup = MetaGroup.FromName(UNITY_COMPONENT_NAME); 43 | } 44 | [MetaColor(MetaColor.DragonCyan)] 45 | [MetaGroup(EcsUnityConsts.PACK_GROUP, OTHER_GROUP)] 46 | [MetaDescription(AUTHOR, "Template for UnityComponent")] 47 | [MetaID("DragonECS_13DAACF9910155DD27F822442987E0AE")] 48 | public abstract class UnityComponentTemplate : ComponentTemplateBase> where T : Component 49 | { 50 | public override string Name 51 | { 52 | get { return typeof(T).Name; } 53 | } 54 | public override MetaGroup Group 55 | { 56 | get { return UnityComponentConsts.BaseGroup; } 57 | } 58 | public sealed override void Apply(short worldID, int entityID) 59 | { 60 | EcsWorld.GetPoolInstance>>(worldID).TryAddOrGet(entityID) = component; 61 | } 62 | public override void OnValidate(UnityEngine.Object obj) 63 | { 64 | if (component.obj == null) 65 | { 66 | if (obj is GameObject go) 67 | { 68 | component.obj = go.GetComponent(); 69 | } 70 | } 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /src/Buildin/UnityComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 637d69c48b6c0164abe654cd7f5ceb07 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Buildin/UnityGameCyclieProcesses.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b692b77d059ff445912bada1712ccab 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Connectors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b32116c3998f6742a35e492a88176be 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Connectors/AutoEntityCreator.cs: -------------------------------------------------------------------------------- 1 | #if DISABLE_DEBUG 2 | #undef DEBUG 3 | #endif 4 | using DCFApixels.DragonECS.Unity; 5 | using UnityEngine; 6 | 7 | namespace DCFApixels.DragonECS 8 | { 9 | using static EcsConsts; 10 | 11 | [DisallowMultipleComponent] 12 | [AddComponentMenu(FRAMEWORK_NAME + "/" + nameof(AutoEntityCreator), 30)] 13 | [MetaColor(MetaColor.DragonCyan)] 14 | [MetaGroup(EcsUnityConsts.PACK_GROUP, EcsUnityConsts.ENTITY_BUILDING_GROUP)] 15 | [MetaDescription(AUTHOR, nameof(MonoBehaviour) + ". Automatically creates an entity in the selected world and connects it to EcsEntityConnect.")] 16 | [MetaID("DragonECS_D699B3809201285A46DDF91BCF0540A7")] 17 | public class AutoEntityCreator : MonoBehaviour 18 | { 19 | [SerializeField] 20 | private EcsEntityConnect _connect; 21 | [SerializeField] 22 | private EcsWorldProviderBase _world; 23 | 24 | private bool _started; 25 | 26 | #region Properties 27 | public EcsEntityConnect Connect 28 | { 29 | get { return _connect; } 30 | } 31 | public EcsWorldProviderBase World 32 | { 33 | get { return _world; } 34 | } 35 | #endregion 36 | 37 | #region UnityEvents 38 | private void OnValidate() 39 | { 40 | if (_world == null) 41 | { 42 | AutoResolveWorldProviderDependensy(); 43 | } 44 | } 45 | private void Start() { ManualStart(); } 46 | #endregion 47 | 48 | #region Methods 49 | private void AutoResolveWorldProviderDependensy() 50 | { 51 | _world = AutoGetWorldProvider(); 52 | } 53 | protected virtual EcsWorldProviderBase AutoGetWorldProvider() 54 | { 55 | return EcsDefaultWorldSingletonProvider.Instance; 56 | } 57 | public void ManualStart() 58 | { 59 | if (_started) { return; } 60 | ManualCreate(); 61 | _started = true; 62 | } 63 | public void ManualCreate() 64 | { 65 | if (_world == null) 66 | { 67 | AutoResolveWorldProviderDependensy(); 68 | } 69 | InitConnect(_connect, _world.GetRaw()); 70 | } 71 | 72 | private void InitConnect(EcsEntityConnect connect, EcsWorld world) 73 | { 74 | if (connect.IsConnected) { return; } 75 | connect.ConnectWith(CreateEntity(world), true); 76 | } 77 | protected virtual entlong CreateEntity(EcsWorld world) 78 | { 79 | return world.NewEntityLong(); 80 | } 81 | #endregion 82 | 83 | #region Editor 84 | #if UNITY_EDITOR 85 | [ContextMenu("Autoset")] 86 | internal void Autoset_Editor() 87 | { 88 | foreach (var connect in GetComponentsInChildren()) 89 | { 90 | if (connect.GetComponentInParent() == this) 91 | { 92 | _connect = connect; 93 | AutoResolveWorldProviderDependensy(); 94 | break; 95 | } 96 | } 97 | } 98 | [ContextMenu("Autoset Cascade")] 99 | internal void AutosetCascade_Editor() 100 | { 101 | foreach (var target in GetComponentsInChildren()) 102 | { 103 | target.Autoset_Editor(); 104 | } 105 | 106 | } 107 | #endif 108 | #endregion 109 | } 110 | } -------------------------------------------------------------------------------- /src/Connectors/AutoEntityCreator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e244d7ed454067a4bb82fecd87513856 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Connectors/EcsEntityConnect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 495156623a7b1e94087f916ba42745e6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Connectors/EcsPipelineProvider.cs: -------------------------------------------------------------------------------- 1 | #if DISABLE_DEBUG 2 | #undef DEBUG 3 | #endif 4 | using UnityEngine; 5 | #if UNITY_EDITOR 6 | using UnityEditor; 7 | #endif 8 | 9 | namespace DCFApixels.DragonECS 10 | { 11 | [CreateAssetMenu(fileName = nameof(EcsWorldProvider), menuName = EcsConsts.FRAMEWORK_NAME + "/Providers/" + nameof(EcsWorldProvider), order = 1)] 12 | public class EcsPipelineProvider : ScriptableObject 13 | { 14 | private EcsPipeline _pipeline; 15 | private static EcsPipelineProvider _singletonInstance; 16 | 17 | #region Properties 18 | public bool IsEmpty 19 | { 20 | get { return _pipeline == null; } 21 | } 22 | public static EcsPipelineProvider SingletonInstance 23 | { 24 | get 25 | { 26 | if (_singletonInstance == null) 27 | { 28 | _singletonInstance = FindOrCreateSingleton(); 29 | } 30 | return _singletonInstance; 31 | } 32 | } 33 | #endregion 34 | 35 | #region Methods 36 | public void Set(EcsPipeline pipeline) 37 | { 38 | _pipeline = pipeline; 39 | } 40 | public EcsPipeline GetCurrentPipeline() 41 | { 42 | return _pipeline; 43 | } 44 | protected static EcsPipelineProvider FindOrCreateSingleton() 45 | { 46 | return FindOrCreateSingleton(typeof(EcsPipelineProvider).Name + "Singleton"); 47 | } 48 | protected static EcsPipelineProvider FindOrCreateSingleton(string name) 49 | { 50 | EcsPipelineProvider instance = Resources.Load(name); 51 | if (instance == null) 52 | { 53 | instance = CreateInstance(); 54 | #if UNITY_EDITOR 55 | if (AssetDatabase.IsValidFolder("Assets/Resources/") == false) 56 | { 57 | System.IO.Directory.CreateDirectory(Application.dataPath + "/Resources/"); 58 | AssetDatabase.Refresh(); 59 | } 60 | AssetDatabase.CreateAsset(instance, "Assets/Resources/" + name + ".asset"); 61 | AssetDatabase.Refresh(); 62 | #endif 63 | } 64 | return instance; 65 | } 66 | #endregion 67 | } 68 | } -------------------------------------------------------------------------------- /src/Connectors/EcsPipelineProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63bcd818806115742a86a7bbae1b8e95 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Connectors/EcsWorldProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b041a062a2a5b2643bec37be4fad79f1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Connectors/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2593ccf9a57f4f045a7e3bf6a839f3c3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Connectors/Editor/AutoEntityCreatorEditor.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using DCFApixels.DragonECS.Unity.Internal; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace DCFApixels.DragonECS.Unity.Editors 7 | { 8 | [CustomEditor(typeof(AutoEntityCreator))] 9 | [CanEditMultipleObjects] 10 | internal class AutoEntityCreatorEditor : ExtendedEditor 11 | { 12 | protected override void DrawCustom() 13 | { 14 | var iterator = serializedObject.GetIterator(); 15 | iterator.NextVisible(true); 16 | while (iterator.NextVisible(false)) 17 | { 18 | EditorGUILayout.PropertyField(iterator, true); 19 | } 20 | if (EcsGUI.Changed) 21 | { 22 | serializedObject.ApplyModifiedProperties(); 23 | } 24 | DrawControlButtons(); 25 | } 26 | 27 | 28 | private void DrawControlButtons() 29 | { 30 | float height = EcsGUI.EntityBarHeight; 31 | Rect rect = GUILayoutUtility.GetRect(EditorGUIUtility.currentViewWidth, height); 32 | EditorGUI.DrawRect(rect, new Color(0f, 0f, 0f, 0.1f)); 33 | rect = rect.AddPadding(2f, 0f); 34 | var (_, buttonRect) = rect.HorizontalSliceRight(height); 35 | 36 | //var (left, autosetCascadeRect) = rect.HorizontalSliceRight(height); 37 | //var (_, autosetRect) = rect.HorizontalSliceRight(height); 38 | 39 | if (EcsGUI.AutosetCascadeButton(buttonRect)) 40 | { 41 | foreach (AutoEntityCreator target in targets) 42 | { 43 | target.AutosetCascade_Editor(); 44 | } 45 | } 46 | buttonRect = buttonRect.Move(-height, 0); 47 | if (EcsGUI.AutosetButton(buttonRect)) 48 | { 49 | foreach (AutoEntityCreator target in targets) 50 | { 51 | target.Autoset_Editor(); 52 | } 53 | } 54 | using (EcsGUI.SetEnable(Application.isPlaying)) 55 | { 56 | buttonRect = buttonRect.Move(-height, 0); 57 | if (EcsGUI.NewEntityButton(buttonRect)) 58 | { 59 | foreach (AutoEntityCreator target in targets) 60 | { 61 | target.ManualCreate(); 62 | } 63 | } 64 | } 65 | } 66 | } 67 | } 68 | #endif -------------------------------------------------------------------------------- /src/Connectors/Editor/AutoEntityCreatorEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e21fcbcfdafbb64d86bf965cd16c6b0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Connectors/Editor/EcsEntityConnectEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 846d3d07f90835048902b412bfac73aa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Connectors/Editor/EcsWorldProviderBaseEditor.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace DCFApixels.DragonECS.Unity.Editors 6 | { 7 | [CustomEditor(typeof(EcsWorldProviderBase), true)] 8 | [CanEditMultipleObjects] 9 | internal class EcsWorldProviderBaseEditor : Editor 10 | { 11 | private EcsWorldProviderBase Target => (EcsWorldProviderBase)target; 12 | 13 | private static Color _emptyColor = new Color32(255, 0, 75, 100); 14 | private static Color _destroyedColor = new Color32(255, 75, 0, 100); 15 | private static Color _aliveColor = new Color32(75, 255, 0, 100); 16 | 17 | public override void OnInspectorGUI() 18 | { 19 | EcsWorld world = Target.GetCurrentWorldRaw(); 20 | 21 | Color labelBackColor; 22 | string labelText; 23 | 24 | if (world == null) 25 | { 26 | labelBackColor = _emptyColor; 27 | labelText = "Is Empty"; 28 | } 29 | else 30 | { 31 | if (world.IsDestroyed) 32 | { 33 | labelBackColor = _destroyedColor; 34 | labelText = $"{world.GetMeta().Name} ( {world.ID} ) Destroyed"; 35 | } 36 | else 37 | { 38 | labelBackColor = _aliveColor; 39 | labelText = $"{world.GetMeta().Name} ( {world.ID} )"; 40 | } 41 | } 42 | 43 | using (EcsGUI.SetBackgroundColor(labelBackColor)) 44 | { 45 | GUILayout.Box("Is Empty", UnityEditorUtility.GetWhiteStyle(), GUILayout.ExpandWidth(true)); 46 | } 47 | 48 | EcsGUI.Layout.DrawWorldBaseInfo(Target.GetCurrentWorldRaw()); 49 | 50 | base.OnInspectorGUI(); 51 | 52 | GUILayout.Space(10); 53 | 54 | if (GUILayout.Button("Destroy & Clear")) 55 | { 56 | var w = Target.GetCurrentWorldRaw(); 57 | if (w != null && w.IsDestroyed == false) 58 | { 59 | w.Destroy(); 60 | } 61 | Target.SetRaw(null); 62 | } 63 | 64 | Rect r = GUILayoutUtility.GetRect(EditorGUIUtility.currentViewWidth, 2f); 65 | Color c = Color.white; 66 | c.a = 0.3f; 67 | EditorGUI.DrawRect(r, c); 68 | GUILayout.Space(10); 69 | 70 | EcsGUI.Layout.DrawWorldComponents(Target.GetCurrentWorldRaw()); 71 | } 72 | } 73 | } 74 | #endif -------------------------------------------------------------------------------- /src/Connectors/Editor/EcsWorldProviderBaseEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1db1c2bb174625249a07a4cef8eff757 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Connectors/GameObjectConnect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 398c78166eea90647a60b91b2b9a0f0b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Consts.cs: -------------------------------------------------------------------------------- 1 | namespace DCFApixels.DragonECS.Unity 2 | { 3 | public class EcsUnityConsts 4 | { 5 | public const string PACK_GROUP = "_" + EcsConsts.FRAMEWORK_NAME + "/_Unity"; 6 | public const string ENTITY_BUILDING_GROUP = "Entity Building"; 7 | public const string PIPELINE_BUILDING_GROUP = "Pipeline Building"; 8 | 9 | public const string DEBUG_LAYER = EcsConsts.NAME_SPACE + "Unity." + nameof(DEBUG_LAYER); 10 | 11 | public const string UNITY_PACKAGE_NAME = "com.dcfa_pixels.dragonecs-unity"; 12 | 13 | public const string LOCAL_CACHE_FOLDER = "/Library/" + EcsConsts.AUTHOR + "/" + UNITY_PACKAGE_NAME; 14 | public const string USER_SETTINGS_FOLDER = "/UserSettings/" + EcsConsts.AUTHOR + "/" + UNITY_PACKAGE_NAME; 15 | } 16 | 17 | public class EcsUnityDefines 18 | { 19 | 20 | public const bool DRAGONECS_ENABLE_UNITY_CONSOLE_SHORTCUT_LINKS = 21 | #if DRAGONECS_ENABLE_UNITY_CONSOLE_SHORTCUT_LINKS 22 | true; 23 | #else 24 | false; 25 | #endif 26 | public const bool ENABLE_IL2CPP = 27 | #if ENABLE_IL2CPP 28 | true; 29 | #else 30 | false; 31 | #endif 32 | // public const bool DISABLE_SERIALIZE_REFERENCE_RECOVERY = 33 | //#if DISABLE_SERIALIZE_REFERENCE_RECOVERY 34 | // true; 35 | //#else 36 | // false; 37 | //#endif 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Consts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 218c18557ccdad24c9c5e155c3dd6008 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 853912b6db8b61c40a9c2d74a2759f94 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/DebugUtils/DefinesUtility.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Reflection; 6 | using UnityEditor; 7 | 8 | namespace DCFApixels.DragonECS.Unity.Internal 9 | { 10 | internal static class DefinesUtility 11 | { 12 | public static Symbols[] LoadDefines(Type defineConstsType) 13 | { 14 | const BindingFlags REFL_FLAGS = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic; 15 | var fields = defineConstsType.GetFields(REFL_FLAGS).Where(o => o.FieldType == typeof(bool)).Where(o => o.GetCustomAttribute() == null); 16 | return fields.Select(o => new Symbols(o.Name, (bool)o.GetValue(null))).ToArray(); 17 | } 18 | 19 | public static void ApplyDefines(IEnumerable defines) 20 | { 21 | BuildTargetGroup group = EditorUserBuildSettings.selectedBuildTargetGroup; 22 | #if UNITY_6000_0_OR_NEWER 23 | string symbolsString = PlayerSettings.GetScriptingDefineSymbols(UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(group)); 24 | #else 25 | string symbolsString = PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone); 26 | #endif 27 | 28 | foreach (var define in defines) 29 | { 30 | symbolsString = symbolsString.Replace(define.Name, ""); 31 | } 32 | 33 | symbolsString += ";" + string.Join(';', defines.Where(o => o.flag).Select(o => o.Name)); 34 | #if UNITY_6000_0_OR_NEWER 35 | PlayerSettings.SetScriptingDefineSymbols(UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(group), symbolsString); 36 | #else 37 | PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, symbolsString); 38 | #endif 39 | } 40 | 41 | public class Symbols 42 | { 43 | public readonly string Name; 44 | public bool flag; 45 | public Symbols(string name, bool flag) 46 | { 47 | Name = name; 48 | this.flag = flag; 49 | } 50 | } 51 | } 52 | } 53 | #endif -------------------------------------------------------------------------------- /src/DebugUtils/DefinesUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 488a62edebd480247b8eab1f153c237d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac4f146726b3ca444978fd7af0f5f883 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/DebugUtils/Editor/EntlongDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 614e6caafa5d5724fbb3324ea3a60194 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Editor/SettingsEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8e3f83162b577840bd1f04cd59e11cb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Editor/UserSettingsPrefs.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace DCFApixels.DragonECS.Unity.Editors 6 | { 7 | internal enum ComponentColorMode 8 | { 9 | Generic = 0, 10 | Auto = 1, 11 | Rainbow = 2, 12 | } 13 | [FilePath(EcsUnityConsts.USER_SETTINGS_FOLDER + "/" + nameof(UserSettingsPrefs) + ".prefs", FilePathAttribute.Location.ProjectFolder)] 14 | internal class UserSettingsPrefs : ScriptableSingleton 15 | { 16 | [SerializeField] 17 | private bool _isUseCustomNames = true; 18 | public bool IsUseCustomNames 19 | { 20 | get => _isUseCustomNames; 21 | set 22 | { 23 | if (_isUseCustomNames != value) 24 | { 25 | _isUseCustomNames = value; 26 | AutoSave(); 27 | } 28 | } 29 | } 30 | [SerializeField] 31 | private bool _isShowInterfaces = false; 32 | public bool IsShowInterfaces 33 | { 34 | get => _isShowInterfaces; 35 | set 36 | { 37 | if (_isShowInterfaces != value) 38 | { 39 | _isShowInterfaces = value; 40 | AutoSave(); 41 | } 42 | } 43 | } 44 | [SerializeField] 45 | private bool _isShowHidden = false; 46 | public bool IsShowHidden 47 | { 48 | get => _isShowHidden; 49 | set 50 | { 51 | if (_isShowHidden != value) 52 | { 53 | _isShowHidden = value; 54 | AutoSave(); 55 | } 56 | } 57 | } 58 | [SerializeField] 59 | private bool _isShowRuntimeComponents = false; 60 | public bool IsShowRuntimeComponents 61 | { 62 | get => _isShowRuntimeComponents; 63 | set 64 | { 65 | if (_isShowRuntimeComponents != value) 66 | { 67 | _isShowRuntimeComponents = value; 68 | AutoSave(); 69 | } 70 | } 71 | } 72 | [SerializeField] 73 | private bool _isShowEntityOther = false; 74 | public bool IsShowEntityOtherData 75 | { 76 | get => _isShowEntityOther; 77 | set 78 | { 79 | if (_isShowEntityOther != value) 80 | { 81 | _isShowEntityOther = value; 82 | AutoSave(); 83 | } 84 | } 85 | } 86 | //[SerializeField] 87 | //private bool _isFastModeRuntimeComponents = false; 88 | //public bool IsFastModeRuntimeComponents 89 | //{ 90 | // get => _isFastModeRuntimeComponents; 91 | // set 92 | // { 93 | // if (_isFastModeRuntimeComponents != value) 94 | // { 95 | // _isFastModeRuntimeComponents = value; 96 | // AutoSave(); 97 | // } 98 | // } 99 | //} 100 | 101 | [SerializeField] 102 | private ComponentColorMode _componentColorMode = ComponentColorMode.Auto; 103 | public ComponentColorMode ComponentColorMode 104 | { 105 | get => _componentColorMode; 106 | set 107 | { 108 | if (_componentColorMode != value) 109 | { 110 | _componentColorMode = value; 111 | AutoSave(); 112 | } 113 | } 114 | } 115 | 116 | private void AutoSave() 117 | { 118 | Save(true); 119 | } 120 | } 121 | } 122 | #endif -------------------------------------------------------------------------------- /src/DebugUtils/Editor/UserSettingsPrefs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe2cd9539e4c704459b688f17ced2563 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b7186fd57cbf9c42b4759c49920a688 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1105324b07e39d449acceb24bdd7eb3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/Editor/EntityEditorBlockDrawer.cs: -------------------------------------------------------------------------------- 1 | namespace DCFApixels.DragonECS.Unity.Editors 2 | { 3 | public abstract class EntityEditorBlockDrawer 4 | { 5 | public abstract void Draw(entlong entity); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/Editor/EntityEditorBlockDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 932947836ddab7640b33fc15b7ffb33c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/Editor/EntityMonitorEditor.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using DCFApixels.DragonECS.Unity.Internal; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace DCFApixels.DragonECS.Unity.Editors 7 | { 8 | [CustomEditor(typeof(EntityMonitor))] 9 | internal class EntityMonitorEditor : ExtendedEditor 10 | { 11 | protected override void DrawCustom() 12 | { 13 | var entity = Target.Entity; 14 | bool isAlive = entity.TryUnpackForUnityEditor(out int id, out short gen, out short worldID, out EcsWorld world); 15 | using (EcsGUI.SetEnable(isAlive)) 16 | { 17 | if (GUILayout.Button("Delete Entity", GUILayout.Height(36f))) 18 | { 19 | world.DelEntity(id); 20 | } 21 | } 22 | //EcsGUI.Layout.EntityBarForAlive(isAlive ? EcsGUI.EntityStatus.Alive : EcsGUI.EntityStatus.NotAlive, id, gen, worldID); 23 | EcsGUI.Layout.EntityField(entity); 24 | 25 | var drawers = UnityEditorUtility._entityEditorBlockDrawers; 26 | if (drawers.Length > 0) 27 | { 28 | using (EcsGUI.Layout.BeginVertical(UnityEditorUtility.GetTransperentBlackBackgrounStyle())) 29 | { 30 | bool isExpand = false; 31 | using (EcsGUI.CheckChanged()) 32 | { 33 | isExpand = EditorGUILayout.Foldout(UserSettingsPrefs.instance.IsShowEntityOtherData, "Other data"); 34 | if (EcsGUI.Changed) 35 | { 36 | UserSettingsPrefs.instance.IsShowEntityOtherData = isExpand; 37 | } 38 | } 39 | 40 | if (isExpand) 41 | { 42 | foreach (var drawer in drawers) 43 | { 44 | drawer.Draw(entity); 45 | } 46 | } 47 | } 48 | 49 | } 50 | 51 | EcsGUI.Layout.DrawRuntimeComponents(entity, false); 52 | } 53 | } 54 | } 55 | #endif -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/Editor/EntityMonitorEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5457dbe0f53566419d37e0ee9d9c13f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/Editor/PipelineMonitorEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 406298e83eb7a0b41b525c7e810c0c6f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/Editor/PipelineProcessesMonitorEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3cd5a052acb5c4469a9802390bb532a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/Editor/WorldMonitorEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7aadf8c836c97694186e4b3aeb01fcce 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/Editor/WorldQueriesMonitorEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1014ae1a0eb53564da3d64f37ca26b6e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/EntityMonitor.cs: -------------------------------------------------------------------------------- 1 | using DCFApixels.DragonECS.Unity.Editors; 2 | using UnityEngine; 3 | 4 | namespace DCFApixels.DragonECS.Unity.Internal 5 | { 6 | [MetaColor(MetaColor.Gray)] 7 | [MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)] 8 | [MetaDescription(EcsConsts.AUTHOR, "...")] 9 | [MetaTags(MetaTags.HIDDEN)] 10 | [MetaID("DragonECS_A551B6809201D56AA0F1B51248174B4D")] 11 | internal class EntityMonitor : MonoBehaviour 12 | { 13 | private entlong _entity; 14 | public entlong Entity 15 | { 16 | get { return _entity; } 17 | } 18 | public void Set(entlong entity) 19 | { 20 | _entity = entity; 21 | #if UNITY_EDITOR 22 | var world = entity.GetWorldUnchecked(); 23 | world.Get().SetMonitorLink(entity.GetIDUnchecked(), this); 24 | #endif 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/EntityMonitor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3c51f9f4aa13e74fbb4339f8c1746d4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/PipelineMonitor.cs: -------------------------------------------------------------------------------- 1 | using DCFApixels.DragonECS.Unity.Editors; 2 | using UnityEngine; 3 | 4 | namespace DCFApixels.DragonECS.Unity.Internal 5 | { 6 | [MetaColor(MetaColor.Gray)] 7 | [MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)] 8 | [MetaDescription(EcsConsts.AUTHOR, "...")] 9 | [MetaTags(MetaTags.HIDDEN)] 10 | [MetaID("DragonECS_EC9DB6809201CDD801B5B342C8A2AC8D")] 11 | internal class PipelineMonitor : MonoBehaviour 12 | { 13 | private EcsPipeline _pipeline; 14 | public EcsPipeline Pipeline 15 | { 16 | get { return _pipeline; } 17 | } 18 | public void Set(EcsPipeline pipeline) 19 | { 20 | _pipeline = pipeline; 21 | } 22 | } 23 | 24 | [MetaColor(MetaColor.Gray)] 25 | [MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)] 26 | [MetaDescription(EcsConsts.AUTHOR, "...")] 27 | [MetaTags(MetaTags.HIDDEN)] 28 | [MetaID("DragonECS_1DB9B6809201E092088A446A19EB9C7D")] 29 | internal class PipelineMonitorSystem : IEcsInit, IEcsPipelineMember, IEcsDestroy 30 | { 31 | private PipelineMonitor _monitor; 32 | private PipelineProcessMonitor _processesMonitor; 33 | public EcsPipeline Pipeline { get; set; } 34 | 35 | public void Init() 36 | { 37 | TypeMeta meta = typeof(EcsPipeline).ToMeta(); 38 | _monitor = new GameObject($"{UnityEditorUtility.TransformToUpperName(meta.Name)}").AddComponent(); 39 | Object.DontDestroyOnLoad(_monitor); 40 | _monitor.Set(Pipeline); 41 | _monitor.gameObject.SetActive(false); 42 | 43 | _processesMonitor = new GameObject($"PROCESS_MATRIX").AddComponent(); 44 | _processesMonitor.transform.SetParent(_monitor.transform); 45 | _processesMonitor.Set(Pipeline); 46 | _processesMonitor.gameObject.SetActive(false); 47 | } 48 | 49 | public void Destroy() 50 | { 51 | if (_monitor != null) 52 | { 53 | Object.Destroy(_monitor.gameObject); 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/PipelineMonitor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03154a226ad86e24ebfa4faf43da8310 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/PipelineProcessMonitor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DCFApixels.DragonECS.Unity.Editors 4 | { 5 | [MetaColor(MetaColor.Gray)] 6 | [MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)] 7 | [MetaDescription(EcsConsts.AUTHOR, "...")] 8 | [MetaTags(MetaTags.HIDDEN)] 9 | [MetaID("DragonECS_75CCB6809201450CA3E1F280CB1EB0E7")] 10 | internal class PipelineProcessMonitor : MonoBehaviour 11 | { 12 | private EcsPipeline _pipeline; 13 | public EcsPipeline Pipeline 14 | { 15 | get { return _pipeline; } 16 | } 17 | public void Set(EcsPipeline pipeline) 18 | { 19 | _pipeline = pipeline; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/PipelineProcessMonitor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e20707e619a5b742aeb26e3eff3a9c4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/WorldMonitor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d65916dbb4c8f74cb5239c5bbf7ba31 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/WorldQueriesMonitor.cs: -------------------------------------------------------------------------------- 1 | using DCFApixels.DragonECS.Core; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace DCFApixels.DragonECS.Unity.Internal 6 | { 7 | [MetaColor(MetaColor.Gray)] 8 | [MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)] 9 | [MetaDescription(EcsConsts.AUTHOR, "...")] 10 | [MetaTags(MetaTags.HIDDEN)] 11 | [MetaID("DragonECS_AC178504930164FD2EABFA071EF0476F")] 12 | internal class WorldQueriesMonitor : MonoBehaviour 13 | { 14 | private EcsWorld _world; 15 | private List _maskQueryExecutors = new List(); 16 | private int _maskQueryExecutorsVersion = 0; 17 | 18 | public EcsWorld World 19 | { 20 | get { return _world; } 21 | } 22 | public List MaskQueryExecutors 23 | { 24 | get 25 | { 26 | _world.GetMaskQueryExecutors(_maskQueryExecutors, ref _maskQueryExecutorsVersion); 27 | return _maskQueryExecutors; 28 | } 29 | } 30 | public void Set(EcsWorld world) 31 | { 32 | _world = world; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/DebugUtils/Monitors/WorldQueriesMonitor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af5898847627f4241bbb9cf970e90d31 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/UnityDebugModule.cs: -------------------------------------------------------------------------------- 1 | using DCFApixels.DragonECS.Unity; 2 | using DCFApixels.DragonECS.Unity.Internal; 3 | 4 | namespace DCFApixels.DragonECS 5 | { 6 | [MetaColor(MetaColor.DragonRose)] 7 | [MetaGroup(EcsUnityConsts.PACK_GROUP, EcsConsts.DEBUG_GROUP)] 8 | [MetaDescription(EcsConsts.AUTHOR, "...")] 9 | [MetaID("DragonECS_1D16B980920108B62A0971E4058A3E01")] 10 | public sealed class UnityDebugModule : IEcsModule 11 | { 12 | public EcsWorld[] _worlds; 13 | public UnityDebugModule(params EcsWorld[] worlds) 14 | { 15 | _worlds = worlds; 16 | } 17 | void IEcsModule.Import(EcsPipeline.Builder b) 18 | { 19 | UnityDebugService.Activate(); 20 | b.Layers.Add(EcsUnityConsts.DEBUG_LAYER).Before(EcsConsts.POST_END_LAYER); 21 | b.AddUnique(new PipelineMonitorSystem(), EcsUnityConsts.DEBUG_LAYER); 22 | foreach (var world in _worlds) 23 | { 24 | b.Add(new WorldMonitorSystem(world), EcsUnityConsts.DEBUG_LAYER); 25 | } 26 | } 27 | } 28 | 29 | public static class DebugModuleExt 30 | { 31 | public static EcsPipeline.Builder AddUnityDebug(this EcsPipeline.Builder self, params EcsWorld[] worlds) 32 | { 33 | self.AddModule(new UnityDebugModule(worlds)); 34 | return self; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/DebugUtils/UnityDebugModule.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e2725559ae99464d9df9336b4fc84e9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/UnityDebugService.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69f2abf8b8744c840b2da7f8988b3f8d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/DebugUtils/UnityDebugService/UnityDebugService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b58ebee63dda32544a67f1917d94f40c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/DebugUtils/UnityDebugService/UnityDebugServiceStorage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8666cb6c75b076c41910acbe59d258af -------------------------------------------------------------------------------- /src/Internal.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc246fdeda320b649899ee44aca24e18 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Internal/AddParamsDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3af2df61517f386448950800d3b1ff3b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/BitMask.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace DCFApixels.DragonECS.Unity.Internal 5 | { 6 | internal class BitMask 7 | { 8 | private const int OFFSET = 5; 9 | private const int MOD_MASK = 31; 10 | private const int DATA_BITS = 32; 11 | private int[] _data; 12 | 13 | private int _size; 14 | 15 | public BitMask(int size) 16 | { 17 | _data = Array.Empty(); 18 | Resize(size); 19 | } 20 | 21 | public bool this[int index] 22 | { 23 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 24 | get 25 | { 26 | return (_data[index >> OFFSET] & (1 << (index & MOD_MASK))) != 0; 27 | } 28 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 29 | set 30 | { 31 | if (value) 32 | { 33 | _data[index >> OFFSET] |= (1 << (index & MOD_MASK)); 34 | } 35 | else 36 | { 37 | _data[index >> OFFSET] &= ~(1 << (index & MOD_MASK)); 38 | } 39 | } 40 | } 41 | 42 | public void Resize(int newSize) 43 | { 44 | if (newSize <= _size) 45 | { 46 | return; 47 | } 48 | 49 | _size = newSize / DATA_BITS + 1; 50 | Array.Resize(ref _data, _size); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Internal/BitMask.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f3449fe3fe92a747b97743ed020758e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Config.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace DCFApixels.DragonECS.Unity.Internal 5 | { 6 | internal abstract class Config : ScriptableObject where TSelf : ScriptableObject 7 | { 8 | private readonly static object _lock = new object(); 9 | private static TSelf _instance; 10 | public static TSelf Instance 11 | { 12 | get 13 | { 14 | lock (_lock) 15 | { 16 | if (_instance == null) 17 | { 18 | string path = typeof(TSelf).ToString(); 19 | _instance = Resources.Load(typeof(TSelf).Name); 20 | if (_instance == null) 21 | { 22 | TSelf data = CreateInstance(); 23 | #if UNITY_EDITOR 24 | if (AssetDatabase.IsValidFolder("Assets/Resources/") == false) 25 | { 26 | System.IO.Directory.CreateDirectory(Application.dataPath + "/Resources/"); 27 | AssetDatabase.Refresh(); 28 | } 29 | AssetDatabase.CreateAsset(data, "Assets/Resources/" + typeof(TSelf).Name + ".asset"); 30 | AssetDatabase.Refresh(); 31 | #endif 32 | _instance = data; 33 | } 34 | } 35 | return _instance; 36 | } 37 | } 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/Internal/Config.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b06d073449be7a41b1113cc0282f1fe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/CustomToggleAttribute.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DCFApixels.DragonECS.Unity.Internal 4 | { 5 | internal class CustomToggleAttribute : PropertyAttribute 6 | { 7 | public string Name; 8 | public bool IsInverted; 9 | public bool IsLeft; 10 | } 11 | } 12 | 13 | #if UNITY_EDITOR 14 | namespace DCFApixels.DragonECS.Unity.Editors 15 | { 16 | using DCFApixels.DragonECS.Unity.Internal; 17 | using UnityEditor; 18 | [CustomPropertyDrawer(typeof(CustomToggleAttribute))] 19 | internal class LeftToggleAttributeDrawer : ExtendedPropertyDrawer 20 | { 21 | protected override void DrawCustom(Rect position, SerializedProperty property, GUIContent label) 22 | { 23 | if (property.propertyType != SerializedPropertyType.Boolean) 24 | { 25 | EditorGUI.PropertyField(position, property, label); 26 | } 27 | 28 | if (string.IsNullOrEmpty(Attribute.Name) == false) 29 | { 30 | label.text = Attribute.Name; 31 | } 32 | 33 | bool value = property.boolValue; 34 | if (Attribute.IsInverted) 35 | { 36 | value = !value; 37 | } 38 | 39 | if (Attribute.IsLeft) 40 | { 41 | value = EditorGUI.ToggleLeft(position, label, value); 42 | } 43 | 44 | value = EditorGUI.ToggleLeft(position, label, value); 45 | 46 | if (Attribute.IsInverted) 47 | { 48 | value = !value; 49 | } 50 | 51 | property.boolValue = value; 52 | } 53 | } 54 | } 55 | #endif -------------------------------------------------------------------------------- /src/Internal/CustomToggleAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc3766060e046a14f975dcb3b3ffe39c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/DragonArrayUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1071dcd31ebdf5042a289eb27d8e12d6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93ac43c51e44bbb459de81017f530fbe 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Internal/Editor/DragonGUIContent.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEngine; 3 | 4 | namespace DCFApixels.DragonECS.Unity.Editors 5 | { 6 | internal struct DragonGUIContent 7 | { 8 | public static readonly DragonGUIContent Empty = new DragonGUIContent(); 9 | public GUIContent value; 10 | public DragonGUIContent(GUIContent value) { this.value = value; } 11 | public DragonGUIContent(Texture texture) 12 | { 13 | value = UnityEditorUtility.GetLabelOrNull(texture); 14 | } 15 | public DragonGUIContent(Texture texture, string tooltip) 16 | { 17 | value = UnityEditorUtility.GetLabelOrNull(texture); 18 | if (value != null) 19 | { 20 | value.tooltip = tooltip; 21 | } 22 | } 23 | public DragonGUIContent(string text) 24 | { 25 | value = UnityEditorUtility.GetLabelOrNull(text); 26 | } 27 | public DragonGUIContent(string text, string tooltip) 28 | { 29 | value = UnityEditorUtility.GetLabelOrNull(text); 30 | if (value != null) 31 | { 32 | value.tooltip = tooltip; 33 | } 34 | } 35 | public static implicit operator DragonGUIContent(GUIContent a) { return new DragonGUIContent(a); } 36 | public static implicit operator DragonGUIContent(Texture a) { return new DragonGUIContent(a); } 37 | public static implicit operator DragonGUIContent(string a) { return new DragonGUIContent(a); } 38 | public static implicit operator GUIContent(DragonGUIContent a) { return a.value; } 39 | } 40 | } 41 | #endif -------------------------------------------------------------------------------- /src/Internal/Editor/DragonGUIContent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83b46b5e659b87942857f69c1b056dcf -------------------------------------------------------------------------------- /src/Internal/Editor/EcsGUI.Layout.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7a7468927b696e4899e73de0866d947 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Editor/EcsGUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f27d7dd0452a826479d2b19d7885ce49 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Editor/ExpandMatrix.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace DCFApixels.DragonECS.Unity.Editors 6 | { 7 | internal class ExpandMatrix 8 | { 9 | private const bool TOP_DEFAULT = true; 10 | private const bool DEFAULT = false; 11 | private static Dictionary _instances = new Dictionary(); 12 | public static ExpandMatrix Take(Type type) 13 | { 14 | if (_instances.TryGetValue(type, out ExpandMatrix result) == false) 15 | { 16 | result = new ExpandMatrix(); 17 | _instances.Add(type, result); 18 | } 19 | return result; 20 | } 21 | private bool[] _flags = new bool[8]; 22 | private int _count = 0; 23 | private int _ptr = 0; 24 | 25 | public int Count 26 | { 27 | get { return _count; } 28 | } 29 | public ref bool CurrentIsExpanded 30 | { 31 | get { return ref _flags[_ptr]; } 32 | } 33 | public void Up() 34 | { 35 | if (_ptr < 0) 36 | { 37 | throw new Exception("нарушение баланса инкремент/декремент"); 38 | } 39 | _ptr--; 40 | } 41 | 42 | public ref bool Peek() 43 | { 44 | int _ptr = this._ptr + 1; 45 | if (_ptr >= _count) 46 | { 47 | if (_count >= _flags.Length) 48 | { 49 | Array.Resize(ref _flags, _flags.Length << 1); 50 | } 51 | _flags[_count++] = _ptr <= 1 ? TOP_DEFAULT : DEFAULT; 52 | } 53 | return ref _flags[_ptr]; 54 | } 55 | 56 | public ref bool Down() 57 | { 58 | _ptr++; 59 | if (_ptr >= _count) 60 | { 61 | if (_count >= _flags.Length) 62 | { 63 | Array.Resize(ref _flags, _flags.Length << 1); 64 | } 65 | _flags[_count++] = _ptr <= 1 ? TOP_DEFAULT : DEFAULT; 66 | } 67 | return ref _flags[_ptr]; 68 | } 69 | } 70 | } 71 | #endif -------------------------------------------------------------------------------- /src/Internal/Editor/ExpandMatrix.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fef04508ed32be24386f6b2a43e01b2c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Editor/ExtendedEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9a6ec3374a23a441bc22494aca34430 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Editor/MetaObjectsDropDown.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be69cae0ab609f14783c21e187dab681 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Editor/RuntimeComponentsDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69581c5eb282d024baca88cb374bf5af -------------------------------------------------------------------------------- /src/Internal/Editor/SOWrappers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc9ef2bbe6a95624e9c6d50e19f38a05 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Internal/Editor/SOWrappers/RefEditorWrapper.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using System; 3 | using System.Runtime.CompilerServices; 4 | using UnityEngine; 5 | 6 | namespace DCFApixels.DragonECS.Unity.Editors 7 | { 8 | [Serializable] 9 | internal class RefEditorWrapper : WrapperBase 10 | { 11 | [SerializeReference] 12 | public object data; 13 | 14 | public override object Data 15 | { 16 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 17 | get { return data; } 18 | } 19 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 20 | public static RefEditorWrapper Take(object data) 21 | { 22 | var result = Take(); 23 | result.data = data; 24 | result.SO.Update(); 25 | return result; 26 | } 27 | } 28 | 29 | [Serializable] 30 | internal class EmptyDummy 31 | { 32 | public static readonly EmptyDummy Instance = new EmptyDummy(); 33 | private EmptyDummy() { } 34 | } 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /src/Internal/Editor/SOWrappers/RefEditorWrapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0f14ae652b89744888db94704a170ef 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Editor/SOWrappers/WrapperBase.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Runtime.CompilerServices; 5 | using UnityEditor; 6 | using UnityEngine; 7 | 8 | namespace DCFApixels.DragonECS.Unity.Editors 9 | { 10 | [Serializable] 11 | internal abstract class WrapperBase : ScriptableObject 12 | { 13 | public abstract object Data { get; } 14 | public abstract bool IsExpanded { get; set; } 15 | public abstract SerializedObject SO { get; } 16 | public abstract SerializedProperty Property { get; } 17 | public abstract void Release(); 18 | } 19 | [Serializable] 20 | internal abstract class WrapperBase : WrapperBase, IDisposable 21 | where TSelf : WrapperBase 22 | { 23 | 24 | private SerializedObject _so; 25 | private SerializedProperty _property; 26 | 27 | private bool _isDestroyed = false; 28 | private bool _isReleased = false; 29 | 30 | private static Stack _wrappers = new Stack(); 31 | public static void ResetStaticState() 32 | { 33 | foreach (var item in _wrappers) 34 | { 35 | UnityEngine.Object.DestroyImmediate(item); 36 | } 37 | _wrappers.Clear(); 38 | } 39 | 40 | public sealed override bool IsExpanded 41 | { 42 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 43 | get { return Property.isExpanded; } 44 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 45 | set { Property.isExpanded = value; } 46 | } 47 | public sealed override SerializedObject SO 48 | { 49 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 50 | get { return _so; } 51 | } 52 | public sealed override SerializedProperty Property 53 | { 54 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 55 | get { return _property; } 56 | } 57 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 58 | public static TSelf Take() 59 | { 60 | TSelf result; 61 | if (_wrappers.Count <= 0) 62 | { 63 | result = CreateInstance(); 64 | result._so = new SerializedObject(result); 65 | result._property = result._so.FindProperty("data"); 66 | } 67 | else 68 | { 69 | result = _wrappers.Pop(); 70 | if (result._isDestroyed) 71 | { 72 | result = Take(); 73 | } 74 | } 75 | result._isReleased = false; 76 | return result; 77 | } 78 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 79 | public static void Release(TSelf wrapper) 80 | { 81 | if (wrapper._isReleased) 82 | { 83 | throw new Exception(); 84 | } 85 | wrapper._isReleased = true; 86 | _wrappers.Push(wrapper); 87 | } 88 | 89 | private void OnDestroy() 90 | { 91 | _isDestroyed = true; 92 | } 93 | 94 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 95 | public override void Release() 96 | { 97 | Release((TSelf)this); 98 | } 99 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 100 | public void Dispose() 101 | { 102 | Release(); 103 | } 104 | } 105 | } 106 | #endif 107 | -------------------------------------------------------------------------------- /src/Internal/Editor/SOWrappers/WrapperBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c0cef58c08259f4bbb78af2fcec4c79 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Editor/UnityEditorUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f06edb81ead46c49895b58f42772b32 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/EntLongExtentions.cs: -------------------------------------------------------------------------------- 1 | namespace DCFApixels.DragonECS.Unity.Internal 2 | { 3 | internal static class EntLongExtentions 4 | { 5 | public static bool TryUnpackForUnityEditor(this entlong self, out int id, out short gen, out short worldID, out EcsWorld world) 6 | { 7 | self.UnpackUnchecked(out id, out gen, out worldID); 8 | world = EcsWorld.GetWorld(worldID); 9 | return world.IsNullOrDetroyed() == false && self.IsAlive; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Internal/EntLongExtentions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aac4ee165dbc67241a5291d47a9da9fc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/EscEditorConsts.cs: -------------------------------------------------------------------------------- 1 | namespace DCFApixels.DragonECS.Unity.Editors 2 | { 3 | internal static class EscEditorConsts 4 | { 5 | public const float COMPONENT_DRAWER_ALPHA = 0.26f; 6 | public const float COMPONENT_DRAWER_DESATURATE = 0.86f; 7 | public const int AUTO_COLOR_RAINBOW_MIN_RANGE = 7; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Internal/EscEditorConsts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0bed74c1b3b07d44b9ea1ea917809e4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Icons.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e5c92576cfa24a48a3232844b4fc783 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Internal/Icons/AutosetCascadeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/AutosetCascadeIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/AutosetCascadeIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f9fb2a8877577940971d81a98aeaaaa 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 0 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 2 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/AutosetIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/AutosetIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/AutosetIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d01e651682f48b548b597714f47e14b9 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 0 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 1 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 5e97eb03825dee720800000000000000 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/CloseIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/CloseIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/CloseIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a708e50662813d4a99c107e6431a60b 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 0 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 2 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/CloseIconOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/CloseIconOn.png -------------------------------------------------------------------------------- /src/Internal/Icons/CloseIconOn.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a1d402595b00c24db2ba647fed93a5c 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 0 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 2 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/ErrorIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/ErrorIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/ErrorIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c67e8a1d6cb0e904590c7847368fe794 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/FileIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/FileIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/HelpIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/HelpIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/HelpIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e135cf23a5d53ce48a75e163b41e39d5 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/HyperlinkIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/HyperlinkIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/HyperlinkIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a89f8c59dad13641b9c51337e8fd7ad 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 13 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | flipGreenChannel: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | vTOnly: 0 28 | ignoreMipmapLimit: 0 29 | grayScaleToAlpha: 0 30 | generateCubemap: 6 31 | cubemapConvolution: 0 32 | seamlessCubemap: 0 33 | textureFormat: 1 34 | maxTextureSize: 2048 35 | textureSettings: 36 | serializedVersion: 2 37 | filterMode: 1 38 | aniso: 1 39 | mipBias: 0 40 | wrapU: 0 41 | wrapV: 0 42 | wrapW: 0 43 | nPOTScale: 1 44 | lightmap: 0 45 | compressionQuality: 50 46 | spriteMode: 0 47 | spriteExtrude: 1 48 | spriteMeshType: 1 49 | alignment: 0 50 | spritePivot: {x: 0.5, y: 0.5} 51 | spritePixelsToUnits: 100 52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 53 | spriteGenerateFallbackPhysicsShape: 1 54 | alphaUsage: 1 55 | alphaIsTransparency: 1 56 | spriteTessellationDetail: -1 57 | textureType: 0 58 | textureShape: 1 59 | singleChannelComponent: 0 60 | flipbookRows: 1 61 | flipbookColumns: 1 62 | maxTextureSizeSet: 0 63 | compressionQualitySet: 0 64 | textureFormatSet: 0 65 | ignorePngGamma: 0 66 | applyGammaDecoding: 0 67 | swizzle: 50462976 68 | cookieLightType: 0 69 | platformSettings: 70 | - serializedVersion: 4 71 | buildTarget: DefaultTexturePlatform 72 | maxTextureSize: 64 73 | resizeAlgorithm: 0 74 | textureFormat: -1 75 | textureCompression: 1 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | ignorePlatformSupport: 0 81 | androidETC2FallbackOverride: 0 82 | forceMaximumCompressionQuality_BC6H_BC7: 0 83 | - serializedVersion: 4 84 | buildTarget: Standalone 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | ignorePlatformSupport: 0 94 | androidETC2FallbackOverride: 0 95 | forceMaximumCompressionQuality_BC6H_BC7: 0 96 | - serializedVersion: 4 97 | buildTarget: WebGL 98 | maxTextureSize: 2048 99 | resizeAlgorithm: 0 100 | textureFormat: -1 101 | textureCompression: 1 102 | compressionQuality: 50 103 | crunchedCompression: 0 104 | allowsAlphaSplitting: 0 105 | overridden: 0 106 | ignorePlatformSupport: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | spriteSheet: 110 | serializedVersion: 2 111 | sprites: [] 112 | outline: [] 113 | customData: 114 | physicsShape: [] 115 | bones: [] 116 | spriteID: 117 | internalID: 0 118 | vertices: [] 119 | indices: 120 | edges: [] 121 | weights: [] 122 | secondaryTextures: [] 123 | spriteCustomMetadata: 124 | entries: [] 125 | nameFileIdTable: {} 126 | mipmapLimitGroupName: 127 | pSDRemoveMatte: 0 128 | userData: 129 | assetBundleName: 130 | assetBundleVariant: 131 | -------------------------------------------------------------------------------- /src/Internal/Icons/Icons.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ce72fefbf3696f4fb3861773bd997df 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: 7 | - _helpIcon: {fileID: 2800000, guid: e135cf23a5d53ce48a75e163b41e39d5, type: 3} 8 | - _fileIcon: {fileID: 2800000, guid: 4f1ca6aa9d407844485856184c785946, type: 3} 9 | - _metaIDIcon: {fileID: 2800000, guid: d3c6215cfdc36cb448661398160560a7, type: 3} 10 | - _repaireIcon: {fileID: 2800000, guid: 561fcfb28d73d7c4f8c9fac36e8ece86, type: 3} 11 | - _errorIcon: {fileID: 2800000, guid: c67e8a1d6cb0e904590c7847368fe794, type: 3} 12 | - _warningIcon: {fileID: 2800000, guid: 223d96e24d4b49f468b628cf9839584c, type: 3} 13 | - _passIcon: {fileID: 2800000, guid: 0df5856dbbe53494aae23b959ca05ecc, type: 3} 14 | - _unlinkIcon: {fileID: 2800000, guid: 5baead89a941e034e9f44d63617d3246, type: 3} 15 | - _searchIcon: {fileID: 2800000, guid: 239e73d04c7ba4649bc4cc10e70e62e5, type: 3} 16 | - _closeIcon: {fileID: 2800000, guid: 8a708e50662813d4a99c107e6431a60b, type: 3} 17 | - _closeIconOn: {fileID: 2800000, guid: 6a1d402595b00c24db2ba647fed93a5c, type: 3} 18 | - _auotsetIcon: {fileID: 2800000, guid: d01e651682f48b548b597714f47e14b9, type: 3} 19 | - _auotsetCascadeIcon: {fileID: 2800000, guid: 8f9fb2a8877577940971d81a98aeaaaa, type: 3} 20 | - _visibilityIconOn: {fileID: 2800000, guid: 9ce9d719a106be04fa4cf0c369c61e1c, type: 3} 21 | - _visibilityIconOff: {fileID: 2800000, guid: 1f25a5ca611092642a8ee4e08fafcd43, type: 3} 22 | - _labelIconType: {fileID: 2800000, guid: 5476d6e1435981e4cbc915a080f93ee6, type: 3} 23 | - _labelIconMeta: {fileID: 2800000, guid: ebb82b09315bde749a10dfa45e64067c, type: 3} 24 | - _hyperlinkIcon: {fileID: 2800000, guid: 2a89f8c59dad13641b9c51337e8fd7ad, type: 3} 25 | executionOrder: 0 26 | icon: {instanceID: 0} 27 | userData: 28 | assetBundleName: 29 | assetBundleVariant: 30 | -------------------------------------------------------------------------------- /src/Internal/Icons/LabelIconMeta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/LabelIconMeta.png -------------------------------------------------------------------------------- /src/Internal/Icons/LabelIconMeta.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebb82b09315bde749a10dfa45e64067c 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/LabelIconType.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/LabelIconType.png -------------------------------------------------------------------------------- /src/Internal/Icons/LabelIconType.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5476d6e1435981e4cbc915a080f93ee6 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/MetaIDIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/MetaIDIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/MetaIDIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3c6215cfdc36cb448661398160560a7 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/PassIocn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/PassIocn.png -------------------------------------------------------------------------------- /src/Internal/Icons/PassIocn.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0df5856dbbe53494aae23b959ca05ecc 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/RepaireIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/RepaireIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/RepaireIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 561fcfb28d73d7c4f8c9fac36e8ece86 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 32 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e5cbb3e099a19c438a1fdfd46179abc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Internal/Icons/Resources/Icons.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 2ce72fefbf3696f4fb3861773bd997df, type: 3} 13 | m_Name: Icons 14 | m_EditorClassIdentifier: 15 | _helpIcon: {fileID: 2800000, guid: e135cf23a5d53ce48a75e163b41e39d5, type: 3} 16 | _fileIcon: {fileID: 2800000, guid: 4f1ca6aa9d407844485856184c785946, type: 3} 17 | _metaIDIcon: {fileID: 2800000, guid: d3c6215cfdc36cb448661398160560a7, type: 3} 18 | _repaireIcon: {fileID: 2800000, guid: 561fcfb28d73d7c4f8c9fac36e8ece86, type: 3} 19 | _errorIcon: {fileID: 2800000, guid: c67e8a1d6cb0e904590c7847368fe794, type: 3} 20 | _warningIcon: {fileID: 2800000, guid: 223d96e24d4b49f468b628cf9839584c, type: 3} 21 | _passIcon: {fileID: 2800000, guid: 0df5856dbbe53494aae23b959ca05ecc, type: 3} 22 | _unlinkIcon: {fileID: 2800000, guid: 5baead89a941e034e9f44d63617d3246, type: 3} 23 | _searchIcon: {fileID: 2800000, guid: 239e73d04c7ba4649bc4cc10e70e62e5, type: 3} 24 | _closeIcon: {fileID: 2800000, guid: 8a708e50662813d4a99c107e6431a60b, type: 3} 25 | _closeIconOn: {fileID: 2800000, guid: 6a1d402595b00c24db2ba647fed93a5c, type: 3} 26 | _auotsetIcon: {fileID: 2800000, guid: d01e651682f48b548b597714f47e14b9, type: 3} 27 | _auotsetCascadeIcon: {fileID: 2800000, guid: 8f9fb2a8877577940971d81a98aeaaaa, type: 3} 28 | _visibilityIconOn: {fileID: 2800000, guid: 9ce9d719a106be04fa4cf0c369c61e1c, type: 3} 29 | _visibilityIconOff: {fileID: 2800000, guid: 1f25a5ca611092642a8ee4e08fafcd43, type: 3} 30 | _labelIconType: {fileID: 2800000, guid: 5476d6e1435981e4cbc915a080f93ee6, type: 3} 31 | _labelIconMeta: {fileID: 2800000, guid: ebb82b09315bde749a10dfa45e64067c, type: 3} 32 | _hyperlinkIcon: {fileID: 2800000, guid: 2a89f8c59dad13641b9c51337e8fd7ad, type: 3} 33 | -------------------------------------------------------------------------------- /src/Internal/Icons/Resources/Icons.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cd327a6b50b9df45afb5fa60f143b03 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Internal/Icons/SearchIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/SearchIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/SearchIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 239e73d04c7ba4649bc4cc10e70e62e5 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/UnlinkIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/UnlinkIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/UnlinkIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5baead89a941e034e9f44d63617d3246 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 0 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 2 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/VisibilityIconOff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/VisibilityIconOff.png -------------------------------------------------------------------------------- /src/Internal/Icons/VisibilityIconOff.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f25a5ca611092642a8ee4e08fafcd43 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/VisibilityIconOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/VisibilityIconOn.png -------------------------------------------------------------------------------- /src/Internal/Icons/VisibilityIconOn.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ce9d719a106be04fa4cf0c369c61e1c 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/Icons/WarningIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Internal/Icons/WarningIcon.png -------------------------------------------------------------------------------- /src/Internal/Icons/WarningIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 223d96e24d4b49f468b628cf9839584c 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 0 40 | wrapV: 0 41 | wrapW: 0 42 | nPOTScale: 1 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 0 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 0 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 64 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | spriteSheet: 104 | serializedVersion: 2 105 | sprites: [] 106 | outline: [] 107 | physicsShape: [] 108 | bones: [] 109 | spriteID: 110 | internalID: 0 111 | vertices: [] 112 | indices: 113 | edges: [] 114 | weights: [] 115 | secondaryTextures: [] 116 | nameFileIdTable: {} 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /src/Internal/MonoScriptsAssetProcessor.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using DCFApixels.DragonECS.Unity.Internal; 3 | using System; 4 | using System.Collections.Generic; 5 | using UnityEditor; 6 | 7 | namespace DCFApixels.DragonECS.Unity.Editors 8 | { 9 | internal class MonoScriptsAssetProcessor : AssetPostprocessor 10 | { 11 | private static long _timeTicks; 12 | public static long Version 13 | { 14 | get { return _timeTicks; } 15 | } 16 | private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths, bool didDomainReload) 17 | { 18 | _removedScriptGuids.Clear(); 19 | _newScriptIDs.Clear(); 20 | 21 | foreach (string str in importedAssets) 22 | { 23 | ProcessAssetPath(str); 24 | } 25 | foreach (string str in deletedAssets) 26 | { 27 | RemoveAssetPath(str); 28 | } 29 | foreach (var str in movedFromAssetPaths) 30 | { 31 | RemoveAssetPath(str); 32 | } 33 | foreach (string str in movedAssets) 34 | { 35 | ProcessAssetPath(str); 36 | } 37 | //if (didDomainReload) 38 | //{ 39 | // Debug.Log("Domain has been reloaded"); 40 | //} 41 | _timeTicks = DateTime.Now.Ticks; 42 | } 43 | 44 | 45 | private static List _removedScriptGuids = new List(); 46 | private static List _newScriptIDs = new List(); 47 | public static ReadOnlyList RemovedScriptPaths 48 | { 49 | get { return _removedScriptGuids; } 50 | } 51 | public static ReadOnlyList NewScriptPaths 52 | { 53 | get { return _newScriptIDs; } 54 | } 55 | 56 | private static void RemoveAssetPath(string filePath) 57 | { 58 | if (IsScript(filePath) == false) { return; } 59 | _removedScriptGuids.Add(filePath); 60 | } 61 | 62 | private static void ProcessAssetPath(string filePath) 63 | { 64 | if (IsScript(filePath) == false) { return; } 65 | _newScriptIDs.Add(filePath); 66 | } 67 | 68 | private static bool IsScript(string filePath) 69 | { 70 | if (filePath.Length <= 3) { return false; } 71 | int i = filePath.Length - 3; 72 | return filePath[i++] == '.' 73 | && filePath[i++] == 'c' 74 | && filePath[i++] == 's'; 75 | } 76 | } 77 | } 78 | #endif -------------------------------------------------------------------------------- /src/Internal/MonoScriptsAssetProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48c07a8872de79f43aa51dc33d29ba33 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/ReferenceButtonAttributeDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DCFApixels.DragonECS.Unity.Editors 4 | { 5 | internal interface IReferenceButtonAttribute 6 | { 7 | Type[] PredicateTypes { get; } 8 | bool IsHideButtonIfNotNull { get; } 9 | } 10 | } 11 | 12 | #if UNITY_EDITOR 13 | namespace DCFApixels.DragonECS.Unity.Editors 14 | { 15 | using DCFApixels.DragonECS.Unity.Internal; 16 | using System; 17 | using UnityEditor; 18 | using UnityEngine; 19 | 20 | [CustomPropertyDrawer(typeof(ComponentTemplateReferenceAttribute), true)] 21 | [CustomPropertyDrawer(typeof(ReferenceButtonAttribute), true)] 22 | internal sealed class ReferenceButtonAttributeDrawer : ExtendedPropertyDrawer 23 | { 24 | private Type[] _withOutTypes; 25 | protected override void OnInit() 26 | { 27 | Type fieldType = fieldInfo.FieldType; 28 | _withOutTypes = fieldType.TryGetAttribute(out ReferenceButtonWithOutAttribute a) ? a.PredicateTypes : Array.Empty(); 29 | if (fieldType.IsGenericType) 30 | { 31 | if (fieldType.IsGenericTypeDefinition == false) 32 | { 33 | fieldType = fieldType.GetGenericTypeDefinition(); 34 | } 35 | } 36 | } 37 | 38 | public override float GetPropertyHeight(SerializedProperty property, GUIContent label) 39 | { 40 | Init(); 41 | if (property.managedReferenceValue != null) 42 | { 43 | return EditorGUI.GetPropertyHeight(property, label, true); 44 | } 45 | else 46 | { 47 | return OneLineHeight; 48 | } 49 | } 50 | 51 | protected override void DrawCustom(Rect position, SerializedProperty property, GUIContent label) 52 | { 53 | if (IsArrayElement) 54 | { 55 | label = UnityEditorUtility.GetLabelTemp(); 56 | } 57 | Rect selButtnoRect = position; 58 | selButtnoRect.height = OneLineHeight; 59 | DrawSelectionPopupButton(selButtnoRect, property); 60 | 61 | if (property.managedReferenceValue != null) 62 | { 63 | EditorGUI.PropertyField(position, property, label, true); 64 | } 65 | else 66 | { 67 | EditorGUI.BeginProperty(position, label, property); 68 | EditorGUI.LabelField(position, label); 69 | EditorGUI.EndProperty(); 70 | } 71 | } 72 | 73 | private void DrawSelectionPopupButton(Rect position, SerializedProperty property) 74 | { 75 | Rect buttonRect = IsArrayElement ? position : position.AddPadding(EditorGUIUtility.labelWidth, 0f, 0f, 0f); ; 76 | EcsGUI.DrawSelectReferenceButton(buttonRect, property, Attribute.PredicateTypes.Length == 0 ? new Type[1] { fieldInfo.FieldType } : Attribute.PredicateTypes, _withOutTypes, Attribute.IsHideButtonIfNotNull); 77 | } 78 | } 79 | } 80 | #endif -------------------------------------------------------------------------------- /src/Internal/ReferenceButtonAttributeDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69a86e40de1b68a448f49be1e83a1ed5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/ReflectionExtensions.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using System; 3 | using System.Reflection; 4 | using System.Runtime.CompilerServices; 5 | using UnityObject = UnityEngine.Object; 6 | 7 | namespace DCFApixels.DragonECS.Unity.Internal 8 | { 9 | internal static class ReflectionExtensions 10 | { 11 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 12 | public static bool TryGetAttribute(this MemberInfo self, out T attrbiute) where T : Attribute 13 | { 14 | attrbiute = self.GetCustomAttribute(); 15 | return attrbiute != null; 16 | } 17 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 18 | public static bool HasAttribute(this MemberInfo self) where T : Attribute 19 | { 20 | return self.GetCustomAttribute() != null; 21 | } 22 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 23 | public static bool IsConcreteType(this Type self) 24 | { 25 | if (self.IsGenericType || self.IsAbstract || self.IsInterface) 26 | { 27 | return false; 28 | } 29 | return self.IsValueType || self.IsClass; 30 | } 31 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 32 | public static bool IsUnityObject(this Type self) 33 | { 34 | return self.IsSubclassOf(typeof(UnityObject)); 35 | } 36 | 37 | private static MethodInfo memberwiseCloneMethdo = typeof(object).GetMethod("MemberwiseClone", BindingFlags.Instance | BindingFlags.NonPublic); 38 | internal static object Clone_Reflection(this object obj) 39 | { 40 | if (obj is ICloneable cloneable) 41 | { 42 | return cloneable.Clone(); 43 | } 44 | return memberwiseCloneMethdo.Invoke(obj, null); 45 | } 46 | internal static object Clone_Reflection(this T obj) 47 | { 48 | return Clone_Reflection((object)obj); 49 | } 50 | } 51 | } 52 | #endif 53 | -------------------------------------------------------------------------------- /src/Internal/ReflectionExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d6a12b84f1e0254b8c57e1a2f2bf8a1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/ScriptsCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 562ccc58fabb98d4982e7c15fdde330e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/SparseArray.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7493e8f4d9d69e8478883dfd50d3ccee 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c36fbe915640753488e69c6e5d6efe92 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Internal/Utils/ColorUtility.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DCFApixels.DragonECS.Unity.Internal 4 | { 5 | internal static class ColorUtility 6 | { 7 | public static Color Desaturate(this Color self, float t) 8 | { 9 | float r = self.r; 10 | float g = self.g; 11 | float b = self.b; 12 | //float gray = r * 0.299f + g * 0.587f + b * 0.114f; 13 | float gray = r * 0.3333333f + g * 0.3333333f + b * 0.3333333f; 14 | r = r + (gray - r) * (1 - t); 15 | g = g + (gray - g) * (1 - t); 16 | b = b + (gray - b) * (1 - t); 17 | return new Color(r, g, b, self.a); 18 | } 19 | public static Color SetAlpha(this Color self, float a) 20 | { 21 | self.a = a; 22 | return self; 23 | } 24 | 25 | public unsafe static int GetCode32(this Color32 self) 26 | { 27 | return *(int*)&self; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/Internal/Utils/ColorUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff5cb33212a8c8a4eb5111cc17759e47 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Utils/ReadOnlyList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | 4 | namespace DCFApixels.DragonECS.Unity.Internal 5 | { 6 | internal readonly struct ReadOnlyList : IEnumerable, IReadOnlyList 7 | { 8 | private readonly List _list; 9 | public ReadOnlyList(List list) 10 | { 11 | _list = list; 12 | } 13 | public int Count 14 | { 15 | get { return _list.Count; } 16 | } 17 | public T this[int index] 18 | { 19 | get { return _list[index]; } 20 | set { _list[index] = value; } 21 | } 22 | public bool Contains(T item) 23 | { 24 | return _list.Contains(item); 25 | } 26 | public List.Enumerator GetEnumerator() 27 | { 28 | return _list.GetEnumerator(); 29 | } 30 | IEnumerator IEnumerable.GetEnumerator() 31 | { 32 | return _list.GetEnumerator(); 33 | } 34 | IEnumerator IEnumerable.GetEnumerator() 35 | { 36 | return _list.GetEnumerator(); 37 | } 38 | public static implicit operator ReadOnlyList(List a) { return new ReadOnlyList(a); } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Internal/Utils/ReadOnlyList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6be8f1171a60d646b862ec8472c55ef 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Utils/RectUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a08af8a9e1192f44c8aedf88340cb663 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Utils/StructList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 366ced1c4c1442c4db00c5a2b8c5787d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Internal/Utils/Throw.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DCFApixels.DragonECS.Unity.Internal 4 | { 5 | internal static class Throw 6 | { 7 | internal static void ArgumentOutOfRange() 8 | { 9 | throw new ArgumentOutOfRangeException(); 10 | } 11 | internal static void Argument(string message) 12 | { 13 | throw new ArgumentException(message); 14 | } 15 | internal static void Exception() 16 | { 17 | throw new Exception(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Internal/Utils/Throw.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 525c4a5bc83fb3343b3b93a02d3caf59 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 305c6d80bbe938c40b8789ac24b0b812 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11dc6a014c6c7e84ab61979e25010c57 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/ComponentTemplateProperty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6231d6781930a694696d09c3d55fc2fb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8c6da13649cc094e80f3ec624bad02b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/Editor/ComponentTemplatePropertyDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbf91ec8124942340b7f095474db92b1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/Editor/EntityTemplateEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90b44ae9b0ef473488a3befa9a120d61 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/ITemplateNode.cs: -------------------------------------------------------------------------------- 1 | #if DISABLE_DEBUG 2 | #undef DEBUG 3 | #endif 4 | 5 | namespace DCFApixels.DragonECS 6 | { 7 | public interface IEntityTemplate : ITemplateNode { } 8 | 9 | public static class ITemplateNodeExtensions 10 | { 11 | public static entlong NewEntityWithGameObject(this EcsWorld world, ITemplateNode template, string name = "Entity", GameObjectIcon icon = GameObjectIcon.NONE) 12 | { 13 | entlong e = world.NewEntityWithGameObject(name, icon); 14 | template.Apply(world.ID, e.ID); 15 | return e; 16 | } 17 | } 18 | } 19 | 20 | namespace DCFApixels.DragonECS.Unity.Internal 21 | { 22 | internal interface IEntityTemplateInternal : IEntityTemplate 23 | { 24 | string ComponentsPropertyName { get; } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/ITemplateNode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33a7d50d86178eb43a36d5e8bdd70982 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/Templates.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14555d6350df03d448d362de7b6a31c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/Templates/ComponentTemplateBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b532f9d8441035d49b9acb99ea23c231 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/Templates/MonoEntityTemplate.cs: -------------------------------------------------------------------------------- 1 | #if DISABLE_DEBUG 2 | #undef DEBUG 3 | #endif 4 | using DCFApixels.DragonECS.Unity; 5 | using DCFApixels.DragonECS.Unity.Internal; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using UnityEngine; 10 | using UnityEngine.Serialization; 11 | 12 | namespace DCFApixels.DragonECS 13 | { 14 | public abstract class MonoEntityTemplateBase : MonoBehaviour, IEntityTemplate 15 | { 16 | public abstract void Apply(short worldID, int entityID); 17 | } 18 | 19 | [DisallowMultipleComponent] 20 | [AddComponentMenu(EcsConsts.FRAMEWORK_NAME + "/" + nameof(MonoEntityTemplate), 30)] 21 | [MetaColor(MetaColor.DragonCyan)] 22 | [MetaGroup(EcsUnityConsts.PACK_GROUP, EcsUnityConsts.ENTITY_BUILDING_GROUP)] 23 | [MetaDescription(EcsConsts.AUTHOR, nameof(MonoBehaviour) + " implementation of an entity template. Templates are a set of components that are applied to entities.")] 24 | [MetaID("DragonECS_C734BA8092014833C14F21E05D7B1551")] 25 | public class MonoEntityTemplate : MonoEntityTemplateBase, IEntityTemplateInternal 26 | { 27 | [SerializeReference] 28 | [ReferenceButton(true, typeof(IComponentTemplate))] 29 | [FormerlySerializedAs("_components")] 30 | private IComponentTemplate[] _componentTemplates; 31 | 32 | #region Properties 33 | string IEntityTemplateInternal.ComponentsPropertyName 34 | { 35 | get { return nameof(_componentTemplates); } 36 | } 37 | #endregion 38 | 39 | #region Methods 40 | public ReadOnlySpan GetComponentTemplates() 41 | { 42 | return _componentTemplates; 43 | } 44 | public void SetComponentTemplates(IEnumerable componentTemplates) 45 | { 46 | _componentTemplates = componentTemplates.ToArray(); 47 | } 48 | public override void Apply(short worldID, int entityID) 49 | { 50 | foreach (var item in _componentTemplates) 51 | { 52 | item.Apply(worldID, entityID); 53 | } 54 | } 55 | public void Clear() 56 | { 57 | _componentTemplates = Array.Empty(); 58 | } 59 | #endregion 60 | 61 | #region UnityEvents 62 | private void OnValidate() 63 | { 64 | if (_componentTemplates == null) { return; } 65 | foreach (var item in _componentTemplates) 66 | { 67 | item?.OnValidate(gameObject); 68 | } 69 | } 70 | private void OnDrawGizmos() 71 | { 72 | if (_componentTemplates == null) { return; } 73 | foreach (var item in _componentTemplates) 74 | { 75 | item?.OnGizmos(transform, IComponentTemplate.GizmosMode.Always); 76 | } 77 | } 78 | private void OnDrawGizmosSelected() 79 | { 80 | if (_componentTemplates == null) { return; } 81 | foreach (var item in _componentTemplates) 82 | { 83 | item?.OnGizmos(transform, IComponentTemplate.GizmosMode.Selected); 84 | } 85 | } 86 | #endregion 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/Templates/MonoEntityTemplate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 351338ca92ace49499f450172d857af6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/Templates/ScriptableEntityTemplate.cs: -------------------------------------------------------------------------------- 1 | #if DISABLE_DEBUG 2 | #undef DEBUG 3 | #endif 4 | using DCFApixels.DragonECS.Unity; 5 | using DCFApixels.DragonECS.Unity.Internal; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using UnityEngine; 10 | using UnityEngine.Serialization; 11 | 12 | namespace DCFApixels.DragonECS 13 | { 14 | public abstract class ScriptableEntityTemplateBase : ScriptableObject, IEntityTemplate 15 | { 16 | public abstract void Apply(short worldID, int entityID); 17 | } 18 | 19 | [MetaColor(MetaColor.DragonCyan)] 20 | [MetaGroup(EcsUnityConsts.PACK_GROUP, EcsUnityConsts.ENTITY_BUILDING_GROUP)] 21 | [MetaDescription(EcsConsts.AUTHOR, nameof(ScriptableObject) + " implementation of an entity template. Templates are a set of components that are applied to entities.")] 22 | [CreateAssetMenu(fileName = nameof(ScriptableEntityTemplate), menuName = EcsConsts.FRAMEWORK_NAME + "/" + nameof(ScriptableEntityTemplate), order = 1)] 23 | [MetaID("DragonECS_7C4DBA809201D959401A5BDFB6363EC0")] 24 | public class ScriptableEntityTemplate : ScriptableEntityTemplateBase, IEntityTemplateInternal 25 | { 26 | [SerializeField] 27 | private ScriptableEntityTemplateBase[] _templates; 28 | [SerializeReference] 29 | [ReferenceButton(true, typeof(IComponentTemplate))] 30 | [FormerlySerializedAs("_components")] 31 | private IComponentTemplate[] _componentTemplates; 32 | 33 | #region Properties 34 | string IEntityTemplateInternal.ComponentsPropertyName 35 | { 36 | get { return nameof(_componentTemplates); } 37 | } 38 | #endregion 39 | 40 | #region Methods 41 | public ReadOnlySpan GetTemplates() 42 | { 43 | return _templates; 44 | } 45 | public void SetTemplates(IEnumerable templates) 46 | { 47 | _templates = templates.ToArray(); 48 | } 49 | public ReadOnlySpan GetComponentTemplates() 50 | { 51 | return _componentTemplates; 52 | } 53 | public void SetComponentTemplates(IEnumerable componentTemplates) 54 | { 55 | _componentTemplates = componentTemplates.ToArray(); 56 | } 57 | public override void Apply(short worldID, int entityID) 58 | { 59 | foreach (var template in _templates) 60 | { 61 | template.Apply(worldID, entityID); 62 | } 63 | foreach (var item in _componentTemplates) 64 | { 65 | item.Apply(worldID, entityID); 66 | } 67 | } 68 | public void Clear() 69 | { 70 | _componentTemplates = Array.Empty(); 71 | } 72 | #endregion 73 | 74 | #region UnityEvents 75 | private void OnValidate() 76 | { 77 | if (_componentTemplates == null) { return; } 78 | foreach (var item in _componentTemplates) 79 | { 80 | item?.OnValidate(this); 81 | } 82 | } 83 | #endregion 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/Templates/EntityTemplate/Templates/ScriptableEntityTemplate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d2b62f9703592042befb46ac1fee09c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53368cba894a53d4a9f3a4bf5a5b484a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec26aa9da3a093f418f434297d3ec377 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/Editor/PipelineTemplateEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8971a683bb906a944bbd2b373274c3b1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/Editor/PipelineTemplateUtilityRecordDrawer.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using DCFApixels.DragonECS.Unity.Internal; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace DCFApixels.DragonECS.Unity.Editors 7 | { 8 | [CustomPropertyDrawer(typeof(PipelineTemplateUtility.Record))] 9 | internal class PipelineTemplateUtilityRecordDrawer : ExtendedPropertyDrawer 10 | { 11 | protected override void DrawCustom(Rect position, SerializedProperty property, GUIContent label) 12 | { 13 | if (IsArrayElement == false) 14 | { 15 | Rect foldoutRect; 16 | (foldoutRect, position) = position.VerticalSliceTop(OneLineHeight + Spacing); 17 | property.isExpanded = EditorGUI.Foldout(foldoutRect, property.isExpanded, label); 18 | if (property.isExpanded == false) 19 | { 20 | return; 21 | } 22 | } 23 | 24 | using (EcsGUI.SetIndentLevel(IsArrayElement ? EcsGUI.IndentLevel : EcsGUI.IndentLevel + 1)) 25 | { 26 | Rect subPosition = position; 27 | int depth = -1; 28 | float height = 0f; 29 | 30 | property.Next(true); 31 | 32 | do 33 | { 34 | subPosition.y += height; 35 | height = EditorGUI.GetPropertyHeight(property); 36 | subPosition.height = height; 37 | 38 | EditorGUI.PropertyField(subPosition, property, true); 39 | 40 | } while (property.NextDepth(false, ref depth)); 41 | } 42 | } 43 | 44 | public override float GetPropertyHeight(SerializedProperty property, GUIContent label) 45 | { 46 | float result = 0f; 47 | if (IsArrayElement == false) 48 | { 49 | result += OneLineHeight; 50 | if (property.isExpanded == false) 51 | { 52 | return result; 53 | } 54 | } 55 | 56 | property.Next(true); 57 | int depth = -1; 58 | do 59 | { 60 | result += EditorGUI.GetPropertyHeight(property, true); 61 | } while (property.NextDepth(false, ref depth)); 62 | return result; 63 | } 64 | } 65 | } 66 | #endif -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/Editor/PipelineTemplateUtilityRecordDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c96272e4ae45f03408e899323c54d08f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/MonoBehaviourSystemWrapper.cs: -------------------------------------------------------------------------------- 1 | #if DISABLE_DEBUG 2 | #undef DEBUG 3 | #endif 4 | using DCFApixels.DragonECS.Unity; 5 | using UnityEngine; 6 | 7 | namespace DCFApixels.DragonECS 8 | { 9 | using static EcsConsts; 10 | 11 | [MetaName("MonoBehaviourSystem")] 12 | [MetaColor(MetaColor.DragonCyan)] 13 | [MetaDescription(AUTHOR, "Wrapper for MonoBehaviour systems")] 14 | [MetaID("DragonECS_2877029E9201347B4F58E1EC0A4BCD1B")] 15 | [MetaGroup(EcsUnityConsts.PACK_GROUP, OTHER_GROUP)] 16 | public class MonoBehaviourSystemWrapper : IEcsModule 17 | { 18 | public MonoBehaviour system; 19 | public void Import(EcsPipeline.Builder b) 20 | { 21 | b.Add(system); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/MonoBehaviourSystemWrapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 337c4dc120ce81c49958fcbcb95e0fe7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/PipelineTemplateUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 609f05a5f299be04db094296f731818a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/ScriptableObjectSystemWrapper.cs: -------------------------------------------------------------------------------- 1 | #if DISABLE_DEBUG 2 | #undef DEBUG 3 | #endif 4 | using DCFApixels.DragonECS.Unity; 5 | using UnityEngine; 6 | 7 | namespace DCFApixels.DragonECS 8 | { 9 | using static EcsConsts; 10 | 11 | [MetaName("ScriptableObjectSystem")] 12 | [MetaColor(MetaColor.DragonCyan)] 13 | [MetaDescription(AUTHOR, "Wrapper for ScriptableObject systems")] 14 | [MetaID("DragonECS_F5A94C5F92015B4D9286E76809311AF4")] 15 | [MetaGroup(EcsUnityConsts.PACK_GROUP, OTHER_GROUP)] 16 | public class ScriptableObjectSystemWrapper : IEcsModule 17 | { 18 | public ScriptableObject system; 19 | public void Import(EcsPipeline.Builder b) 20 | { 21 | b.Add(system); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/ScriptableObjectSystemWrapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 500803f2f9c3eb24e90b68e42bd6a1af 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/Templates.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f401f14661cf04b43a59144cf202a624 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/Templates/MonoPipelineTemplate.cs: -------------------------------------------------------------------------------- 1 | #if DISABLE_DEBUG 2 | #undef DEBUG 3 | #endif 4 | using DCFApixels.DragonECS.Unity; 5 | using DCFApixels.DragonECS.Unity.Internal; 6 | using System; 7 | using System.Linq; 8 | using UnityEngine; 9 | 10 | namespace DCFApixels.DragonECS 11 | { 12 | using static PipelineTemplateUtility; 13 | 14 | public abstract class MonoPipelineTemplateBase : MonoBehaviour, IEcsModule 15 | { 16 | public abstract void Import(EcsPipeline.Builder b); 17 | } 18 | 19 | [DisallowMultipleComponent] 20 | [AddComponentMenu(EcsConsts.FRAMEWORK_NAME + "/" + nameof(MonoPipelineTemplate), 30)] 21 | public class MonoPipelineTemplate : MonoPipelineTemplateBase, IPipelineTemplate, IEcsDefaultAddParams 22 | { 23 | [SerializeField] 24 | [ArrayElement] 25 | private string[] _layers = DefaultLayers.ToArray(); 26 | 27 | [SerializeField] 28 | private AddParams _parameters = default; 29 | 30 | [SerializeField] 31 | [ArrayElement] 32 | private Record[] _records; 33 | 34 | public ReadOnlySpan Layers 35 | { 36 | get { return _layers; } 37 | } 38 | public AddParams AddParams 39 | { 40 | get { return _parameters; } 41 | } 42 | public ReadOnlySpan Records 43 | { 44 | get { return _records; } 45 | } 46 | 47 | public sealed override void Import(EcsPipeline.Builder b) 48 | { 49 | b.Layers.MergeWith(_layers); 50 | foreach (var r in _records) 51 | { 52 | if (r.target == null || r.disabled) { continue; } 53 | b.Add(r.target, r.parameters); 54 | } 55 | } 56 | 57 | public void SetFromSerializableTemplate(EcsPipelineTemplate template) 58 | { 59 | _layers = new string[template.layers.Length]; 60 | Array.Copy(template.layers, _layers, template.layers.Length); 61 | _records = new Record[template.records.Length]; 62 | for (int i = 0; i < _records.Length; i++) 63 | { 64 | ref var s = ref template.records[i]; 65 | _records[i] = new Record(s.target, s.parameters, true); 66 | } 67 | } 68 | 69 | [ContextMenu("Validate")] 70 | public bool Validate() 71 | { 72 | bool resutl = ValidateLayers(ref _layers); 73 | resutl |= ValidateRecords(ref _records); 74 | return resutl; 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/Templates/MonoPipelineTemplate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72e04fe7bbcd12d419deca183aa10bb4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/Templates/ScriptablePipelineTemplate.cs: -------------------------------------------------------------------------------- 1 | #if DISABLE_DEBUG 2 | #undef DEBUG 3 | #endif 4 | using DCFApixels.DragonECS.Unity; 5 | using DCFApixels.DragonECS.Unity.Internal; 6 | using System; 7 | using System.Linq; 8 | using UnityEngine; 9 | 10 | namespace DCFApixels.DragonECS 11 | { 12 | using static PipelineTemplateUtility; 13 | 14 | public abstract class ScriptablePipelineTemplateBase : ScriptableObject, IEcsModule 15 | { 16 | public abstract void Import(EcsPipeline.Builder b); 17 | } 18 | 19 | [CreateAssetMenu(fileName = nameof(ScriptablePipelineTemplate), menuName = EcsConsts.FRAMEWORK_NAME + "/" + nameof(ScriptablePipelineTemplate), order = 1)] 20 | public sealed class ScriptablePipelineTemplate : ScriptablePipelineTemplateBase, IPipelineTemplate, IEcsDefaultAddParams 21 | { 22 | [SerializeField] 23 | [ArrayElement] 24 | private string[] _layers = DefaultLayers.ToArray(); 25 | 26 | [SerializeField] 27 | private AddParams _parameters = default; 28 | 29 | [SerializeField] 30 | [ArrayElement] 31 | private Record[] _records; 32 | 33 | public ReadOnlySpan Layers 34 | { 35 | get { return _layers; } 36 | } 37 | public AddParams AddParams 38 | { 39 | get { return _parameters; } 40 | } 41 | public ReadOnlySpan Records 42 | { 43 | get { return _records; } 44 | } 45 | 46 | public sealed override void Import(EcsPipeline.Builder b) 47 | { 48 | b.Layers.MergeWith(_layers); 49 | foreach (var r in _records) 50 | { 51 | if (r.target == null || r.disabled) { continue; } 52 | b.Add(r.target, r.parameters); 53 | } 54 | } 55 | 56 | public void SetFromSerializableTemplate(EcsPipelineTemplate template) 57 | { 58 | _layers = new string[template.layers.Length]; 59 | Array.Copy(template.layers, _layers, template.layers.Length); 60 | _records = new Record[template.records.Length]; 61 | for (int i = 0; i < _records.Length; i++) 62 | { 63 | ref var s = ref template.records[i]; 64 | _records[i] = new Record(s.target, s.parameters, true); 65 | } 66 | } 67 | 68 | [ContextMenu("Validate")] 69 | public bool Validate() 70 | { 71 | bool resutl = ValidateLayers(ref _layers); 72 | resutl |= ValidateRecords(ref _records); 73 | return resutl; 74 | } 75 | } 76 | } -------------------------------------------------------------------------------- /src/Templates/PipelineTemplate/Templates/ScriptablePipelineTemplate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db10fad6d6096f54b9ad5752029c2a79 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3812be7dabdfe7744a5c2dfb334e786a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Tools/DeepDebugger.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da6b7ba7fc0a44a4f8228f10ef5abcd1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Tools/DeepDebugger/Editors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 620c5dc67428c21428ff4bd9c92ed631 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Tools/DeepDebugger/Editors/DeepDebuggerWindow.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using DCFApixels.DragonECS.Unity.Internal; 3 | using DCFApixels.DragonECS.Unity.RefRepairer.Editors; 4 | using DCFApixels.DragonECS.Unity.RefRepairer.Internal; 5 | using UnityEditor; 6 | using UnityEngine; 7 | 8 | namespace DCFApixels.DragonECS.Unity.Editors 9 | { 10 | internal class DeepDebuggerWindow : EditorWindow 11 | { 12 | public const string TITLE = nameof(DeepDebuggerWindow); 13 | 14 | #if DRAGONECS_DEEP_DEBUG 15 | [MenuItem("Tools/" + EcsConsts.FRAMEWORK_NAME + "/" + TITLE)] 16 | static void Open() 17 | { 18 | var wnd = GetWindow(); 19 | wnd.titleContent = new GUIContent(TITLE); 20 | wnd.minSize = new Vector2(100f, 120f); 21 | wnd.Show(); 22 | } 23 | #endif 24 | 25 | public enum Page 26 | { 27 | ScriptsCache, 28 | MetaIDRegistry, 29 | } 30 | private Page _page; 31 | private Vector2 pos; 32 | private void OnGUI() 33 | { 34 | _page = (Page)EditorGUILayout.EnumPopup(_page); 35 | 36 | switch (_page) 37 | { 38 | case Page.ScriptsCache: 39 | DrawScriptsCache(); 40 | break; 41 | case Page.MetaIDRegistry: 42 | DrawMetaIDRegistry(); 43 | break; 44 | } 45 | } 46 | 47 | private void DrawScriptsCache() 48 | { 49 | if (GUILayout.Button("Reset")) 50 | { 51 | ScriptsCache.Reinit(); 52 | } 53 | var dicst = ScriptsCache.MetaIDScriptPathPairs; 54 | pos = GUILayout.BeginScrollView(pos); 55 | foreach (var (metaID, scriptPath) in dicst) 56 | { 57 | GUILayout.Label("", GUILayout.ExpandWidth(true)); 58 | Rect rect = GUILayoutUtility.GetLastRect(); 59 | var (leftRect, rightRect) = rect.HorizontalSliceLerp(0.5f); 60 | GUI.Label(leftRect, metaID); 61 | GUI.Label(rightRect, scriptPath); 62 | } 63 | GUILayout.EndScrollView(); 64 | } 65 | 66 | private void DrawMetaIDRegistry() 67 | { 68 | if (GUILayout.Button("Reset")) 69 | { 70 | MetaIDRegistry.instance.Reinit(); 71 | } 72 | var dicst = MetaIDRegistry.instance.TypeKeyMetaIDPairs; 73 | pos = GUILayout.BeginScrollView(pos); 74 | foreach (var (typeData, scriptPath) in dicst) 75 | { 76 | GUILayout.Label("", GUILayout.ExpandWidth(true)); 77 | Rect rect = GUILayoutUtility.GetLastRect(); 78 | var (leftRect, rightRect) = rect.HorizontalSliceLerp(0.5f); 79 | Rect preLeftRect = default; 80 | (preLeftRect, leftRect) = rect.HorizontalSliceLeft(18f); 81 | GUI.Label(preLeftRect, typeData.ToType() == null ? "-" : "+"); 82 | GUI.Label(leftRect, typeData.ToString()); 83 | GUI.Label(rightRect, scriptPath); 84 | } 85 | GUILayout.EndScrollView(); 86 | } 87 | } 88 | } 89 | #endif 90 | -------------------------------------------------------------------------------- /src/Tools/DeepDebugger/Editors/DeepDebuggerWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66e2240e9dd52204daec6a089888e7be 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/DragonDocs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70f94d097089b8b429524db514f6c1cb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Tools/DragonDocs/DragonDocs.cs: -------------------------------------------------------------------------------- 1 | using DCFApixels.DragonECS.Core; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Runtime.Serialization; 5 | using UnityEngine; 6 | 7 | namespace DCFApixels.DragonECS.Unity.Docs 8 | { 9 | [Serializable] 10 | [DataContract] 11 | public class DragonDocs 12 | { 13 | [DataMember, SerializeField] 14 | private DragonDocsMeta[] _metas; 15 | 16 | public ReadOnlySpan Metas 17 | { 18 | get { return new ReadOnlySpan(_metas); } 19 | } 20 | private DragonDocs(DragonDocsMeta[] metas) 21 | { 22 | _metas = metas; 23 | } 24 | 25 | public static DragonDocs Generate() 26 | { 27 | List metas = new List(256); 28 | foreach (var type in GetTypes()) 29 | { 30 | metas.Add(new DragonDocsMeta(type.ToMeta())); 31 | } 32 | DragonDocsMeta[] array = metas.ToArray(); 33 | Array.Sort(array); 34 | return new DragonDocs(array); 35 | } 36 | 37 | private static List GetTypes() 38 | { 39 | Type metaAttributeType = typeof(EcsMetaAttribute); 40 | List result = new List(512); 41 | foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) 42 | { 43 | foreach (var type in assembly.GetTypes()) 44 | { 45 | if (TypeMeta.IsHasCustomMeta(type)) 46 | { 47 | result.Add(type); 48 | } 49 | } 50 | } 51 | return result; 52 | } 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /src/Tools/DragonDocs/DragonDocs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c0e56cea065aeb49b2aa10ea2a55a77 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/DragonDocs/DragonDocsMeta.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3ec6d51ea63de54b993a0e4b6330e8f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/DragonDocs/Editors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16e9bdd295352c54ab0d7ea882e152e8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Tools/DragonDocs/Editors/DragonDocsPrefs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 988ba077639ea4d42b79ff0605103c88 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/DragonDocs/Editors/DragonDocsWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db40c55995fb85b47bffaf33fb4d337c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/MetaIDgenerator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97fdad78c98d48c43a73aeecf2083cbb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Tools/MetaIDgenerator/Editors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d73207c0a0e08c3479a7101a2090e17c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Tools/MetaIDgenerator/Editors/MetaIDGenerator.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace DCFApixels.DragonECS.Unity.Editors 6 | { 7 | 8 | internal class MetaIDGenerator : EditorWindow 9 | { 10 | public const string TITLE = nameof(MetaIDGenerator); 11 | 12 | [MenuItem("Tools/" + EcsConsts.FRAMEWORK_NAME + "/" + TITLE)] 13 | static void Open() 14 | { 15 | var wnd = GetWindow(); 16 | wnd.titleContent = new GUIContent(TITLE); 17 | wnd.minSize = new Vector2(100f, 120f); 18 | wnd.Show(); 19 | } 20 | 21 | 22 | private string _lastID; 23 | private string _lastIDAttribute; 24 | private string _template; 25 | 26 | private void OnGUI() 27 | { 28 | EditorGUILayout.TextField("MetaID", _lastID); 29 | EditorGUILayout.TextField("Attribute", _lastIDAttribute); 30 | EditorGUILayout.TextField("Template Type", _template); 31 | 32 | if (GUILayout.Button("Generate new MetaID")) 33 | { 34 | _lastID = MetaID.GenerateNewUniqueID(); 35 | _lastIDAttribute = MetaID.IDToAttribute(_lastID); 36 | _template = "Tempalte" + MetaID.ConvertIDToTypeName(_lastID); 37 | GUI.FocusControl(null); 38 | } 39 | } 40 | } 41 | } 42 | #endif -------------------------------------------------------------------------------- /src/Tools/MetaIDgenerator/Editors/MetaIDGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63d0e9c5d1c44844abb3e6dc3c863668 -------------------------------------------------------------------------------- /src/Tools/RefRepairer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2d35258891aadf4db44fa6c02b9d73b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Tools/RefRepairer/CollectedAssetMissingRecord.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEditor; 3 | 4 | namespace DCFApixels.DragonECS.Unity.RefRepairer.Editors 5 | { 6 | internal readonly struct CollectedAssetMissingRecord 7 | { 8 | public readonly UnityObjectDataBase UnityObject; 9 | public readonly ManagedReferenceMissingType Missing; 10 | public readonly MissingsResolvingData ResolvingData; 11 | public bool IsResolvedOrNull 12 | { 13 | get { return UnityObject == null || ResolvingData.IsResolved; } 14 | } 15 | public bool IsNull 16 | { 17 | get { return UnityObject == null; } 18 | } 19 | public CollectedAssetMissingRecord(UnityObjectDataBase unityObject, ManagedReferenceMissingType missing, MissingsResolvingData resolvingData) 20 | { 21 | UnityObject = unityObject; 22 | Missing = missing; 23 | ResolvingData = resolvingData; 24 | } 25 | } 26 | } 27 | #endif -------------------------------------------------------------------------------- /src/Tools/RefRepairer/CollectedAssetMissingRecord.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 159827d6f103976438edffb7b750a9f9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/RefRepairer/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4c9608eab407004dba648302e06974b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Tools/RefRepairer/Editor/MetaIDRegistry.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcb53d0894c939c49b3e12c6286f4750 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/RefRepairer/Editor/RefRepairerWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a7d6a916b19cda418d5b119c0b02804 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/RefRepairer/MissingRefContainer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc4be98749205b244a917e941683712b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/RefRepairer/MissingsResolvingData.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using DCFApixels.DragonECS.Unity.RefRepairer.Internal; 3 | using System; 4 | 5 | namespace DCFApixels.DragonECS.Unity.RefRepairer.Editors 6 | { 7 | internal class MissingsResolvingData 8 | { 9 | public readonly TypeData OldTypeData; 10 | public readonly string OldSerializedInfoLine; 11 | 12 | private TypeData _newTypeData; 13 | private string _newSerializedInfoLine; 14 | 15 | private Type _chachedNewType = null; 16 | private bool _chachedNewTypeInited = false; 17 | 18 | public MissingsResolvingData(TypeData oldTypeData) 19 | { 20 | OldTypeData = oldTypeData; 21 | OldSerializedInfoLine = RepaireFileUtility.GenerateReplacedLine(oldTypeData); 22 | } 23 | public bool IsResolved 24 | { 25 | get { return FindNewType() != null; } 26 | } 27 | public bool IsEmpty 28 | { 29 | get 30 | { 31 | return 32 | string.IsNullOrEmpty(_newTypeData.ClassName) || 33 | string.IsNullOrEmpty(_newTypeData.AssemblyName); 34 | } 35 | } 36 | public TypeData NewTypeData 37 | { 38 | get { return _newTypeData; } 39 | set 40 | { 41 | _newTypeData = value; 42 | _newSerializedInfoLine = null; 43 | _chachedNewType = null; 44 | _chachedNewTypeInited = false; 45 | } 46 | } 47 | public string NewSerializedInfoLine 48 | { 49 | get 50 | { 51 | if (_newSerializedInfoLine == null) 52 | { 53 | _newSerializedInfoLine = RepaireFileUtility.GenerateReplacedLine(_newTypeData); 54 | } 55 | return _newSerializedInfoLine; 56 | } 57 | } 58 | 59 | public Type FindNewType() 60 | { 61 | if (_chachedNewTypeInited == false) 62 | { 63 | _chachedNewType = _newTypeData.ToType(); 64 | } 65 | return _chachedNewType; 66 | } 67 | } 68 | } 69 | #endif -------------------------------------------------------------------------------- /src/Tools/RefRepairer/MissingsResolvingData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04ca9018956d246498718e98525dc35c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/RefRepairer/RepaireFileUtility.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DCFApixels/DragonECS-Unity/bdeb2f8b58e6f1660b5a93533a7741a807e84aa9/src/Tools/RefRepairer/RepaireFileUtility.cs -------------------------------------------------------------------------------- /src/Tools/RefRepairer/RepaireFileUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10aa8570693b31b4c9614ae597b522b0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/RefRepairer/TypeData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1cb352d49d90d054fa1fe9dbe8a17e45 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Tools/RefRepairer/UnityObjectDataBase.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEditor; 3 | using UnityEngine.SceneManagement; 4 | using UnityObject = UnityEngine.Object; 5 | 6 | namespace DCFApixels.DragonECS.Unity.RefRepairer.Editors 7 | { 8 | internal abstract class UnityObjectDataBase 9 | { 10 | public abstract GUID AssetGuid { get; } 11 | public string GetLocalAssetPath() 12 | { 13 | return AssetDatabase.GUIDToAssetPath(AssetGuid); 14 | } 15 | } 16 | 17 | internal class UnityObjectData : UnityObjectDataBase 18 | { 19 | private readonly GUID _assetGUID; 20 | public readonly UnityObject UnityObject; 21 | public sealed override GUID AssetGuid { get { return _assetGUID; } } 22 | public UnityObjectData(UnityObject unityObject, string pathToPrefab) 23 | { 24 | _assetGUID = AssetDatabase.GUIDFromAssetPath(pathToPrefab); 25 | UnityObject = unityObject; 26 | } 27 | } 28 | 29 | internal class SceneObjectData : UnityObjectDataBase 30 | { 31 | private readonly GUID _assetGUID; 32 | public readonly string SceneName; 33 | public sealed override GUID AssetGuid { get { return _assetGUID; } } 34 | public SceneObjectData(Scene scene) 35 | { 36 | _assetGUID = AssetDatabase.GUIDFromAssetPath(scene.path); 37 | SceneName = scene.name; 38 | } 39 | } 40 | } 41 | #endif -------------------------------------------------------------------------------- /src/Tools/RefRepairer/UnityObjectDataBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb7772586d9b80449bcc35b36a60b357 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c2eeaf69783f0b41a968e7e4d539cf3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /src/Utils/MetaColorExstensions.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace DCFApixels.DragonECS 4 | { 5 | public static class MetaColorExstensions 6 | { 7 | public static Color ToUnityColor(this T self) where T : IMetaColor 8 | { 9 | return new Color(self.R / 255f, self.G / 255f, self.B / 255f, self.A / 255f); 10 | } 11 | public static Color32 ToUnityColor32(this T self) where T : IMetaColor 12 | { 13 | return new Color32(self.R, self.G, self.B, self.A); 14 | } 15 | 16 | public static MetaColor ToMetaColor(this Color self) 17 | { 18 | return new MetaColor((byte)(self.r * 255), (byte)(self.g * 255), (byte)(self.b * 255), (byte)(self.a * 255)); 19 | } 20 | 21 | public static MetaColor ToMetaColor(this Color32 self) 22 | { 23 | return new MetaColor(self.r, self.g, self.b, self.a); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Utils/MetaColorExstensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fae683793d3ed345ad3bf19731db13e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /src/Utils/ReferenceButtonAttribute.cs: -------------------------------------------------------------------------------- 1 | #if DISABLE_DEBUG 2 | #undef DEBUG 3 | #endif 4 | using DCFApixels.DragonECS.Unity.Editors; 5 | using System; 6 | using UnityEngine; 7 | 8 | namespace DCFApixels.DragonECS 9 | { 10 | public sealed class ReferenceButtonAttribute : PropertyAttribute, IReferenceButtonAttribute 11 | { 12 | public readonly Type[] PredicateTypes; 13 | public readonly bool IsHideButtonIfNotNull; 14 | Type[] IReferenceButtonAttribute.PredicateTypes { get { return PredicateTypes; } } 15 | bool IReferenceButtonAttribute.IsHideButtonIfNotNull { get { return IsHideButtonIfNotNull; } } 16 | public ReferenceButtonAttribute(bool isHideButtonIfNotNull = false) : this(isHideButtonIfNotNull, Array.Empty()) { } 17 | public ReferenceButtonAttribute(params Type[] predicateTypes) : this(false, predicateTypes) { } 18 | public ReferenceButtonAttribute(bool isHideButtonIfNotNull, params Type[] predicateTypes) 19 | { 20 | IsHideButtonIfNotNull = isHideButtonIfNotNull; 21 | PredicateTypes = predicateTypes; 22 | Array.Sort(predicateTypes, (a, b) => string.Compare(a.AssemblyQualifiedName, b.AssemblyQualifiedName, StringComparison.Ordinal)); 23 | } 24 | } 25 | public sealed class ReferenceButtonWithOutAttribute : Attribute 26 | { 27 | public readonly Type[] PredicateTypes; 28 | [Obsolete("With empty parameters, this attribute makes no sense.", true)] 29 | public ReferenceButtonWithOutAttribute() : this(Array.Empty()) { } 30 | public ReferenceButtonWithOutAttribute(params Type[] predicateTypes) 31 | { 32 | PredicateTypes = predicateTypes; 33 | Array.Sort(predicateTypes, (a, b) => string.Compare(a.AssemblyQualifiedName, b.AssemblyQualifiedName, StringComparison.Ordinal)); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/Utils/ReferenceButtonAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0eb5971224cb3544bfe1f9b1c296b00 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | --------------------------------------------------------------------------------