├── .gitignore
├── .gitmodules
├── Assets.meta
├── Assets
├── GameFramework.meta
├── Res.meta
├── Res
│ ├── Configs.meta
│ ├── Configs
│ │ ├── DataTableCodeTemplate.txt
│ │ ├── DataTableCodeTemplate.txt.meta
│ │ ├── DataTableTemplate.txt
│ │ └── DataTableTemplate.txt.meta
│ ├── DataTables.meta
│ └── DataTables
│ │ ├── Test.bytes
│ │ ├── Test.bytes.meta
│ │ ├── Test.txt
│ │ ├── Test.txt.meta
│ │ ├── TestDictionary.bytes
│ │ ├── TestDictionary.bytes.meta
│ │ ├── TestDictionary.txt
│ │ ├── TestDictionary.txt.meta
│ │ ├── TestEnum.bytes
│ │ ├── TestEnum.bytes.meta
│ │ ├── TestEnum.txt
│ │ └── TestEnum.txt.meta
├── Resources.meta
├── Scenes.meta
├── Scenes
│ ├── Test.unity
│ └── Test.unity.meta
├── Scripts.meta
├── Scripts
│ ├── DataTableExtensions.meta
│ ├── DataTableExtensions
│ │ ├── Editor.meta
│ │ ├── Editor
│ │ │ ├── DataTableEditor.meta
│ │ │ ├── DataTableEditor
│ │ │ │ ├── DataTableEditor.cs
│ │ │ │ ├── DataTableEditor.cs.meta
│ │ │ │ ├── EditorWindowUtility.cs
│ │ │ │ └── EditorWindowUtility.cs.meta
│ │ │ ├── DataTableGenerator.meta
│ │ │ ├── DataTableGenerator
│ │ │ │ ├── DataTableCodeGenerator.cs
│ │ │ │ ├── DataTableCodeGenerator.cs.meta
│ │ │ │ ├── DataTableGenerator.cs
│ │ │ │ ├── DataTableGenerator.cs.meta
│ │ │ │ ├── DataTableGeneratorMenu.cs
│ │ │ │ ├── DataTableGeneratorMenu.cs.meta
│ │ │ │ ├── DataTableProcessor.ArrayProcessor.cs
│ │ │ │ ├── DataTableProcessor.ArrayProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.BoolProcessor.cs
│ │ │ │ ├── DataTableProcessor.BoolProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.ByteProcessor.cs
│ │ │ │ ├── DataTableProcessor.ByteProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.CharProcessor.cs
│ │ │ │ ├── DataTableProcessor.CharProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.Color32Processor.cs
│ │ │ │ ├── DataTableProcessor.Color32Processor.cs.meta
│ │ │ │ ├── DataTableProcessor.ColorProcessor.cs
│ │ │ │ ├── DataTableProcessor.ColorProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.CommentProcessor.cs
│ │ │ │ ├── DataTableProcessor.CommentProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.DataProcessor.cs
│ │ │ │ ├── DataTableProcessor.DataProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.DataProcessorUtility.cs
│ │ │ │ ├── DataTableProcessor.DataProcessorUtility.cs.meta
│ │ │ │ ├── DataTableProcessor.DateTimeProcessor.cs
│ │ │ │ ├── DataTableProcessor.DateTimeProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.DecimalProcessor.cs
│ │ │ │ ├── DataTableProcessor.DecimalProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.DictionaryProcessor.cs
│ │ │ │ ├── DataTableProcessor.DictionaryProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.DoubleProcessor.cs
│ │ │ │ ├── DataTableProcessor.DoubleProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.EnumProcessor.cs
│ │ │ │ ├── DataTableProcessor.EnumProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.FloatProcessor.cs
│ │ │ │ ├── DataTableProcessor.FloatProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.GenericDataProcessor.cs
│ │ │ │ ├── DataTableProcessor.GenericDataProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.ICollectionProcessor.cs
│ │ │ │ ├── DataTableProcessor.ICollectionProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.IDictionaryProcessor.cs
│ │ │ │ ├── DataTableProcessor.IDictionaryProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.IdProcessor.cs
│ │ │ │ ├── DataTableProcessor.IdProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.IntProcessor.cs
│ │ │ │ ├── DataTableProcessor.IntProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.ListProcessor.cs
│ │ │ │ ├── DataTableProcessor.ListProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.LongProcessor.cs
│ │ │ │ ├── DataTableProcessor.LongProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.QuaternionProcessor.cs
│ │ │ │ ├── DataTableProcessor.QuaternionProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.RectProcessor.cs
│ │ │ │ ├── DataTableProcessor.RectProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.SByteProcessor.cs
│ │ │ │ ├── DataTableProcessor.SByteProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.ShortProcessor.cs
│ │ │ │ ├── DataTableProcessor.ShortProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.StringProcessor.cs
│ │ │ │ ├── DataTableProcessor.StringProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.UIntProcessor.cs
│ │ │ │ ├── DataTableProcessor.UIntProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.ULongProcessor.cs
│ │ │ │ ├── DataTableProcessor.ULongProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.UShortProcessor.cs
│ │ │ │ ├── DataTableProcessor.UShortProcessor.cs.meta
│ │ │ │ ├── DataTableProcessor.Vector2Processor.cs
│ │ │ │ ├── DataTableProcessor.Vector2Processor.cs.meta
│ │ │ │ ├── DataTableProcessor.Vector3Processor.cs
│ │ │ │ ├── DataTableProcessor.Vector3Processor.cs.meta
│ │ │ │ ├── DataTableProcessor.Vector4Processor.cs
│ │ │ │ ├── DataTableProcessor.Vector4Processor.cs.meta
│ │ │ │ ├── DataTableProcessor.cs
│ │ │ │ └── DataTableProcessor.cs.meta
│ │ │ ├── Extensions.meta
│ │ │ ├── Extensions
│ │ │ │ ├── DataTableConfig.cs
│ │ │ │ ├── DataTableConfig.cs.meta
│ │ │ │ ├── DataTableProcessorExtensions.cs
│ │ │ │ ├── DataTableProcessorExtensions.cs.meta
│ │ │ │ ├── ExcelExtension.cs
│ │ │ │ ├── ExcelExtension.cs.meta
│ │ │ │ ├── ExtensionsGenerate.cs
│ │ │ │ ├── ExtensionsGenerate.cs.meta
│ │ │ │ ├── PermutationAndCombination.cs
│ │ │ │ ├── PermutationAndCombination.cs.meta
│ │ │ │ ├── UnityInternalBridge.meta
│ │ │ │ └── UnityInternalBridge
│ │ │ │ │ ├── ReorderableList.cs
│ │ │ │ │ ├── ReorderableList.cs.meta
│ │ │ │ │ ├── Unity.InternalAPIEngineBridge.006.asmdef
│ │ │ │ │ └── Unity.InternalAPIEngineBridge.006.asmdef.meta
│ │ │ ├── NPOI 2.2.0.0.meta
│ │ │ └── NPOI 2.2.0.0
│ │ │ │ ├── LICENSE
│ │ │ │ ├── LICENSE.meta
│ │ │ │ ├── Read Me.txt
│ │ │ │ ├── Read Me.txt.meta
│ │ │ │ ├── dotnet2.meta
│ │ │ │ └── dotnet2
│ │ │ │ ├── NPOI.OOXML.XML
│ │ │ │ ├── NPOI.OOXML.XML.meta
│ │ │ │ ├── NPOI.OOXML.dll
│ │ │ │ ├── NPOI.OOXML.dll.meta
│ │ │ │ ├── NPOI.OpenXml4Net.XML
│ │ │ │ ├── NPOI.OpenXml4Net.XML.meta
│ │ │ │ ├── NPOI.OpenXml4Net.dll
│ │ │ │ ├── NPOI.OpenXml4Net.dll.meta
│ │ │ │ ├── NPOI.OpenXmlFormats.dll
│ │ │ │ ├── NPOI.OpenXmlFormats.dll.meta
│ │ │ │ ├── NPOI.XML
│ │ │ │ ├── NPOI.XML.meta
│ │ │ │ ├── NPOI.dll
│ │ │ │ └── NPOI.dll.meta
│ │ ├── Runtime.meta
│ │ └── Runtime
│ │ │ ├── DataTable.meta
│ │ │ ├── DataTable
│ │ │ ├── DRTest.cs
│ │ │ ├── DRTest.cs.meta
│ │ │ ├── DRTestDictionary.cs
│ │ │ ├── DRTestDictionary.cs.meta
│ │ │ ├── DRTestEnum.cs
│ │ │ └── DRTestEnum.cs.meta
│ │ │ ├── Extensions.meta
│ │ │ └── Extensions
│ │ │ ├── BinaryReaderExtension.Array.cs
│ │ │ ├── BinaryReaderExtension.Array.cs.meta
│ │ │ ├── BinaryReaderExtension.Dictionary.cs
│ │ │ ├── BinaryReaderExtension.Dictionary.cs.meta
│ │ │ ├── BinaryReaderExtension.List.cs
│ │ │ ├── BinaryReaderExtension.List.cs.meta
│ │ │ ├── BinaryReaderExtension.cs
│ │ │ ├── BinaryReaderExtension.cs.meta
│ │ │ ├── DataTableExtension.Array.cs
│ │ │ ├── DataTableExtension.Array.cs.meta
│ │ │ ├── DataTableExtension.Dictionary.cs
│ │ │ ├── DataTableExtension.Dictionary.cs.meta
│ │ │ ├── DataTableExtension.List.cs
│ │ │ ├── DataTableExtension.List.cs.meta
│ │ │ ├── DataTableExtension.cs
│ │ │ └── DataTableExtension.cs.meta
│ ├── Test.meta
│ └── Test
│ │ ├── Procedure.meta
│ │ ├── Procedure
│ │ ├── ProcedureTest.cs
│ │ └── ProcedureTest.cs.meta
│ │ ├── TestAsmdef.meta
│ │ └── TestAsmdef
│ │ ├── Test.asmdef
│ │ ├── Test.asmdef.meta
│ │ ├── TestEnum.cs
│ │ └── TestEnum.cs.meta
├── Test.txt.meta
├── Tests.meta
└── Tests
│ ├── Test.cs
│ ├── Test.cs.meta
│ ├── Tests.asmdef
│ └── Tests.asmdef.meta
├── Excels
├── Test.xlsx
├── TestDictionary.xlsx
└── TestEnum.xlsx
├── LICENSE
├── ProjectSettings
├── AudioManager.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── NavMeshAreas.asset
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── QualitySettings.asset
├── TagManager.asset
├── TimeManager.asset
├── UnityConnectSettings.asset
└── VFXManager.asset
├── README.md
└── Tests.csproj.meta
/.gitignore:
--------------------------------------------------------------------------------
1 | /[Ll]ibrary/
2 | /[Tt]emp/
3 | /[Oo]bj/
4 | /[Bb]uild/
5 | /[Bb]uilds/
6 | /.vs/
7 |
8 | *.csproj
9 | *.unityproj
10 | *.booproj
11 | *.sln
12 | *.suo
13 | *.tmp
14 | *.user
15 | *.userprefs
16 | *.pidb
17 | *.svd
18 |
19 | /Assets/StreamingAssets/*
20 | !/Assets/StreamingAssets/.gitkeep
21 | /ProjectSettings/ProjectVersion.txt
22 | /Packages/*
23 | /UnityPackageManager/*
24 | /Assets/Plugins/Editor/JetBrains/*
25 | /Assets/Plugins/Editor/JetBrains.meta
26 | /.idea/*
27 | /Logs/*
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "Assets/GameFramework"]
2 | path = Assets/GameFramework
3 | url = https://github.com/EllanJiang/UnityGameFramework
4 |
--------------------------------------------------------------------------------
/Assets.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ae973aaa9deb4458987792d73dc185a2
3 | timeCreated: 1590976914
--------------------------------------------------------------------------------
/Assets/GameFramework.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cff5d535d4a689440884164367e90189
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Res.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 630cf6a115657884a9106f2da5675093
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Res/Configs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ad249356453db83439cce0754683e3d5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Res/Configs/DataTableCodeTemplate.txt:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // 此文件由工具自动生成,请勿直接修改。
3 | // 生成时间:__DATA_TABLE_CREATE_TIME__
4 | //------------------------------------------------------------
5 |
6 | using GameFramework;
7 | using System;
8 | using System.Collections.Generic;
9 | using System.IO;
10 | using System.Text;
11 | using UnityEngine;
12 | using UnityGameFramework.Runtime;
13 | __DATA_TABLE_PROPERTIES_NAMESPACE__
14 |
15 | namespace __DATA_TABLE_NAME_SPACE__
16 | {
17 | ///
18 | /// __DATA_TABLE_COMMENT__
19 | ///
20 | public class __DATA_TABLE_CLASS_NAME__ : DataRowBase
21 | {
22 | private int m_Id = 0;
23 |
24 | ///
25 | /// __DATA_TABLE_ID_COMMENT__
26 | ///
27 | public override int Id
28 | {
29 | get
30 | {
31 | return m_Id;
32 | }
33 | }
34 |
35 | __DATA_TABLE_PROPERTIES__
36 |
37 | __DATA_TABLE_PARSER__
38 |
39 | __DATA_TABLE_PROPERTY_ARRAY__
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Assets/Res/Configs/DataTableCodeTemplate.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a0c38abcdb787b944a57be016d3f100b
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Res/Configs/DataTableTemplate.txt:
--------------------------------------------------------------------------------
1 | # 测试表格生成
2 | # Id
3 | # int
4 | # 编号 备注
5 |
--------------------------------------------------------------------------------
/Assets/Res/Configs/DataTableTemplate.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9e9064630e7cc114e81d7c48cf202ca4
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Res/DataTables.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0819e7ee228996c48b76351ecedd1c94
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Res/DataTables/Test.bytes:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FingerCaster/UGFDataTableExtension/f509090a3797f6e0c53a84a5059913f9f5b6306d/Assets/Res/DataTables/Test.bytes
--------------------------------------------------------------------------------
/Assets/Res/DataTables/Test.bytes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 06e5a56e44b0a0841880e75fc6af125d
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Res/DataTables/Test.txt:
--------------------------------------------------------------------------------
1 | # 测试表格生成
2 | # Id BoolValue ByteValue CharValue Color32Value ColorValue CommentValue DateTimeValue DecimalValue DoubleValue FloatValue IntValue LongValue QuaternionValue RectValue SByteValue ShortValue StringValue UIntValue ULongValue UShortValue Vector2Value Vector3Value Vector4Value BoolList ByteList CharList Color32List ColorList DateTimeList DecimalList DoubleList FloatList IntList LongList QuaternionList RectList SByteList ShortList StringList UIntList ULongList UShortList Vector2List Vector3List Vector4List BoolArray ByteArray CharArray Color32Array ColorArray DateTimeArray DecimalArray DoubleArray FloatArray IntArray LongArray QuaternionArray RectArray SByteArray ShortArray StringArray UIntArray ULongArray UShortArray Vector2Array Vector3Array Vector4Array
3 | # int bool byte char color32 color comment datetime decimal double float int long quaternion rect sbyte short string uint ulong ushort vector2 vector3 vector4 list list list list list list list list list list list list list list list list list list list list list list bool[] byte[] char[] color32[] color[] datetime[] decimal[] double[] float[] int[] long[] quaternion[] rect[] sbyte[] short[] string[] uint[] ulong[] ushort[] vector2[] vector3[] vector4[]
4 | # 编号 备注 Bool值 Byte值 Char值 Color32值 Color值 Comment值 DateTime值 Decimal值 Double值 Float值 Int值 Long值 Quaternion值 Rect值 SByte值 Short值 String值 UInt值 ULong值 UShort值 Vector2值 Vector3值 Vector4值 Bool列表 Byte列表 Char列表 Color32列表 Color列表 DateTime列表 Decimal列表 Double列表 Float列表 Int列表 Long列表 Quaternion列表 Rect列表 SByte列表 Short列表 String列表 UInt列表 ULong列表 UShort列表 Vector2列表 Vector3列表 Vector4列表 Bool数组 Byte数组 Char数组 Color32数组 Color数组 DateTime数组 Decimal数组 Double数组 Float数组 Int数组 Long数组 Quaternion数组 Rect数组 SByte数组 Short数组 String数组 UInt数组 ULong数组 UShort数组 Vector2数组 Vector3数组 Vector4数组
5 | 1 这一列是备注 TRUE 240 A 128,128,128,128 0.1,0.1,0.1,0.1 这一列也是备注 2020-05-28 15:55:32 3.1415926 3.1415926 3.1415926 32768 31415926 0.1,0.1,0.1,0.1 20.0,20.0,20.0,20.0 120 16000 字符串 6000000 6000000 60000 12.98,23.12 12.34,23.22,34.22 12.01,23.00,34.88,45.99 TRUE,FALSE,TRUE 210,22,3 A,B,c 128,128,128,255|12,12,156,200|123,123,123,123 0.1,0.7,0.85,1|0.5,0.4,0.6,1|0.32,0.52,0.22,0.5 2020-05-28 15:55:32,2020-05-28 15:55:46,2020-05-28 15:55:53 3.1415926,45,4.655421 1.2222,2.111,3.58 4,152.111,0.123 1,2,3 123123123,123123123,123123123 0.1,0.1,0.1,0.1|0.2,0.2,0.2,0.2|0.3,0.3,0.3,0.3 20.0,20.0,20.0,20.0|20.0,20.0,20.0,20.0|20.0,20.0,20.0,20.0 1,2,3 1,2,3 字符串1,字符串2,字符串3 123456789 123456,123456,123000 123,123,123 12.98,23.12|12.98,23.12|12.98,23.12 12.34,23.22,34.22|12.34,23.22,34.22|12.34,23.22,34.22 12.01,23.00,34.88,45.99|12.01,23.00,34.88,45.99|12.01,23.00,34.88,45.99 TRUE,FALSE,TRUE 210,22,3 A,B,c 128,128,128,255|12,12,156,200|123,123,123,123 0.1,0.7,0.85,1|0.5,0.4,0.6,1|0.32,0.52,0.22,0.5 2020-05-28 15:55:32,2020-05-28 15:55:46,2020-05-28 15:55:53 3.1415926,45,4.655421 1.2222,2.111,3.58 4,152.111,0.123 1,2,3 123456,123456,123456 0.1,0.1,0.1,0.1|0.2,0.2,0.2,0.2|0.3,0.3,0.3,0.3 20.0,20.0,20.0,20.0|20.0,20.0,20.0,20.0|20.0,20.0,20.0,20.0 1,2,3 1,2,3 字符串1,字符串2,字符串3 123456789 123456,123456,123000 123,123,123 12.98,23.12|12.98,23.12|12.98,23.12 12.34,23.22,34.22|12.34,23.22,34.22|12.34,23.22,34.22 12.01,23.00,34.88,45.99|12.01,23.00,34.88,45.99|12.01,23.00,34.88,45.99
6 |
--------------------------------------------------------------------------------
/Assets/Res/DataTables/Test.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b7a8e1df3a90a6749b0d8c58d77747b2
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Res/DataTables/TestDictionary.bytes:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FingerCaster/UGFDataTableExtension/f509090a3797f6e0c53a84a5059913f9f5b6306d/Assets/Res/DataTables/TestDictionary.bytes
--------------------------------------------------------------------------------
/Assets/Res/DataTables/TestDictionary.bytes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2536c2bc862f3df4bbbd8ca029380135
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Res/DataTables/TestDictionary.txt:
--------------------------------------------------------------------------------
1 | # 测试表格生成
2 | # Id TestIntIntDictionary TestIntVector3Dictionary
3 | # int dictionary dictionary
4 | # 编号 备注 测试字典(KeyType:int ValueType:Int) 测试字典(KeyType:int ValueType:vector3)
5 | 1 {1#1}|{2#2}|{3#3} {1#0.2,1.5,100}|{2#222,444,111}|{3#3.15,385.123,123}
6 |
--------------------------------------------------------------------------------
/Assets/Res/DataTables/TestDictionary.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a652af92cb154e179a972fbded11b3d5
3 | timeCreated: 1590855996
--------------------------------------------------------------------------------
/Assets/Res/DataTables/TestEnum.bytes:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Assets/Res/DataTables/TestEnum.bytes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: adff19874cd718f439e489eb2c8a6222
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Res/DataTables/TestEnum.txt:
--------------------------------------------------------------------------------
1 | # 测试表格生成
2 | # Id TestEnum TestEnumList TestEnumArray TestEnumDic
3 | # int Test.TestEnum list Test.TestEnum[] dictionary
4 | # 编号 测试枚举 测试枚举list 测试枚举Array 测试枚举字典
5 | 1 1 Test3,2,Test4 1,2,3 {1#1}|{2#2}|{3#3}
6 |
--------------------------------------------------------------------------------
/Assets/Res/DataTables/TestEnum.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ca0b4e86d89e43048612dac6e52ed72b
3 | timeCreated: 1604851511
--------------------------------------------------------------------------------
/Assets/Resources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: abef01a6d083f0e4dbc350e7809e8edb
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b366c7ffe1e0e09469c86f770398880c
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scenes/Test.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ae2d379b723364549ba8fb9bb3ebc695
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 854555e8db4aa924989218cd96e4f37e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1c914c99b77c47149ac031a5497039e9
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ece86d07de1f926469ea2b931603fa07
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableEditor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b7c29f5beb97d0146ac04b4d3fc04ae6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableEditor/DataTableEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 68a211d411f44794b0dca90dfe0e62c7
3 | timeCreated: 1626166727
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableEditor/EditorWindowUtility.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 | using UnityEngine;
3 |
4 | namespace DataTableEditor
5 | {
6 | public static class EditorWindowUtility
7 | {
8 | public static T CreateWindow(string title) where T : EditorWindow
9 | {
10 | T editorWindow = ScriptableObject.CreateInstance();
11 | if (title != null)
12 | {
13 | editorWindow.titleContent = new GUIContent(title);
14 | }
15 | return editorWindow;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableEditor/EditorWindowUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 54b8dfa585cc430dac81f2403b8d4be3
3 | timeCreated: 1626168521
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e8027f75b9874ecf93881ae842f2cc8c
3 | timeCreated: 1595577390
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableCodeGenerator.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.Text;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public delegate void DataTableCodeGenerator(DataTableProcessor dataTableProcessor, StringBuilder codeContent,
13 | object userData);
14 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableCodeGenerator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 40941eb45ca7d284f8a806370b88fa78
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableGenerator.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5429345c1f3d2c747b0f74fefa25c149
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableGeneratorMenu.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Linq;
3 | using GameFramework;
4 | using UnityEditor;
5 | using UnityEngine;
6 |
7 | namespace DE.Editor.DataTableTools
8 | {
9 | public sealed class DataTableGeneratorMenu
10 | {
11 |
12 | [MenuItem("DataTable/Generate DataTables")]
13 | public static void GenerateDataTables()
14 | {
15 | foreach (var dataTableName in DataTableConfig.DataTableNames)
16 | {
17 | var dataTableProcessor = DataTableGenerator.CreateDataTableProcessor(dataTableName);
18 | if (!DataTableGenerator.CheckRawData(dataTableProcessor, dataTableName))
19 | {
20 | Debug.LogError(Utility.Text.Format("Check raw data failure. DataTableName='{0}'", dataTableName));
21 | break;
22 | }
23 |
24 | DataTableGenerator.GenerateDataFile(dataTableProcessor, dataTableName);
25 | DataTableGenerator.GenerateCodeFile(dataTableProcessor, dataTableName);
26 | }
27 |
28 | AssetDatabase.Refresh();
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableGeneratorMenu.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7ddc8f13b2516c643a67d92a319dbf72
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ArrayProcessor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace DE.Editor.DataTableTools
5 | {
6 | public sealed partial class DataTableProcessor
7 | {
8 | private sealed class ArrayProcessor : DataProcessor, ICollectionProcessor
9 | where T : GenericDataProcessor, new()
10 | {
11 | public override bool IsComment => false;
12 |
13 | public override bool IsSystem => false;
14 | public override bool IsEnum => false;
15 |
16 | public override Type Type
17 | {
18 | get
19 | {
20 | if (!(Activator.CreateInstance(typeof(T)) is T t))
21 | return typeof(T[]);
22 | var type = typeof(T[]);
23 | return type;
24 | }
25 | }
26 |
27 | public override bool IsId => false;
28 |
29 | public override string LanguageKeyword
30 | {
31 | get
32 | {
33 | if (Activator.CreateInstance(typeof(T)) is T t) return $"{t.LanguageKeyword}[]";
34 |
35 | return $"{typeof(T)}[]";
36 | }
37 | }
38 |
39 | public Type ItemType
40 | {
41 | get
42 | {
43 | DataProcessor dataProcessor = Activator.CreateInstance(typeof(T)) as T;
44 | return dataProcessor.Type;
45 | }
46 | }
47 |
48 | public string ItemLanguageKeyword
49 | {
50 | get
51 | {
52 | DataProcessor dataProcessor = Activator.CreateInstance(typeof(T)) as T;
53 | return dataProcessor.LanguageKeyword;
54 | }
55 | }
56 |
57 | public override string[] GetTypeStrings()
58 | {
59 | return new[]
60 | {
61 | "{0}[]"
62 | };
63 | }
64 |
65 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
66 | string value)
67 | {
68 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
69 | {
70 | binaryWriter.Write7BitEncodedInt32(0);
71 | return;
72 | }
73 |
74 | DataProcessor dataProcessor = new T();
75 | string[] splitValues;
76 | splitValues = value.Split(dataProcessor.IsSystem|| dataProcessor.IsEnum ? ',' : '|');
77 |
78 | binaryWriter.Write7BitEncodedInt32(splitValues.Length);
79 | foreach (var itemValue in splitValues)
80 | dataProcessor.WriteToStream(dataTableProcessor, binaryWriter, itemValue);
81 | }
82 | }
83 | }
84 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ArrayProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a4828a64729f470a88f77e35ecd58b67
3 | timeCreated: 1590549296
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.BoolProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class BoolProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "bool";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "bool",
25 | "boolean",
26 | "system.boolean"
27 | };
28 | }
29 |
30 | public override bool Parse(string value)
31 | {
32 | return bool.Parse(value);
33 | }
34 |
35 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
36 | string value)
37 | {
38 | binaryWriter.Write(Parse(value));
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.BoolProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 00bc8bc968fa2134095a36a43f326d56
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ByteProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class ByteProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "byte";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "byte",
25 | "system.byte"
26 | };
27 | }
28 |
29 | public override byte Parse(string value)
30 | {
31 | return byte.Parse(value);
32 | }
33 |
34 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
35 | string value)
36 | {
37 | binaryWriter.Write(Parse(value));
38 | }
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ByteProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 11199a40fe5a3ef49a3c3d1ae670ac97
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.CharProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class CharProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "char";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "char",
25 | "system.char"
26 | };
27 | }
28 |
29 | public override char Parse(string value)
30 | {
31 | return char.Parse(value);
32 | }
33 |
34 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
35 | string value)
36 | {
37 | binaryWriter.Write(Parse(value));
38 | }
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.CharProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 37f1181bc8fb29742b06ec3f42f652b4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.Color32Processor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 | using UnityEngine;
10 |
11 | namespace DE.Editor.DataTableTools
12 | {
13 | public sealed partial class DataTableProcessor
14 | {
15 | private sealed class Color32Processor : GenericDataProcessor
16 | {
17 | public override bool IsSystem => false;
18 |
19 | public override string LanguageKeyword => "Color32";
20 |
21 | public override string[] GetTypeStrings()
22 | {
23 | return new[]
24 | {
25 | "color32",
26 | "unityengine.color32"
27 | };
28 | }
29 |
30 | public override Color32 Parse(string value)
31 | {
32 | var splitedValue = value.Split(',');
33 | return new Color32(byte.Parse(splitedValue[0]), byte.Parse(splitedValue[1]),
34 | byte.Parse(splitedValue[2]), byte.Parse(splitedValue[3]));
35 | }
36 |
37 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
38 | string value)
39 | {
40 | var color32 = Parse(value);
41 | binaryWriter.Write(color32.r);
42 | binaryWriter.Write(color32.g);
43 | binaryWriter.Write(color32.b);
44 | binaryWriter.Write(color32.a);
45 | }
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.Color32Processor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2a9b916d7c8e446439b74c27340be473
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ColorProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 | using UnityEngine;
10 |
11 | namespace DE.Editor.DataTableTools
12 | {
13 | public sealed partial class DataTableProcessor
14 | {
15 | private sealed class ColorProcessor : GenericDataProcessor
16 | {
17 | public override bool IsSystem => false;
18 |
19 | public override string LanguageKeyword => "Color";
20 |
21 | public override string[] GetTypeStrings()
22 | {
23 | return new[]
24 | {
25 | "color",
26 | "unityengine.color"
27 | };
28 | }
29 |
30 | public override Color Parse(string value)
31 | {
32 | var splitedValue = value.Split(',');
33 | return new Color(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]),
34 | float.Parse(splitedValue[2]), float.Parse(splitedValue[3]));
35 | }
36 |
37 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
38 | string value)
39 | {
40 | var color = Parse(value);
41 | binaryWriter.Write(color.r);
42 | binaryWriter.Write(color.g);
43 | binaryWriter.Write(color.b);
44 | binaryWriter.Write(color.a);
45 | }
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ColorProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f4583af9902c99a4fad14d732796117e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.CommentProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System;
9 | using System.IO;
10 |
11 | namespace DE.Editor.DataTableTools
12 | {
13 | public sealed partial class DataTableProcessor
14 | {
15 | private sealed class CommentProcessor : DataProcessor
16 | {
17 | public override Type Type => null;
18 |
19 | public override bool IsId => false;
20 | public override bool IsEnum => false;
21 |
22 | public override bool IsComment => true;
23 |
24 | public override bool IsSystem => false;
25 |
26 | public override string LanguageKeyword => null;
27 |
28 | public override string[] GetTypeStrings()
29 | {
30 | return new[]
31 | {
32 | string.Empty,
33 | "#",
34 | "comment"
35 | };
36 | }
37 |
38 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
39 | string value)
40 | {
41 | }
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.CommentProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2ece238877c1e9344a50ce47697a93ef
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.DataProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System;
9 | using System.IO;
10 |
11 | namespace DE.Editor.DataTableTools
12 | {
13 | public sealed partial class DataTableProcessor
14 | {
15 | public abstract class DataProcessor
16 | {
17 | public abstract Type Type { get; }
18 |
19 | public abstract bool IsId { get; }
20 |
21 | public abstract bool IsComment { get; }
22 |
23 | public abstract bool IsSystem { get; }
24 | public abstract bool IsEnum { get; }
25 |
26 | public abstract string LanguageKeyword { get; }
27 |
28 | public abstract string[] GetTypeStrings();
29 |
30 | public abstract void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
31 | string value);
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.DataProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ccc7c992b5573ae4fafd0d5706bdad48
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.DataProcessorUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e7fb0bd2c9734a139f6ddc0250c07431
3 | timeCreated: 1590473178
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.DateTimeProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System;
9 | using System.IO;
10 |
11 | namespace DE.Editor.DataTableTools
12 | {
13 | public sealed partial class DataTableProcessor
14 | {
15 | private sealed class DateTimeProcessor : GenericDataProcessor
16 | {
17 | public override bool IsSystem => true;
18 |
19 | public override string LanguageKeyword => "DateTime";
20 |
21 | public override string[] GetTypeStrings()
22 | {
23 | return new[]
24 | {
25 | "datetime",
26 | "system.datetime"
27 | };
28 | }
29 |
30 | public override DateTime Parse(string value)
31 | {
32 | return DateTime.Parse(value);
33 | }
34 |
35 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
36 | string value)
37 | {
38 | binaryWriter.Write(Parse(value).Ticks);
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.DateTimeProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4223bbe977dd5244a8611c6aad7f693e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.DecimalProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class DecimalProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "decimal";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "decimal",
25 | "system.decimal"
26 | };
27 | }
28 |
29 | public override decimal Parse(string value)
30 | {
31 | return decimal.Parse(value);
32 | }
33 |
34 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
35 | string value)
36 | {
37 | binaryWriter.Write(Parse(value));
38 | }
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.DecimalProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ad6d6ba18487f7643830e156d300ee75
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.DictionaryProcessor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | namespace DE.Editor.DataTableTools
6 | {
7 | public sealed partial class DataTableProcessor
8 | {
9 | private sealed class DictionaryProcessor : DataProcessor, IDictionaryProcessor
10 | where T1 : GenericDataProcessor, new()
11 | where T2 : GenericDataProcessor, new()
12 | {
13 | public override Type Type
14 | {
15 | get
16 | {
17 | var t1 = new T1();
18 | var t2 = new T2();
19 | var type = typeof(Dictionary<,>);
20 | type = type.MakeGenericType(t1.Type, t2.Type);
21 | return type;
22 | }
23 | }
24 | public override bool IsEnum => false;
25 |
26 | public override bool IsId => false;
27 |
28 | public override bool IsComment => false;
29 |
30 | public override bool IsSystem => false;
31 |
32 | public override string LanguageKeyword
33 | {
34 | get
35 | {
36 | var t1 = new T1();
37 | var t2 = new T2();
38 | return $"Dictionary<{t1.LanguageKeyword},{t2.LanguageKeyword}>";
39 | }
40 | }
41 |
42 | public Type KeyType
43 | {
44 | get
45 | {
46 | var t1 = new T1();
47 | return t1.Type;
48 | }
49 | }
50 |
51 | public Type ValueType
52 | {
53 | get
54 | {
55 | var t2 = new T2();
56 | return t2.Type;
57 | }
58 | }
59 |
60 | public string KeyLanguageKeyword
61 | {
62 | get
63 | {
64 | var t2 = new T2();
65 | return t2.LanguageKeyword;
66 | }
67 | }
68 |
69 | public string ValueLanguageKeyword
70 | {
71 | get
72 | {
73 | var t2 = new T2();
74 | return t2.LanguageKeyword;
75 | }
76 | }
77 |
78 | public override string[] GetTypeStrings()
79 | {
80 | return new[]
81 | {
82 | "Dictionary<{0},{1}>",
83 | "System.Collections.Generic.Dictionary<{0},{1}>"
84 | };
85 | }
86 |
87 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
88 | string value)
89 | {
90 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
91 | {
92 | binaryWriter.Write7BitEncodedInt32(0);
93 | return;
94 | }
95 |
96 | DataProcessor dataProcessor1 = new T1();
97 | DataProcessor dataProcessor2 = new T2();
98 | var splitValues = value.Split('|');
99 | binaryWriter.Write7BitEncodedInt32(splitValues.Length);
100 | foreach (var itemValue in splitValues)
101 | {
102 | var keyValue = itemValue.Split('#');
103 | dataProcessor1.WriteToStream(dataTableProcessor, binaryWriter, keyValue[0].Substring(1));
104 | dataProcessor2.WriteToStream(dataTableProcessor, binaryWriter,
105 | keyValue[1].Substring(0, keyValue[1].Length - 1));
106 | }
107 | }
108 | }
109 | }
110 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.DictionaryProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9e4a88d470ae4735b5d7e1b1297103d4
3 | timeCreated: 1590854508
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.DoubleProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class DoubleProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "double";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "double",
25 | "system.double"
26 | };
27 | }
28 |
29 | public override double Parse(string value)
30 | {
31 | return double.Parse(value);
32 | }
33 |
34 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
35 | string value)
36 | {
37 | binaryWriter.Write(Parse(value));
38 | }
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.DoubleProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 44293fe0c3e108248bc98e8674238aed
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.EnumProcessor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace DE.Editor.DataTableTools
5 | {
6 | public sealed partial class DataTableProcessor
7 | {
8 | private sealed class EnumProcessor : GenericDataProcessor
9 | where T : struct, IConvertible
10 | {
11 | static EnumProcessor()
12 | {
13 | if (!typeof(T).IsEnum)
14 | {
15 | throw new ArgumentException("T must be an enumerated type");
16 | }
17 | }
18 |
19 | public Type EnumType => typeof(T);
20 | public override bool IsSystem => false;
21 | public override bool IsEnum => true;
22 | public string NameSpace => EnumType.Namespace;
23 | public override string LanguageKeyword => EnumType.FullName;
24 |
25 | public override string[] GetTypeStrings()
26 | {
27 | if (string.IsNullOrEmpty(EnumType.FullName) || EnumType.FullName == EnumType.Name)
28 | {
29 | return new[] {EnumType.Name.ToLower()};
30 | }
31 | else
32 | {
33 | return new[]
34 | {
35 | //EnumType.Name.ToLower(),
36 | EnumType.FullName.ToLower()
37 | };
38 | }
39 | }
40 |
41 | public override int Parse(string value)
42 | {
43 | bool isInt = int.TryParse(value, out int v);
44 | if (isInt)
45 | {
46 | return int.Parse(value);
47 | }
48 |
49 | bool isString = EnumParse(value, out T v1);
50 | if (isString)
51 | {
52 | return v1.ToInt32(null);
53 | }
54 |
55 | throw new Exception($"Value:{value} is not {typeof(T)}!");
56 | }
57 |
58 |
59 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
60 | string value)
61 | {
62 | binaryWriter.Write7BitEncodedInt32(Parse(value));
63 | }
64 |
65 | public static bool EnumParse(string value,out TE defaultValue) where TE : struct, IConvertible
66 | {
67 | if (!typeof(TE).IsEnum) throw new ArgumentException("T must be an enumerated type");
68 | if (string.IsNullOrEmpty(value))
69 | {
70 | defaultValue = default;
71 | return false;
72 | }
73 | foreach (TE item in Enum.GetValues(typeof(TE)))
74 | {
75 | if (!item.ToString().ToLowerInvariant().Equals(value.Trim().ToLowerInvariant())) continue;
76 | defaultValue = item;
77 | return true;
78 | }
79 |
80 | defaultValue = default;
81 | return false;
82 | }
83 | }
84 | }
85 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.EnumProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 822eb281891645d5bd0d831f8d9f5d02
3 | timeCreated: 1601029194
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.FloatProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class FloatProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "float";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "float",
25 | "single",
26 | "system.single"
27 | };
28 | }
29 |
30 | public override float Parse(string value)
31 | {
32 | return float.Parse(value);
33 | }
34 |
35 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
36 | string value)
37 | {
38 | binaryWriter.Write(Parse(value));
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.FloatProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4c1502c70e1294543b14df45c7841a73
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.GenericDataProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | public abstract class GenericDataProcessor : DataProcessor
15 | {
16 | public override Type Type => typeof(T);
17 |
18 | public override bool IsId => false;
19 |
20 | public override bool IsComment => false;
21 | public override bool IsEnum => false;
22 |
23 | public abstract T Parse(string value);
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.GenericDataProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 65dd2cb98d350654fb3df2ddfc4fa4b8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ICollectionProcessor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace DE.Editor.DataTableTools
4 | {
5 | public sealed partial class DataTableProcessor
6 | {
7 | public interface ICollectionProcessor
8 | {
9 | Type ItemType { get; }
10 |
11 | string ItemLanguageKeyword { get; }
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ICollectionProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 53b6824100304aaaa662e13157deba9a
3 | timeCreated: 1590756403
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.IDictionaryProcessor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace DE.Editor.DataTableTools
4 | {
5 | public sealed partial class DataTableProcessor
6 | {
7 | public interface IDictionaryProcessor
8 | {
9 | Type KeyType { get; }
10 | Type ValueType { get; }
11 | string KeyLanguageKeyword { get; }
12 | string ValueLanguageKeyword { get; }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.IDictionaryProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6480892060ec40e9b9110db067f6448f
3 | timeCreated: 1590858800
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.IdProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System;
9 | using System.IO;
10 |
11 | namespace DE.Editor.DataTableTools
12 | {
13 | public sealed partial class DataTableProcessor
14 | {
15 | private sealed class IdProcessor : DataProcessor
16 | {
17 | public override Type Type => typeof(int);
18 |
19 | public override bool IsId => true;
20 | public override bool IsEnum => false;
21 |
22 | public override bool IsComment => false;
23 |
24 | public override bool IsSystem => false;
25 |
26 | public override string LanguageKeyword => "int";
27 |
28 | public override string[] GetTypeStrings()
29 | {
30 | return new[]
31 | {
32 | "id"
33 | };
34 | }
35 |
36 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
37 | string value)
38 | {
39 | binaryWriter.Write7BitEncodedInt32(int.Parse(value));
40 | }
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.IdProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f4171c2dabb4ee9468f7297ab334ddf1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.IntProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class IntProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "int";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "int",
25 | "int32",
26 | "system.int32"
27 | };
28 | }
29 |
30 | public override int Parse(string value)
31 | {
32 | return int.Parse(value);
33 | }
34 |
35 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
36 | string value)
37 | {
38 | binaryWriter.Write7BitEncodedInt32(Parse(value));
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.IntProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 239560231c239b54f95c183913ec9cbf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ListProcessor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | namespace DE.Editor.DataTableTools
6 | {
7 | public sealed partial class DataTableProcessor
8 | {
9 | private sealed class ListProcessor : DataProcessor, ICollectionProcessor
10 | where T : GenericDataProcessor, new()
11 | {
12 | public override bool IsComment => false;
13 |
14 | public override bool IsSystem => false;
15 | public override bool IsEnum => false;
16 |
17 | public override Type Type
18 | {
19 | get
20 | {
21 | var t = new T();
22 | var type = typeof(List<>);
23 | type = type.MakeGenericType(t.Type);
24 | return type;
25 | }
26 | }
27 |
28 | public override bool IsId => false;
29 |
30 | public override string LanguageKeyword
31 | {
32 | get
33 | {
34 | var t = new T();
35 | return $"List<{t.LanguageKeyword}>";
36 | }
37 | }
38 |
39 | public Type ItemType
40 | {
41 | get
42 | {
43 | var t = new T();
44 | return t.Type;
45 | }
46 | }
47 |
48 | public string ItemLanguageKeyword
49 | {
50 | get
51 | {
52 | var t = new T();
53 | return t.LanguageKeyword;
54 | }
55 | }
56 |
57 | public override string[] GetTypeStrings()
58 | {
59 | return new[]
60 | {
61 | "List<{0}>",
62 | "System.Collections.Generic.List<{0}>"
63 | };
64 | }
65 |
66 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
67 | string value)
68 | {
69 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
70 | {
71 | binaryWriter.Write7BitEncodedInt32(0);
72 | return;
73 | }
74 |
75 | DataProcessor dataProcessor = new T();
76 | string[] splitValues;
77 | splitValues = value.Split(dataProcessor.IsSystem|| dataProcessor.IsEnum ? ',' : '|');
78 | binaryWriter.Write7BitEncodedInt32(splitValues.Length);
79 | foreach (var itemValue in splitValues)
80 | dataProcessor.WriteToStream(dataTableProcessor, binaryWriter, itemValue);
81 | }
82 | }
83 | }
84 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ListProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: edd450a14544407ab126368ea1db7035
3 | timeCreated: 1590467890
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.LongProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class LongProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "long";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "long",
25 | "int64",
26 | "system.int64"
27 | };
28 | }
29 |
30 | public override long Parse(string value)
31 | {
32 | return long.Parse(value);
33 | }
34 |
35 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
36 | string value)
37 | {
38 | binaryWriter.Write7BitEncodedInt64(Parse(value));
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.LongProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d6dadc699adc6744e898979b1e85d6cf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.QuaternionProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 | using UnityEngine;
10 |
11 | namespace DE.Editor.DataTableTools
12 | {
13 | public sealed partial class DataTableProcessor
14 | {
15 | private sealed class QuaternionProcessor : GenericDataProcessor
16 | {
17 | public override bool IsSystem => false;
18 |
19 | public override string LanguageKeyword => "Quaternion";
20 |
21 | public override string[] GetTypeStrings()
22 | {
23 | return new[]
24 | {
25 | "quaternion",
26 | "unityengine.quaternion"
27 | };
28 | }
29 |
30 | public override Quaternion Parse(string value)
31 | {
32 | var splitedValue = value.Split(',');
33 | return new Quaternion(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]),
34 | float.Parse(splitedValue[2]), float.Parse(splitedValue[3]));
35 | }
36 |
37 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
38 | string value)
39 | {
40 | var quaternion = Parse(value);
41 | binaryWriter.Write(quaternion.x);
42 | binaryWriter.Write(quaternion.y);
43 | binaryWriter.Write(quaternion.z);
44 | binaryWriter.Write(quaternion.w);
45 | }
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.QuaternionProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c288505f764c21149b9986dd3ebff1ac
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.RectProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 | using UnityEngine;
10 |
11 | namespace DE.Editor.DataTableTools
12 | {
13 | public sealed partial class DataTableProcessor
14 | {
15 | private sealed class RectProcessor : GenericDataProcessor
16 | {
17 | public override bool IsSystem => false;
18 |
19 | public override string LanguageKeyword => "Rect";
20 |
21 | public override string[] GetTypeStrings()
22 | {
23 | return new[]
24 | {
25 | "rect",
26 | "unityengine.rect"
27 | };
28 | }
29 |
30 | public override Rect Parse(string value)
31 | {
32 | var splitedValue = value.Split(',');
33 | return new Rect(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]),
34 | float.Parse(splitedValue[2]), float.Parse(splitedValue[3]));
35 | }
36 |
37 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
38 | string value)
39 | {
40 | var rect = Parse(value);
41 | binaryWriter.Write(rect.x);
42 | binaryWriter.Write(rect.y);
43 | binaryWriter.Write(rect.width);
44 | binaryWriter.Write(rect.height);
45 | }
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.RectProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 235589b35d4744a4d8ef100da517e0ce
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.SByteProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class SByteProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "sbyte";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "sbyte",
25 | "system.sbyte"
26 | };
27 | }
28 |
29 | public override sbyte Parse(string value)
30 | {
31 | return sbyte.Parse(value);
32 | }
33 |
34 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
35 | string value)
36 | {
37 | binaryWriter.Write(Parse(value));
38 | }
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.SByteProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 49f8d16f80f1ec046bfcae38be8c96a7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ShortProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class ShortProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "short";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "short",
25 | "int16",
26 | "system.int16"
27 | };
28 | }
29 |
30 | public override short Parse(string value)
31 | {
32 | return short.Parse(value);
33 | }
34 |
35 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
36 | string value)
37 | {
38 | binaryWriter.Write(Parse(value));
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ShortProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c1e3b1767ca81c343a31324956e5f032
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.StringProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class StringProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "string";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "string",
25 | "system.string"
26 | };
27 | }
28 |
29 | public override string Parse(string value)
30 | {
31 | return value;
32 | }
33 |
34 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
35 | string value)
36 | {
37 | binaryWriter.Write(Parse(value));
38 | }
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.StringProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d502b9a1939b46246bd8e4c107b77744
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.UIntProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class UIntProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "uint";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "uint",
25 | "uint32",
26 | "system.uint32"
27 | };
28 | }
29 |
30 | public override uint Parse(string value)
31 | {
32 | return uint.Parse(value);
33 | }
34 |
35 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
36 | string value)
37 | {
38 | binaryWriter.Write7BitEncodedUInt32(Parse(value));
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.UIntProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fd3c289549d93924ea928ea558436a57
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ULongProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class ULongProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "ulong";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "ulong",
25 | "uint64",
26 | "system.uint64"
27 | };
28 | }
29 |
30 | public override ulong Parse(string value)
31 | {
32 | return ulong.Parse(value);
33 | }
34 |
35 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
36 | string value)
37 | {
38 | binaryWriter.Write7BitEncodedUInt64(Parse(value));
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.ULongProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 23d841306167268488c7c5a8bb8cf685
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.UShortProcessor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 |
10 | namespace DE.Editor.DataTableTools
11 | {
12 | public sealed partial class DataTableProcessor
13 | {
14 | private sealed class UShortProcessor : GenericDataProcessor
15 | {
16 | public override bool IsSystem => true;
17 |
18 | public override string LanguageKeyword => "ushort";
19 |
20 | public override string[] GetTypeStrings()
21 | {
22 | return new[]
23 | {
24 | "ushort",
25 | "uint16",
26 | "system.uint16"
27 | };
28 | }
29 |
30 | public override ushort Parse(string value)
31 | {
32 | return ushort.Parse(value);
33 | }
34 |
35 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
36 | string value)
37 | {
38 | binaryWriter.Write(Parse(value));
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.UShortProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 20f758534f1981b4593f97deb2a5ae25
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.Vector2Processor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 | using UnityEngine;
10 |
11 | namespace DE.Editor.DataTableTools
12 | {
13 | public sealed partial class DataTableProcessor
14 | {
15 | private sealed class Vector2Processor : GenericDataProcessor
16 | {
17 | public override bool IsSystem => false;
18 |
19 | public override string LanguageKeyword => "Vector2";
20 |
21 | public override string[] GetTypeStrings()
22 | {
23 | return new[]
24 | {
25 | "vector2",
26 | "unityengine.vector2"
27 | };
28 | }
29 |
30 | public override Vector2 Parse(string value)
31 | {
32 | var splitedValue = value.Split(',');
33 | return new Vector2(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]));
34 | }
35 |
36 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
37 | string value)
38 | {
39 | var vector2 = Parse(value);
40 | binaryWriter.Write(vector2.x);
41 | binaryWriter.Write(vector2.y);
42 | }
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.Vector2Processor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 165df2a7d4a52984282f1c3bc87d5aaa
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.Vector3Processor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 | using UnityEngine;
10 |
11 | namespace DE.Editor.DataTableTools
12 | {
13 | public sealed partial class DataTableProcessor
14 | {
15 | private sealed class Vector3Processor : GenericDataProcessor
16 | {
17 | public override bool IsSystem => false;
18 |
19 | public override string LanguageKeyword => "Vector3";
20 |
21 | public override string[] GetTypeStrings()
22 | {
23 | return new[]
24 | {
25 | "vector3",
26 | "unityengine.vector3"
27 | };
28 | }
29 |
30 | public override Vector3 Parse(string value)
31 | {
32 | var splitedValue = value.Split(',');
33 | return new Vector3(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]),
34 | float.Parse(splitedValue[2]));
35 | }
36 |
37 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
38 | string value)
39 | {
40 | var vector3 = Parse(value);
41 | binaryWriter.Write(vector3.x);
42 | binaryWriter.Write(vector3.y);
43 | binaryWriter.Write(vector3.z);
44 | }
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.Vector3Processor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d45ef71d28b25f047ab0f4d4acac8b42
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.Vector4Processor.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // Game Framework
3 | // Copyright © 2013-2020 Jiang Yin. All rights reserved.
4 | // Homepage: https://gameframework.cn/
5 | // Feedback: mailto:ellan@gameframework.cn
6 | //------------------------------------------------------------
7 |
8 | using System.IO;
9 | using UnityEngine;
10 |
11 | namespace DE.Editor.DataTableTools
12 | {
13 | public sealed partial class DataTableProcessor
14 | {
15 | private sealed class Vector4Processor : GenericDataProcessor
16 | {
17 | public override bool IsSystem => false;
18 |
19 | public override string LanguageKeyword => "Vector4";
20 |
21 | public override string[] GetTypeStrings()
22 | {
23 | return new[]
24 | {
25 | "vector4",
26 | "unityengine.vector4"
27 | };
28 | }
29 |
30 | public override Vector4 Parse(string value)
31 | {
32 | var splitedValue = value.Split(',');
33 | return new Vector4(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]),
34 | float.Parse(splitedValue[2]), float.Parse(splitedValue[3]));
35 | }
36 |
37 | public override void WriteToStream(DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter,
38 | string value)
39 | {
40 | var vector4 = Parse(value);
41 | binaryWriter.Write(vector4.x);
42 | binaryWriter.Write(vector4.y);
43 | binaryWriter.Write(vector4.z);
44 | binaryWriter.Write(vector4.w);
45 | }
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.Vector4Processor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 40409bde40a898b48af91126d343c4ae
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/DataTableGenerator/DataTableProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 81b27209918096743b988ea62b39d109
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5f231aa40f034894fa714545882f8dfe
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/DataTableConfig.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Linq;
3 | using GameFramework;
4 | using UnityEngine;
5 |
6 | namespace DE.Editor
7 | {
8 | ///
9 | /// 数据表配置类
10 | ///
11 | public class DataTableConfig
12 | {
13 | ///
14 | /// 数据表存放文件夹路径
15 | ///
16 | public const string DataTableFolderPath = "Assets/Res/DataTables";
17 |
18 | public static readonly string ExcelsFolder = $"{Application.dataPath}/../Excels/";
19 |
20 | ///
21 | /// 数据表C#实体类生成文件夹路径
22 | ///
23 | public const string CSharpCodePath = "Assets/Scripts/DataTableExtensions/Runtime/DataTable";
24 | ///
25 | /// 数据表C#实体类模板存放路径
26 | ///
27 | public const string CSharpCodeTemplateFileName = "Assets/Res/Configs/DataTableCodeTemplate.txt";
28 | ///
29 | /// 数据表扩展类文件夹路径
30 | ///
31 | public static readonly string ExtensionDirectoryPath = "Assets/Scripts/DataTableExtensions/Runtime/Extensions";
32 | ///
33 | /// 数据表命名空间
34 | ///
35 | public const string NameSpace = "DE";
36 | ///
37 | /// 数据表中使用类型 所在的所有程序集
38 | ///
39 | public static readonly string[] AssemblyNames =
40 | {
41 | #if UNITY_2017_3_OR_NEWER
42 | //asmdef
43 | "Test",
44 | #endif
45 | "Assembly-CSharp"
46 | };
47 | ///
48 | /// 编辑器中使用到的程序集
49 | ///
50 | public static readonly string[] EditorAssemblyNames =
51 | {
52 | #if UNITY_2017_3_OR_NEWER
53 | "UnityGameFramework.Editor",
54 | "DE.Editor",
55 | #endif
56 | "Assembly-CSharp-Editor"
57 | };
58 | ///
59 | /// 数据表文件路径
60 | ///
61 | public static readonly string[] DataTablePaths;
62 | ///
63 | /// 数据表文件名
64 | ///
65 | public static readonly string[] DataTableNames;
66 | static DataTableConfig()
67 | {
68 | var folder = new DirectoryInfo(DataTableFolderPath);
69 | DataTablePaths = folder.GetFiles("*.txt").Select(_ => Utility.Path.GetRegularPath(_.FullName))
70 | .ToArray();
71 | DataTableNames = folder.GetFiles("*.txt").Select(file => Path.GetFileNameWithoutExtension(file.Name))
72 | .ToArray();
73 | }
74 | }
75 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/DataTableConfig.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: edb8658b22e341fcb2c637ac7b9586b0
3 | timeCreated: 1623850750
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/DataTableProcessorExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Linq;
4 | using GameFramework;
5 | using JetBrains.Annotations;
6 |
7 | namespace DE.Editor
8 | {
9 | public static class DataTableProcessorExtensions
10 | {
11 |
12 |
13 | ///
14 | /// 判断指定的类型 是否是指定泛型类型的子类型,或实现了指定泛型接口。
15 | ///
16 | /// 需要测试的类型。
17 | /// 泛型接口类型,传入 typeof(IXxx<>)
18 | /// 如果是泛型接口的子类型,则返回 true,否则返回 false。
19 | public static bool HasImplementedRawGeneric([NotNull] this Type type, [NotNull] Type generic)
20 | {
21 | if (type == null) throw new ArgumentNullException(nameof(type));
22 | if (generic == null) throw new ArgumentNullException(nameof(generic));
23 |
24 | // 测试接口。
25 | var isTheRawGenericType = type.GetInterfaces().Any(IsTheRawGenericType);
26 | if (isTheRawGenericType) return true;
27 |
28 | // 测试类型。
29 | while (type != null && type != typeof(object))
30 | {
31 | isTheRawGenericType = IsTheRawGenericType(type);
32 | if (isTheRawGenericType) return true;
33 | type = type.BaseType;
34 | }
35 |
36 | // 没有找到任何匹配的接口或类型。
37 | return false;
38 |
39 | // 测试某个类型是否是指定的原始接口。
40 | bool IsTheRawGenericType(Type test)
41 | {
42 | return generic == (test.IsGenericType ? test.GetGenericTypeDefinition() : test);
43 | }
44 | }
45 |
46 |
47 | public static string GetFullNameWithNotDot(Type type)
48 | {
49 | return type.FullName?.Replace(".","");
50 | }
51 | public static string GetFullNameWithNotDot(string fullName)
52 | {
53 | return fullName?.Replace(".","");
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/DataTableProcessorExtensions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: da8b0f3b9e744d0eb9f15a0338b1cc75
3 | timeCreated: 1618299184
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/ExcelExtension.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // ExcelToTxt
3 | // Copyright Xu wei
4 | //------------------------------------------------------------
5 |
6 | using System.IO;
7 | using System.Collections;
8 | using System.Collections.Generic;
9 | using System.Text;
10 | using System.Text.RegularExpressions;
11 | using DE.Editor.DataTableTools;
12 | using UnityEngine;
13 | using NPOI.SS.UserModel;
14 | using NPOI.XSSF.UserModel;
15 | using UnityEditor;
16 | using UnityGameFramework.Runtime;
17 |
18 | namespace DE.Editor
19 | {
20 | public static class ExcelExtension
21 | {
22 | private static readonly Regex NameRegex = new Regex(@"^[A-Z][A-Za-z0-9_]*$");
23 |
24 | [MenuItem("DataTable/ExcelToTxt",priority = 13)]
25 | public static void ExcelToTxt()
26 | {
27 | if (!Directory.Exists(DataTableConfig.ExcelsFolder))
28 | {
29 | Debug.LogError($"{DataTableConfig.ExcelsFolder} is not exist!");
30 | return;
31 | }
32 |
33 | string[] excelFiles = Directory.GetFiles(DataTableConfig.ExcelsFolder);
34 | foreach (var excelFile in excelFiles)
35 | {
36 | if (!excelFile.EndsWith(".xlsx") || excelFile.Contains("~$"))
37 | continue;
38 | FileStream fileStream = new FileStream(excelFile, FileMode.Open, FileAccess.Read,FileShare.ReadWrite);
39 | IWorkbook workbook = new XSSFWorkbook(fileStream);
40 | for (int s = 0; s < workbook.NumberOfSheets; s++)
41 | {
42 | ISheet sheet = workbook.GetSheetAt(s);
43 | if (sheet.LastRowNum < 1)
44 | continue;
45 | string fileName = sheet.SheetName;
46 | if (string.IsNullOrWhiteSpace(fileName))
47 | {
48 | Debug.LogErrorFormat("{0} has not datable name!", fileName);
49 | continue;
50 | }
51 |
52 | if (!NameRegex.IsMatch(fileName))
53 | {
54 | Debug.LogErrorFormat("{0} has wrong datable name!", fileName);
55 | continue;
56 | }
57 |
58 | string fileFullPath = $"{DataTableConfig.DataTableFolderPath}/{fileName}.txt";
59 | if (File.Exists(fileFullPath))
60 | {
61 | File.Delete(fileFullPath);
62 | }
63 |
64 | List sContents = new List();
65 | StringBuilder sb = new StringBuilder();
66 | if (sheet.LastRowNum < 3)
67 | {
68 | Debug.LogErrorFormat("{0} has wrong row num!", fileFullPath);
69 | continue;
70 | }
71 |
72 | IRow row1 = sheet.GetRow(1);
73 | int columnCount = 1;
74 | for (int i = 0; i < row1.Cells.Count; i++)
75 | {
76 | if (string.IsNullOrWhiteSpace(row1.Cells[i].ToString()))
77 | continue;
78 | columnCount++;
79 | }
80 |
81 | for (int i = 0; i <= sheet.LastRowNum + 1; i++)
82 | {
83 | sb.Clear();
84 | IRow row = sheet.GetRow(i);
85 | if (row == null || row.Cells == null)
86 | {
87 | continue;
88 | }
89 |
90 | bool needContinue = true;
91 | foreach (var cell in row.Cells)
92 | {
93 | if (cell != null && !string.IsNullOrWhiteSpace(cell.ToString()))
94 | needContinue = false;
95 | }
96 |
97 | if (needContinue)
98 | {
99 | continue;
100 | }
101 |
102 | int ci = 0;
103 | for (int j = 0; j < columnCount; j++)
104 | {
105 | if (ci >= row.Cells.Count)
106 | {
107 | sb.Append("");
108 | }
109 | else
110 | {
111 | ICell cell = row.Cells[ci];
112 | if (cell.ColumnIndex > j)
113 | {
114 | sb.Append("");
115 | }
116 | else
117 | {
118 | sb.Append(cell);
119 | ci++;
120 | }
121 | }
122 |
123 | if (j != columnCount - 1)
124 | {
125 | sb.Append('\t');
126 | }
127 | }
128 |
129 | sContents.Add(sb.ToString());
130 | }
131 |
132 | File.WriteAllLines(fileFullPath, sContents, Encoding.UTF8);
133 | Debug.LogFormat("更新Excel表格:{0}", fileFullPath);
134 | }
135 | }
136 |
137 | AssetDatabase.Refresh();
138 | ExtensionsGenerate.GenerateExtensionByAnalysis();
139 | }
140 |
141 | [MenuItem("DataTable/ExcelToBytes",priority = 13)]
142 | public static void ExcelToBytes()
143 | {
144 | ExcelToTxt();
145 | DataTableGeneratorMenu.GenerateDataTables();
146 | AssetDatabase.Refresh();
147 | }
148 | }
149 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/ExcelExtension.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a91955a9786f42f4ca407735b67d3814
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/ExtensionsGenerate.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 111bbdeb0f844f91838d6a5bb11be040
3 | timeCreated: 1590568676
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/PermutationAndCombination.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace DE.Editor
4 | {
5 | public class PermutationAndCombination
6 | {
7 | ///
8 | /// 交换两个变量
9 | ///
10 | /// 变量1
11 | /// 变量2
12 | public static void Swap(ref T a, ref T b)
13 | {
14 | var temp = a;
15 | a = b;
16 | b = temp;
17 | }
18 |
19 | ///
20 | /// 递归算法求数组的组合(私有成员)
21 | ///
22 | /// 返回的范型
23 | /// 所求数组
24 | /// 辅助变量
25 | /// 辅助变量
26 | /// 辅助数组
27 | /// 辅助变量M
28 | private static void GetCombination(ref List list, T[] t, int n, int m, int[] b, int M)
29 | {
30 | for (var i = n; i >= m; i--)
31 | {
32 | b[m - 1] = i - 1;
33 | if (m > 1)
34 | {
35 | GetCombination(ref list, t, i - 1, m - 1, b, M);
36 | }
37 | else
38 | {
39 | if (list == null) list = new List();
40 | var temp = new T[M];
41 | for (var j = 0; j < b.Length; j++) temp[j] = t[b[j]];
42 | list.Add(temp);
43 | }
44 | }
45 | }
46 |
47 | ///
48 | /// 递归算法求排列(私有成员)
49 | ///
50 | /// 返回的列表
51 | /// 所求数组
52 | /// 起始标号
53 | /// 结束标号
54 | private static void GetPermutation(ref List list, T[] t, int startIndex, int endIndex)
55 | {
56 | if (startIndex == endIndex)
57 | {
58 | if (list == null) list = new List();
59 | var temp = new T[t.Length];
60 | t.CopyTo(temp, 0);
61 | list.Add(temp);
62 | }
63 | else
64 | {
65 | for (var i = startIndex; i <= endIndex; i++)
66 | {
67 | Swap(ref t[startIndex], ref t[i]);
68 | GetPermutation(ref list, t, startIndex + 1, endIndex);
69 | Swap(ref t[startIndex], ref t[i]);
70 | }
71 | }
72 | }
73 |
74 | ///
75 | /// 求从起始标号到结束标号的排列,其余元素不变
76 | ///
77 | /// 所求数组
78 | /// 起始标号
79 | /// 结束标号
80 | /// 从起始标号到结束标号排列的范型
81 | public static List GetPermutation(T[] t, int startIndex, int endIndex)
82 | {
83 | if (startIndex < 0 || endIndex > t.Length - 1) return null;
84 | var list = new List();
85 | GetPermutation(ref list, t, startIndex, endIndex);
86 | return list;
87 | }
88 |
89 | ///
90 | /// 返回数组所有元素的全排列
91 | ///
92 | /// 所求数组
93 | /// 全排列的范型
94 | public static List GetPermutation(T[] t)
95 | {
96 | return GetPermutation(t, 0, t.Length - 1);
97 | }
98 |
99 | ///
100 | /// 求数组中n个元素的排列
101 | ///
102 | /// 所求数组
103 | /// 元素个数
104 | /// 数组中n个元素的排列
105 | public static List GetPermutation(T[] t, int n)
106 | {
107 | if (n > t.Length) return null;
108 | var list = new List();
109 | var c = GetCombination(t, n);
110 | for (var i = 0; i < c.Count; i++)
111 | {
112 | var l = new List();
113 | GetPermutation(ref l, c[i], 0, n - 1);
114 | list.AddRange(l);
115 | }
116 |
117 | return list;
118 | }
119 |
120 | ///
121 | /// 求数组中n个元素的组合
122 | ///
123 | /// 所求数组
124 | /// 元素个数
125 | /// 数组中n个元素的组合的范型
126 | public static List GetCombination(T[] t, int n)
127 | {
128 | if (t.Length < n) return null;
129 | var temp = new int[n];
130 | var list = new List();
131 | GetCombination(ref list, t, t.Length, n, temp, n);
132 | return list;
133 | }
134 | }
135 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/PermutationAndCombination.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6927a5047fc94aff881ee32ef35cb308
3 | timeCreated: 1590856527
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/UnityInternalBridge.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 66965c12c77d4eb798f07ffa8f63dc51
3 | timeCreated: 1625669370
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/UnityInternalBridge/ReorderableList.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ac1625b1a77c4100af0ad7dce3929ca2
3 | timeCreated: 1625666929
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/UnityInternalBridge/Unity.InternalAPIEngineBridge.006.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Unity.InternalAPIEngineBridge.006"
3 | }
4 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/Extensions/UnityInternalBridge/Unity.InternalAPIEngineBridge.006.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fb5e63ff1afc8f84994de25a00489fbc
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cf1762b0310d2a844a1ea59a0808ac1e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction, and
10 | distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by the copyright
13 | owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all other entities
16 | that control, are controlled by, or are under common control with that entity.
17 | For the purposes of this definition, "control" means (i) the power, direct or
18 | indirect, to cause the direction or management of such entity, whether by
19 | contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20 | outstanding shares, or (iii) beneficial ownership of such entity.
21 |
22 | "You" (or "Your") shall mean an individual or Legal Entity exercising
23 | permissions granted by this License.
24 |
25 | "Source" form shall mean the preferred form for making modifications, including
26 | but not limited to software source code, documentation source, and configuration
27 | files.
28 |
29 | "Object" form shall mean any form resulting from mechanical transformation or
30 | translation of a Source form, including but not limited to compiled object code,
31 | generated documentation, and conversions to other media types.
32 |
33 | "Work" shall mean the work of authorship, whether in Source or Object form, made
34 | available under the License, as indicated by a copyright notice that is included
35 | in or attached to the work (an example is provided in the Appendix below).
36 |
37 | "Derivative Works" shall mean any work, whether in Source or Object form, that
38 | is based on (or derived from) the Work and for which the editorial revisions,
39 | annotations, elaborations, or other modifications represent, as a whole, an
40 | original work of authorship. For the purposes of this License, Derivative Works
41 | shall not include works that remain separable from, or merely link (or bind by
42 | name) to the interfaces of, the Work and Derivative Works thereof.
43 |
44 | "Contribution" shall mean any work of authorship, including the original version
45 | of the Work and any modifications or additions to that Work or Derivative Works
46 | thereof, that is intentionally submitted to Licensor for inclusion in the Work
47 | by the copyright owner or by an individual or Legal Entity authorized to submit
48 | on behalf of the copyright owner. For the purposes of this definition,
49 | "submitted" means any form of electronic, verbal, or written communication sent
50 | to the Licensor or its representatives, including but not limited to
51 | communication on electronic mailing lists, source code control systems, and
52 | issue tracking systems that are managed by, or on behalf of, the Licensor for
53 | the purpose of discussing and improving the Work, but excluding communication
54 | that is conspicuously marked or otherwise designated in writing by the copyright
55 | owner as "Not a Contribution."
56 |
57 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
58 | of whom a Contribution has been received by Licensor and subsequently
59 | incorporated within the Work.
60 |
61 | 2. Grant of Copyright License.
62 |
63 | Subject to the terms and conditions of this License, each Contributor hereby
64 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
65 | irrevocable copyright license to reproduce, prepare Derivative Works of,
66 | publicly display, publicly perform, sublicense, and distribute the Work and such
67 | Derivative Works in Source or Object form.
68 |
69 | 3. Grant of Patent License.
70 |
71 | Subject to the terms and conditions of this License, each Contributor hereby
72 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
73 | irrevocable (except as stated in this section) patent license to make, have
74 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where
75 | such license applies only to those patent claims licensable by such Contributor
76 | that are necessarily infringed by their Contribution(s) alone or by combination
77 | of their Contribution(s) with the Work to which such Contribution(s) was
78 | submitted. If You institute patent litigation against any entity (including a
79 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a
80 | Contribution incorporated within the Work constitutes direct or contributory
81 | patent infringement, then any patent licenses granted to You under this License
82 | for that Work shall terminate as of the date such litigation is filed.
83 |
84 | 4. Redistribution.
85 |
86 | You may reproduce and distribute copies of the Work or Derivative Works thereof
87 | in any medium, with or without modifications, and in Source or Object form,
88 | provided that You meet the following conditions:
89 |
90 | You must give any other recipients of the Work or Derivative Works a copy of
91 | this License; and
92 | You must cause any modified files to carry prominent notices stating that You
93 | changed the files; and
94 | You must retain, in the Source form of any Derivative Works that You distribute,
95 | all copyright, patent, trademark, and attribution notices from the Source form
96 | of the Work, excluding those notices that do not pertain to any part of the
97 | Derivative Works; and
98 | If the Work includes a "NOTICE" text file as part of its distribution, then any
99 | Derivative Works that You distribute must include a readable copy of the
100 | attribution notices contained within such NOTICE file, excluding those notices
101 | that do not pertain to any part of the Derivative Works, in at least one of the
102 | following places: within a NOTICE text file distributed as part of the
103 | Derivative Works; within the Source form or documentation, if provided along
104 | with the Derivative Works; or, within a display generated by the Derivative
105 | Works, if and wherever such third-party notices normally appear. The contents of
106 | the NOTICE file are for informational purposes only and do not modify the
107 | License. You may add Your own attribution notices within Derivative Works that
108 | You distribute, alongside or as an addendum to the NOTICE text from the Work,
109 | provided that such additional attribution notices cannot be construed as
110 | modifying the License.
111 | You may add Your own copyright statement to Your modifications and may provide
112 | additional or different license terms and conditions for use, reproduction, or
113 | distribution of Your modifications, or for any such Derivative Works as a whole,
114 | provided Your use, reproduction, and distribution of the Work otherwise complies
115 | with the conditions stated in this License.
116 |
117 | 5. Submission of Contributions.
118 |
119 | Unless You explicitly state otherwise, any Contribution intentionally submitted
120 | for inclusion in the Work by You to the Licensor shall be under the terms and
121 | conditions of this License, without any additional terms or conditions.
122 | Notwithstanding the above, nothing herein shall supersede or modify the terms of
123 | any separate license agreement you may have executed with Licensor regarding
124 | such Contributions.
125 |
126 | 6. Trademarks.
127 |
128 | This License does not grant permission to use the trade names, trademarks,
129 | service marks, or product names of the Licensor, except as required for
130 | reasonable and customary use in describing the origin of the Work and
131 | reproducing the content of the NOTICE file.
132 |
133 | 7. Disclaimer of Warranty.
134 |
135 | Unless required by applicable law or agreed to in writing, Licensor provides the
136 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
137 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
138 | including, without limitation, any warranties or conditions of TITLE,
139 | NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
140 | solely responsible for determining the appropriateness of using or
141 | redistributing the Work and assume any risks associated with Your exercise of
142 | permissions under this License.
143 |
144 | 8. Limitation of Liability.
145 |
146 | In no event and under no legal theory, whether in tort (including negligence),
147 | contract, or otherwise, unless required by applicable law (such as deliberate
148 | and grossly negligent acts) or agreed to in writing, shall any Contributor be
149 | liable to You for damages, including any direct, indirect, special, incidental,
150 | or consequential damages of any character arising as a result of this License or
151 | out of the use or inability to use the Work (including but not limited to
152 | damages for loss of goodwill, work stoppage, computer failure or malfunction, or
153 | any and all other commercial damages or losses), even if such Contributor has
154 | been advised of the possibility of such damages.
155 |
156 | 9. Accepting Warranty or Additional Liability.
157 |
158 | While redistributing the Work or Derivative Works thereof, You may choose to
159 | offer, and charge a fee for, acceptance of support, warranty, indemnity, or
160 | other liability obligations and/or rights consistent with this License. However,
161 | in accepting such obligations, You may act only on Your own behalf and on Your
162 | sole responsibility, not on behalf of any other Contributor, and only if You
163 | agree to indemnify, defend, and hold each Contributor harmless for any liability
164 | incurred by, or claims asserted against, such Contributor by reason of your
165 | accepting any such warranty or additional liability.
166 |
167 | END OF TERMS AND CONDITIONS
168 |
169 | APPENDIX: How to apply the Apache License to your work
170 |
171 | To apply the Apache License to your work, attach the following boilerplate
172 | notice, with the fields enclosed by brackets "{}" replaced with your own
173 | identifying information. (Don't include the brackets!) The text should be
174 | enclosed in the appropriate comment syntax for the file format. We also
175 | recommend that a file or class name and description of purpose be included on
176 | the same "printed page" as the copyright notice for easier identification within
177 | third-party archives.
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/LICENSE.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ac50aafeb7fa09e46845ea5384206e29
3 | timeCreated: 1510800130
4 | licenseType: Pro
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/Read Me.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FingerCaster/UGFDataTableExtension/f509090a3797f6e0c53a84a5059913f9f5b6306d/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/Read Me.txt
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/Read Me.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a1d3512d6e82e284ca101c8aa8332c35
3 | timeCreated: 1510800159
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 71ac1fd928d5b5847a90bc8a120aa3db
3 | folderAsset: yes
4 | timeCreated: 1510800130
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.OOXML.XML.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3f4edc6205d31724ba689d37f9d58025
3 | timeCreated: 1510800159
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.OOXML.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FingerCaster/UGFDataTableExtension/f509090a3797f6e0c53a84a5059913f9f5b6306d/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.OOXML.dll
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.OOXML.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 02fcc76ed43e20144b7c36f34131f22d
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 0
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 1
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.OpenXml4Net.XML.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ba14523a0692a7249b316ca8b17e6db1
3 | timeCreated: 1510800159
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.OpenXml4Net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FingerCaster/UGFDataTableExtension/f509090a3797f6e0c53a84a5059913f9f5b6306d/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.OpenXml4Net.dll
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.OpenXml4Net.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 04dfb816a06d5e24684a55dfc067583e
3 | timeCreated: 1510800132
4 | licenseType: Pro
5 | PluginImporter:
6 | serializedVersion: 2
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | isOverridable: 0
11 | platformData:
12 | data:
13 | first:
14 | '': Any
15 | second:
16 | enabled: 0
17 | settings:
18 | Exclude Android: 0
19 | Exclude Editor: 0
20 | Exclude Linux: 0
21 | Exclude Linux64: 0
22 | Exclude LinuxUniversal: 0
23 | Exclude OSXIntel: 0
24 | Exclude OSXIntel64: 0
25 | Exclude OSXUniversal: 0
26 | Exclude SamsungTV: 0
27 | Exclude Tizen: 0
28 | Exclude WebGL: 0
29 | Exclude Win: 0
30 | Exclude Win64: 0
31 | Exclude WindowsStoreApps: 0
32 | Exclude iOS: 0
33 | Exclude tvOS: 0
34 | data:
35 | first:
36 | Android: Android
37 | second:
38 | enabled: 1
39 | settings: {}
40 | data:
41 | first:
42 | Any:
43 | second:
44 | enabled: 1
45 | settings: {}
46 | data:
47 | first:
48 | Editor: Editor
49 | second:
50 | enabled: 1
51 | settings:
52 | DefaultValueInitialized: true
53 | data:
54 | first:
55 | Facebook: Win
56 | second:
57 | enabled: 0
58 | settings:
59 | CPU: AnyCPU
60 | data:
61 | first:
62 | Facebook: Win64
63 | second:
64 | enabled: 0
65 | settings:
66 | CPU: AnyCPU
67 | data:
68 | first:
69 | Samsung TV: SamsungTV
70 | second:
71 | enabled: 1
72 | settings: {}
73 | data:
74 | first:
75 | Standalone: Linux
76 | second:
77 | enabled: 1
78 | settings:
79 | CPU: x86
80 | data:
81 | first:
82 | Standalone: Linux64
83 | second:
84 | enabled: 1
85 | settings:
86 | CPU: x86_64
87 | data:
88 | first:
89 | Standalone: LinuxUniversal
90 | second:
91 | enabled: 1
92 | settings:
93 | CPU: AnyCPU
94 | data:
95 | first:
96 | Standalone: OSXIntel
97 | second:
98 | enabled: 1
99 | settings:
100 | CPU: AnyCPU
101 | data:
102 | first:
103 | Standalone: OSXIntel64
104 | second:
105 | enabled: 1
106 | settings:
107 | CPU: AnyCPU
108 | data:
109 | first:
110 | Standalone: OSXUniversal
111 | second:
112 | enabled: 1
113 | settings:
114 | CPU: AnyCPU
115 | data:
116 | first:
117 | Standalone: Win
118 | second:
119 | enabled: 1
120 | settings:
121 | CPU: AnyCPU
122 | data:
123 | first:
124 | Standalone: Win64
125 | second:
126 | enabled: 1
127 | settings:
128 | CPU: AnyCPU
129 | data:
130 | first:
131 | Tizen: Tizen
132 | second:
133 | enabled: 1
134 | settings: {}
135 | data:
136 | first:
137 | WebGL: WebGL
138 | second:
139 | enabled: 1
140 | settings: {}
141 | data:
142 | first:
143 | Windows Store Apps: WindowsStoreApps
144 | second:
145 | enabled: 1
146 | settings:
147 | CPU: AnyCPU
148 | data:
149 | first:
150 | iPhone: iOS
151 | second:
152 | enabled: 1
153 | settings: {}
154 | data:
155 | first:
156 | tvOS: tvOS
157 | second:
158 | enabled: 1
159 | settings: {}
160 | userData:
161 | assetBundleName:
162 | assetBundleVariant:
163 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.OpenXmlFormats.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FingerCaster/UGFDataTableExtension/f509090a3797f6e0c53a84a5059913f9f5b6306d/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.OpenXmlFormats.dll
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.OpenXmlFormats.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 20763952caa472e4785a8faf0e1965a0
3 | timeCreated: 1510800133
4 | licenseType: Pro
5 | PluginImporter:
6 | serializedVersion: 2
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | isOverridable: 0
11 | platformData:
12 | data:
13 | first:
14 | '': Any
15 | second:
16 | enabled: 0
17 | settings:
18 | Exclude Android: 0
19 | Exclude Editor: 0
20 | Exclude Linux: 0
21 | Exclude Linux64: 0
22 | Exclude LinuxUniversal: 0
23 | Exclude OSXIntel: 0
24 | Exclude OSXIntel64: 0
25 | Exclude OSXUniversal: 0
26 | Exclude SamsungTV: 0
27 | Exclude Tizen: 0
28 | Exclude WebGL: 0
29 | Exclude Win: 0
30 | Exclude Win64: 0
31 | Exclude WindowsStoreApps: 0
32 | Exclude iOS: 0
33 | Exclude tvOS: 0
34 | data:
35 | first:
36 | Android: Android
37 | second:
38 | enabled: 1
39 | settings: {}
40 | data:
41 | first:
42 | Any:
43 | second:
44 | enabled: 1
45 | settings: {}
46 | data:
47 | first:
48 | Editor: Editor
49 | second:
50 | enabled: 1
51 | settings:
52 | DefaultValueInitialized: true
53 | data:
54 | first:
55 | Facebook: Win
56 | second:
57 | enabled: 0
58 | settings:
59 | CPU: AnyCPU
60 | data:
61 | first:
62 | Facebook: Win64
63 | second:
64 | enabled: 0
65 | settings:
66 | CPU: AnyCPU
67 | data:
68 | first:
69 | Samsung TV: SamsungTV
70 | second:
71 | enabled: 1
72 | settings: {}
73 | data:
74 | first:
75 | Standalone: Linux
76 | second:
77 | enabled: 1
78 | settings:
79 | CPU: x86
80 | data:
81 | first:
82 | Standalone: Linux64
83 | second:
84 | enabled: 1
85 | settings:
86 | CPU: x86_64
87 | data:
88 | first:
89 | Standalone: LinuxUniversal
90 | second:
91 | enabled: 1
92 | settings:
93 | CPU: AnyCPU
94 | data:
95 | first:
96 | Standalone: OSXIntel
97 | second:
98 | enabled: 1
99 | settings:
100 | CPU: AnyCPU
101 | data:
102 | first:
103 | Standalone: OSXIntel64
104 | second:
105 | enabled: 1
106 | settings:
107 | CPU: AnyCPU
108 | data:
109 | first:
110 | Standalone: OSXUniversal
111 | second:
112 | enabled: 1
113 | settings:
114 | CPU: AnyCPU
115 | data:
116 | first:
117 | Standalone: Win
118 | second:
119 | enabled: 1
120 | settings:
121 | CPU: AnyCPU
122 | data:
123 | first:
124 | Standalone: Win64
125 | second:
126 | enabled: 1
127 | settings:
128 | CPU: AnyCPU
129 | data:
130 | first:
131 | Tizen: Tizen
132 | second:
133 | enabled: 1
134 | settings: {}
135 | data:
136 | first:
137 | WebGL: WebGL
138 | second:
139 | enabled: 1
140 | settings: {}
141 | data:
142 | first:
143 | Windows Store Apps: WindowsStoreApps
144 | second:
145 | enabled: 1
146 | settings:
147 | CPU: AnyCPU
148 | data:
149 | first:
150 | iPhone: iOS
151 | second:
152 | enabled: 1
153 | settings: {}
154 | data:
155 | first:
156 | tvOS: tvOS
157 | second:
158 | enabled: 1
159 | settings: {}
160 | userData:
161 | assetBundleName:
162 | assetBundleVariant:
163 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.XML.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: febeb2438b233014c856fde7ba53f347
3 | timeCreated: 1510800159
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FingerCaster/UGFDataTableExtension/f509090a3797f6e0c53a84a5059913f9f5b6306d/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.dll
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Editor/NPOI 2.2.0.0/dotnet2/NPOI.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4a31658ec38298f449a1f3521eb71b29
3 | timeCreated: 1510800134
4 | licenseType: Pro
5 | PluginImporter:
6 | serializedVersion: 2
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | isOverridable: 0
11 | platformData:
12 | data:
13 | first:
14 | '': Any
15 | second:
16 | enabled: 0
17 | settings:
18 | Exclude Android: 0
19 | Exclude Editor: 0
20 | Exclude Linux: 0
21 | Exclude Linux64: 0
22 | Exclude LinuxUniversal: 0
23 | Exclude OSXIntel: 0
24 | Exclude OSXIntel64: 0
25 | Exclude OSXUniversal: 0
26 | Exclude SamsungTV: 0
27 | Exclude Tizen: 0
28 | Exclude WebGL: 0
29 | Exclude Win: 0
30 | Exclude Win64: 0
31 | Exclude WindowsStoreApps: 0
32 | Exclude iOS: 0
33 | Exclude tvOS: 0
34 | data:
35 | first:
36 | '': Editor
37 | second:
38 | enabled: 0
39 | settings:
40 | CPU: AnyCPU
41 | OS: AnyOS
42 | data:
43 | first:
44 | Android: Android
45 | second:
46 | enabled: 1
47 | settings:
48 | CPU: ARMv7
49 | data:
50 | first:
51 | Any:
52 | second:
53 | enabled: 0
54 | settings: {}
55 | data:
56 | first:
57 | Editor: Editor
58 | second:
59 | enabled: 1
60 | settings:
61 | DefaultValueInitialized: true
62 | data:
63 | first:
64 | Facebook: Win
65 | second:
66 | enabled: 0
67 | settings:
68 | CPU: AnyCPU
69 | data:
70 | first:
71 | Facebook: Win64
72 | second:
73 | enabled: 0
74 | settings:
75 | CPU: AnyCPU
76 | data:
77 | first:
78 | Samsung TV: SamsungTV
79 | second:
80 | enabled: 1
81 | settings:
82 | STV_MODEL: STANDARD_15
83 | data:
84 | first:
85 | Standalone: Linux
86 | second:
87 | enabled: 1
88 | settings:
89 | CPU: x86
90 | data:
91 | first:
92 | Standalone: Linux64
93 | second:
94 | enabled: 1
95 | settings:
96 | CPU: x86_64
97 | data:
98 | first:
99 | Standalone: LinuxUniversal
100 | second:
101 | enabled: 1
102 | settings:
103 | CPU: AnyCPU
104 | data:
105 | first:
106 | Standalone: OSXIntel
107 | second:
108 | enabled: 1
109 | settings:
110 | CPU: AnyCPU
111 | data:
112 | first:
113 | Standalone: OSXIntel64
114 | second:
115 | enabled: 1
116 | settings:
117 | CPU: AnyCPU
118 | data:
119 | first:
120 | Standalone: OSXUniversal
121 | second:
122 | enabled: 1
123 | settings:
124 | CPU: AnyCPU
125 | data:
126 | first:
127 | Standalone: Win
128 | second:
129 | enabled: 1
130 | settings:
131 | CPU: AnyCPU
132 | data:
133 | first:
134 | Standalone: Win64
135 | second:
136 | enabled: 1
137 | settings:
138 | CPU: AnyCPU
139 | data:
140 | first:
141 | Tizen: Tizen
142 | second:
143 | enabled: 1
144 | settings: {}
145 | data:
146 | first:
147 | WebGL: WebGL
148 | second:
149 | enabled: 1
150 | settings: {}
151 | data:
152 | first:
153 | Windows Store Apps: WindowsStoreApps
154 | second:
155 | enabled: 1
156 | settings:
157 | CPU: AnyCPU
158 | DontProcess: False
159 | PlaceholderPath:
160 | SDK: AnySDK
161 | ScriptingBackend: AnyScriptingBackend
162 | data:
163 | first:
164 | iPhone: iOS
165 | second:
166 | enabled: 1
167 | settings:
168 | CompileFlags:
169 | FrameworkDependencies:
170 | data:
171 | first:
172 | tvOS: tvOS
173 | second:
174 | enabled: 1
175 | settings:
176 | CompileFlags:
177 | FrameworkDependencies:
178 | userData:
179 | assetBundleName:
180 | assetBundleVariant:
181 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 04c6eff50ade70447aefcc5bb31e186d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/DataTable.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 186d68aab18d36943a081f22ff769159
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/DataTable/DRTest.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 398faf540b57b794fb93bf7c454b7544
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/DataTable/DRTestDictionary.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // 此文件由工具自动生成,请勿直接修改。
3 | // 生成时间:2021-07-07 23:15:55.351
4 | //------------------------------------------------------------
5 |
6 | using GameFramework;
7 | using System;
8 | using System.Collections.Generic;
9 | using System.IO;
10 | using System.Text;
11 | using UnityEngine;
12 | using UnityGameFramework.Runtime;
13 |
14 |
15 | namespace DE
16 | {
17 | ///
18 | /// 测试表格生成。
19 | ///
20 | public class DRTestDictionary : DataRowBase
21 | {
22 | private int m_Id = 0;
23 |
24 | ///
25 | /// 获取编号。
26 | ///
27 | public override int Id
28 | {
29 | get
30 | {
31 | return m_Id;
32 | }
33 | }
34 |
35 | ///
36 | /// 获取测试字典(KeyType:int ValueType:Int)。
37 | ///
38 | public Dictionary TestIntIntDictionary
39 | {
40 | get;
41 | private set;
42 | }
43 |
44 | ///
45 | /// 获取测试字典(KeyType:int ValueType:vector3)。
46 | ///
47 | public Dictionary TestIntVector3Dictionary
48 | {
49 | get;
50 | private set;
51 | }
52 |
53 | public override bool ParseDataRow(string dataRowString, object userData)
54 | {
55 | string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
56 | for (int i = 0; i < columnStrings.Length; i++)
57 | {
58 | columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
59 | }
60 |
61 | int index = 0;
62 | index++;
63 | m_Id = int.Parse(columnStrings[index++]);
64 | index++;
65 | TestIntIntDictionary = DataTableExtension.ParseInt32Int32Dictionary(columnStrings[index++]);
66 | TestIntVector3Dictionary = DataTableExtension.ParseInt32Vector3Dictionary(columnStrings[index++]);
67 | GeneratePropertyArray();
68 | return true;
69 | }
70 |
71 | public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
72 | {
73 | using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
74 | {
75 | using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
76 | {
77 | m_Id = binaryReader.Read7BitEncodedInt32();
78 | TestIntIntDictionary = binaryReader.ReadInt32Int32Dictionary();
79 | TestIntVector3Dictionary = binaryReader.ReadInt32Vector3Dictionary();
80 | }
81 | }
82 |
83 | GeneratePropertyArray();
84 | return true;
85 | }
86 |
87 | private void GeneratePropertyArray()
88 | {
89 |
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/DataTable/DRTestDictionary.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1764c7f5ebc20264cbf7072904566886
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/DataTable/DRTestEnum.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------
2 | // 此文件由工具自动生成,请勿直接修改。
3 | // 生成时间:2021-07-07 23:15:55.355
4 | //------------------------------------------------------------
5 |
6 | using GameFramework;
7 | using System;
8 | using System.Collections.Generic;
9 | using System.IO;
10 | using System.Text;
11 | using UnityEngine;
12 | using UnityGameFramework.Runtime;
13 |
14 |
15 | namespace DE
16 | {
17 | ///
18 | /// 测试表格生成。
19 | ///
20 | public class DRTestEnum : DataRowBase
21 | {
22 | private int m_Id = 0;
23 |
24 | ///
25 | /// 获取编号。
26 | ///
27 | public override int Id
28 | {
29 | get
30 | {
31 | return m_Id;
32 | }
33 | }
34 |
35 | ///
36 | /// 获取测试枚举。
37 | ///
38 | public Test.TestEnum TestEnum
39 | {
40 | get;
41 | private set;
42 | }
43 |
44 | ///
45 | /// 获取测试枚举list。
46 | ///
47 | public List TestEnumList
48 | {
49 | get;
50 | private set;
51 | }
52 |
53 | ///
54 | /// 获取测试枚举Array。
55 | ///
56 | public Test.TestEnum[] TestEnumArray
57 | {
58 | get;
59 | private set;
60 | }
61 |
62 | ///
63 | /// 获取测试枚举字典。
64 | ///
65 | public Dictionary TestEnumDic
66 | {
67 | get;
68 | private set;
69 | }
70 |
71 | public override bool ParseDataRow(string dataRowString, object userData)
72 | {
73 | string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
74 | for (int i = 0; i < columnStrings.Length; i++)
75 | {
76 | columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
77 | }
78 |
79 | int index = 0;
80 | index++;
81 | m_Id = int.Parse(columnStrings[index++]);
82 | TestEnum = (Test.TestEnum)int.Parse(columnStrings[index++]);
83 | TestEnumList = DataTableExtension.ParseTestTestEnumList(columnStrings[index++]);
84 | TestEnumArray = DataTableExtension.ParseTestTestEnumArray(columnStrings[index++]);
85 | TestEnumDic = DataTableExtension.ParseTestTestEnumInt32Dictionary(columnStrings[index++]);
86 | index++;
87 | GeneratePropertyArray();
88 | return true;
89 | }
90 |
91 | public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
92 | {
93 | using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
94 | {
95 | using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
96 | {
97 | m_Id = binaryReader.Read7BitEncodedInt32();
98 | TestEnum = (Test.TestEnum)binaryReader.Read7BitEncodedInt32();
99 | TestEnumList = binaryReader.ReadTestTestEnumList();
100 | TestEnumArray = binaryReader.ReadTestTestEnumArray();
101 | TestEnumDic = binaryReader.ReadTestTestEnumInt32Dictionary();
102 | }
103 | }
104 |
105 | GeneratePropertyArray();
106 | return true;
107 | }
108 |
109 | private void GeneratePropertyArray()
110 | {
111 |
112 | }
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/DataTable/DRTestEnum.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 50bc33a9f4e1c6643892126cacfbd856
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ad4cfe1e9565c2c4488794a0f2515360
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/BinaryReaderExtension.Array.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | namespace DE
6 | {
7 | public static partial class BinaryReaderExtension
8 | {
9 | public static bool[] ReadBooleanArray(this BinaryReader binaryReader)
10 | {
11 | int count = binaryReader.Read7BitEncodedInt32();
12 | bool[] array = new bool[count];
13 | for (int i = 0; i < count; i++)
14 | {
15 | array[i] = binaryReader.ReadBoolean();
16 | }
17 | return array;
18 | }
19 | public static byte[] ReadByteArray(this BinaryReader binaryReader)
20 | {
21 | int count = binaryReader.Read7BitEncodedInt32();
22 | byte[] array = new byte[count];
23 | for (int i = 0; i < count; i++)
24 | {
25 | array[i] = binaryReader.ReadByte();
26 | }
27 | return array;
28 | }
29 | public static char[] ReadCharArray(this BinaryReader binaryReader)
30 | {
31 | int count = binaryReader.Read7BitEncodedInt32();
32 | char[] array = new char[count];
33 | for (int i = 0; i < count; i++)
34 | {
35 | array[i] = binaryReader.ReadChar();
36 | }
37 | return array;
38 | }
39 | public static Color32[] ReadColor32Array(this BinaryReader binaryReader)
40 | {
41 | int count = binaryReader.Read7BitEncodedInt32();
42 | Color32[] array = new Color32[count];
43 | for (int i = 0; i < count; i++)
44 | {
45 | array[i] = ReadColor32(binaryReader);
46 | }
47 | return array;
48 | }
49 | public static Color[] ReadColorArray(this BinaryReader binaryReader)
50 | {
51 | int count = binaryReader.Read7BitEncodedInt32();
52 | Color[] array = new Color[count];
53 | for (int i = 0; i < count; i++)
54 | {
55 | array[i] = ReadColor(binaryReader);
56 | }
57 | return array;
58 | }
59 | public static DateTime[] ReadDateTimeArray(this BinaryReader binaryReader)
60 | {
61 | int count = binaryReader.Read7BitEncodedInt32();
62 | DateTime[] array = new DateTime[count];
63 | for (int i = 0; i < count; i++)
64 | {
65 | array[i] = ReadDateTime(binaryReader);
66 | }
67 | return array;
68 | }
69 | public static decimal[] ReadDecimalArray(this BinaryReader binaryReader)
70 | {
71 | int count = binaryReader.Read7BitEncodedInt32();
72 | decimal[] array = new decimal[count];
73 | for (int i = 0; i < count; i++)
74 | {
75 | array[i] = binaryReader.ReadDecimal();
76 | }
77 | return array;
78 | }
79 | public static double[] ReadDoubleArray(this BinaryReader binaryReader)
80 | {
81 | int count = binaryReader.Read7BitEncodedInt32();
82 | double[] array = new double[count];
83 | for (int i = 0; i < count; i++)
84 | {
85 | array[i] = binaryReader.ReadDouble();
86 | }
87 | return array;
88 | }
89 | public static float[] ReadSingleArray(this BinaryReader binaryReader)
90 | {
91 | int count = binaryReader.Read7BitEncodedInt32();
92 | float[] array = new float[count];
93 | for (int i = 0; i < count; i++)
94 | {
95 | array[i] = binaryReader.ReadSingle();
96 | }
97 | return array;
98 | }
99 | public static int[] ReadInt32Array(this BinaryReader binaryReader)
100 | {
101 | int count = binaryReader.Read7BitEncodedInt32();
102 | int[] array = new int[count];
103 | for (int i = 0; i < count; i++)
104 | {
105 | array[i] = binaryReader.Read7BitEncodedInt32();
106 | }
107 | return array;
108 | }
109 | public static long[] ReadInt64Array(this BinaryReader binaryReader)
110 | {
111 | int count = binaryReader.Read7BitEncodedInt32();
112 | long[] array = new long[count];
113 | for (int i = 0; i < count; i++)
114 | {
115 | array[i] = binaryReader.Read7BitEncodedInt64();
116 | }
117 | return array;
118 | }
119 | public static Quaternion[] ReadQuaternionArray(this BinaryReader binaryReader)
120 | {
121 | int count = binaryReader.Read7BitEncodedInt32();
122 | Quaternion[] array = new Quaternion[count];
123 | for (int i = 0; i < count; i++)
124 | {
125 | array[i] = ReadQuaternion(binaryReader);
126 | }
127 | return array;
128 | }
129 | public static Rect[] ReadRectArray(this BinaryReader binaryReader)
130 | {
131 | int count = binaryReader.Read7BitEncodedInt32();
132 | Rect[] array = new Rect[count];
133 | for (int i = 0; i < count; i++)
134 | {
135 | array[i] = ReadRect(binaryReader);
136 | }
137 | return array;
138 | }
139 | public static sbyte[] ReadSByteArray(this BinaryReader binaryReader)
140 | {
141 | int count = binaryReader.Read7BitEncodedInt32();
142 | sbyte[] array = new sbyte[count];
143 | for (int i = 0; i < count; i++)
144 | {
145 | array[i] = binaryReader.ReadSByte();
146 | }
147 | return array;
148 | }
149 | public static short[] ReadInt16Array(this BinaryReader binaryReader)
150 | {
151 | int count = binaryReader.Read7BitEncodedInt32();
152 | short[] array = new short[count];
153 | for (int i = 0; i < count; i++)
154 | {
155 | array[i] = binaryReader.ReadInt16();
156 | }
157 | return array;
158 | }
159 | public static string[] ReadStringArray(this BinaryReader binaryReader)
160 | {
161 | int count = binaryReader.Read7BitEncodedInt32();
162 | string[] array = new string[count];
163 | for (int i = 0; i < count; i++)
164 | {
165 | array[i] = binaryReader.ReadString();
166 | }
167 | return array;
168 | }
169 | public static uint[] ReadUInt32Array(this BinaryReader binaryReader)
170 | {
171 | int count = binaryReader.Read7BitEncodedInt32();
172 | uint[] array = new uint[count];
173 | for (int i = 0; i < count; i++)
174 | {
175 | array[i] = binaryReader.Read7BitEncodedUInt32();
176 | }
177 | return array;
178 | }
179 | public static ulong[] ReadUInt64Array(this BinaryReader binaryReader)
180 | {
181 | int count = binaryReader.Read7BitEncodedInt32();
182 | ulong[] array = new ulong[count];
183 | for (int i = 0; i < count; i++)
184 | {
185 | array[i] = binaryReader.Read7BitEncodedUInt64();
186 | }
187 | return array;
188 | }
189 | public static ushort[] ReadUInt16Array(this BinaryReader binaryReader)
190 | {
191 | int count = binaryReader.Read7BitEncodedInt32();
192 | ushort[] array = new ushort[count];
193 | for (int i = 0; i < count; i++)
194 | {
195 | array[i] = binaryReader.ReadUInt16();
196 | }
197 | return array;
198 | }
199 | public static Vector2[] ReadVector2Array(this BinaryReader binaryReader)
200 | {
201 | int count = binaryReader.Read7BitEncodedInt32();
202 | Vector2[] array = new Vector2[count];
203 | for (int i = 0; i < count; i++)
204 | {
205 | array[i] = ReadVector2(binaryReader);
206 | }
207 | return array;
208 | }
209 | public static Vector3[] ReadVector3Array(this BinaryReader binaryReader)
210 | {
211 | int count = binaryReader.Read7BitEncodedInt32();
212 | Vector3[] array = new Vector3[count];
213 | for (int i = 0; i < count; i++)
214 | {
215 | array[i] = ReadVector3(binaryReader);
216 | }
217 | return array;
218 | }
219 | public static Vector4[] ReadVector4Array(this BinaryReader binaryReader)
220 | {
221 | int count = binaryReader.Read7BitEncodedInt32();
222 | Vector4[] array = new Vector4[count];
223 | for (int i = 0; i < count; i++)
224 | {
225 | array[i] = ReadVector4(binaryReader);
226 | }
227 | return array;
228 | }
229 | public static Test.TestEnum[] ReadTestTestEnumArray(this BinaryReader binaryReader)
230 | {
231 | int count = binaryReader.Read7BitEncodedInt32();
232 | Test.TestEnum[] array = new Test.TestEnum[count];
233 | for (int i = 0; i < count; i++)
234 | {
235 | array[i] = (Test.TestEnum)binaryReader.Read7BitEncodedInt32();
236 | }
237 | return array;
238 | }
239 | }
240 | }
241 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/BinaryReaderExtension.Array.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 10077e1aef81981429763a96ae77c5f7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/BinaryReaderExtension.Dictionary.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | namespace DE
6 | {
7 | public static partial class BinaryReaderExtension
8 | {
9 | public static Dictionary ReadInt32Int32Dictionary(this BinaryReader binaryReader)
10 | {
11 | int count = binaryReader.Read7BitEncodedInt32();
12 | Dictionary dictionary = new Dictionary(count);
13 | for (int i = 0; i < count; i++)
14 | {
15 | dictionary.Add(binaryReader.Read7BitEncodedInt32(),binaryReader.Read7BitEncodedInt32());
16 | }
17 | return dictionary;
18 | }
19 | public static Dictionary ReadInt32Vector3Dictionary(this BinaryReader binaryReader)
20 | {
21 | int count = binaryReader.Read7BitEncodedInt32();
22 | Dictionary dictionary = new Dictionary(count);
23 | for (int i = 0; i < count; i++)
24 | {
25 | dictionary.Add(binaryReader.Read7BitEncodedInt32(), ReadVector3(binaryReader));
26 | }
27 | return dictionary;
28 | }
29 | public static Dictionary ReadTestTestEnumInt32Dictionary(this BinaryReader binaryReader)
30 | {
31 | int count = binaryReader.Read7BitEncodedInt32();
32 | Dictionary dictionary = new Dictionary(count);
33 | for (int i = 0; i < count; i++)
34 | {
35 | dictionary.Add((Test.TestEnum) binaryReader.Read7BitEncodedInt32(),(int) binaryReader.Read7BitEncodedInt32());
36 | }
37 | return dictionary;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/BinaryReaderExtension.Dictionary.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1cc78a7fd2754131a5cd346c491599fd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/BinaryReaderExtension.List.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | namespace DE
6 | {
7 | public static partial class BinaryReaderExtension
8 | {
9 | public static List ReadBooleanList(this BinaryReader binaryReader)
10 | {
11 | int count = binaryReader.Read7BitEncodedInt32();
12 | List list = new List(count);
13 | for (int i = 0; i < count; i++)
14 | {
15 | list.Add(binaryReader.ReadBoolean());
16 | }
17 | return list;
18 | }
19 | public static List ReadByteList(this BinaryReader binaryReader)
20 | {
21 | int count = binaryReader.Read7BitEncodedInt32();
22 | List list = new List(count);
23 | for (int i = 0; i < count; i++)
24 | {
25 | list.Add(binaryReader.ReadByte());
26 | }
27 | return list;
28 | }
29 | public static List ReadCharList(this BinaryReader binaryReader)
30 | {
31 | int count = binaryReader.Read7BitEncodedInt32();
32 | List list = new List(count);
33 | for (int i = 0; i < count; i++)
34 | {
35 | list.Add(binaryReader.ReadChar());
36 | }
37 | return list;
38 | }
39 | public static List ReadColor32List(this BinaryReader binaryReader)
40 | {
41 | int count = binaryReader.Read7BitEncodedInt32();
42 | List list = new List(count);
43 | for (int i = 0; i < count; i++)
44 | {
45 | list.Add(ReadColor32(binaryReader));
46 | }
47 | return list;
48 | }
49 | public static List ReadColorList(this BinaryReader binaryReader)
50 | {
51 | int count = binaryReader.Read7BitEncodedInt32();
52 | List list = new List(count);
53 | for (int i = 0; i < count; i++)
54 | {
55 | list.Add(ReadColor(binaryReader));
56 | }
57 | return list;
58 | }
59 | public static List ReadDateTimeList(this BinaryReader binaryReader)
60 | {
61 | int count = binaryReader.Read7BitEncodedInt32();
62 | List list = new List(count);
63 | for (int i = 0; i < count; i++)
64 | {
65 | list.Add(ReadDateTime(binaryReader));
66 | }
67 | return list;
68 | }
69 | public static List ReadDecimalList(this BinaryReader binaryReader)
70 | {
71 | int count = binaryReader.Read7BitEncodedInt32();
72 | List list = new List(count);
73 | for (int i = 0; i < count; i++)
74 | {
75 | list.Add(binaryReader.ReadDecimal());
76 | }
77 | return list;
78 | }
79 | public static List ReadDoubleList(this BinaryReader binaryReader)
80 | {
81 | int count = binaryReader.Read7BitEncodedInt32();
82 | List list = new List(count);
83 | for (int i = 0; i < count; i++)
84 | {
85 | list.Add(binaryReader.ReadDouble());
86 | }
87 | return list;
88 | }
89 | public static List ReadSingleList(this BinaryReader binaryReader)
90 | {
91 | int count = binaryReader.Read7BitEncodedInt32();
92 | List list = new List(count);
93 | for (int i = 0; i < count; i++)
94 | {
95 | list.Add(binaryReader.ReadSingle());
96 | }
97 | return list;
98 | }
99 | public static List ReadInt32List(this BinaryReader binaryReader)
100 | {
101 | int count = binaryReader.Read7BitEncodedInt32();
102 | List list = new List(count);
103 | for (int i = 0; i < count; i++)
104 | {
105 | list.Add(binaryReader.Read7BitEncodedInt32());
106 | }
107 | return list;
108 | }
109 | public static List ReadInt64List(this BinaryReader binaryReader)
110 | {
111 | int count = binaryReader.Read7BitEncodedInt32();
112 | List list = new List(count);
113 | for (int i = 0; i < count; i++)
114 | {
115 | list.Add(binaryReader.Read7BitEncodedInt64());
116 | }
117 | return list;
118 | }
119 | public static List ReadQuaternionList(this BinaryReader binaryReader)
120 | {
121 | int count = binaryReader.Read7BitEncodedInt32();
122 | List list = new List(count);
123 | for (int i = 0; i < count; i++)
124 | {
125 | list.Add(ReadQuaternion(binaryReader));
126 | }
127 | return list;
128 | }
129 | public static List ReadRectList(this BinaryReader binaryReader)
130 | {
131 | int count = binaryReader.Read7BitEncodedInt32();
132 | List list = new List(count);
133 | for (int i = 0; i < count; i++)
134 | {
135 | list.Add(ReadRect(binaryReader));
136 | }
137 | return list;
138 | }
139 | public static List ReadSByteList(this BinaryReader binaryReader)
140 | {
141 | int count = binaryReader.Read7BitEncodedInt32();
142 | List list = new List(count);
143 | for (int i = 0; i < count; i++)
144 | {
145 | list.Add(binaryReader.ReadSByte());
146 | }
147 | return list;
148 | }
149 | public static List ReadInt16List(this BinaryReader binaryReader)
150 | {
151 | int count = binaryReader.Read7BitEncodedInt32();
152 | List list = new List(count);
153 | for (int i = 0; i < count; i++)
154 | {
155 | list.Add(binaryReader.ReadInt16());
156 | }
157 | return list;
158 | }
159 | public static List ReadStringList(this BinaryReader binaryReader)
160 | {
161 | int count = binaryReader.Read7BitEncodedInt32();
162 | List list = new List(count);
163 | for (int i = 0; i < count; i++)
164 | {
165 | list.Add(binaryReader.ReadString());
166 | }
167 | return list;
168 | }
169 | public static List ReadUInt32List(this BinaryReader binaryReader)
170 | {
171 | int count = binaryReader.Read7BitEncodedInt32();
172 | List list = new List(count);
173 | for (int i = 0; i < count; i++)
174 | {
175 | list.Add(binaryReader.Read7BitEncodedUInt32());
176 | }
177 | return list;
178 | }
179 | public static List ReadUInt64List(this BinaryReader binaryReader)
180 | {
181 | int count = binaryReader.Read7BitEncodedInt32();
182 | List list = new List(count);
183 | for (int i = 0; i < count; i++)
184 | {
185 | list.Add(binaryReader.Read7BitEncodedUInt64());
186 | }
187 | return list;
188 | }
189 | public static List ReadUInt16List(this BinaryReader binaryReader)
190 | {
191 | int count = binaryReader.Read7BitEncodedInt32();
192 | List list = new List(count);
193 | for (int i = 0; i < count; i++)
194 | {
195 | list.Add(binaryReader.ReadUInt16());
196 | }
197 | return list;
198 | }
199 | public static List ReadVector2List(this BinaryReader binaryReader)
200 | {
201 | int count = binaryReader.Read7BitEncodedInt32();
202 | List list = new List(count);
203 | for (int i = 0; i < count; i++)
204 | {
205 | list.Add(ReadVector2(binaryReader));
206 | }
207 | return list;
208 | }
209 | public static List ReadVector3List(this BinaryReader binaryReader)
210 | {
211 | int count = binaryReader.Read7BitEncodedInt32();
212 | List list = new List(count);
213 | for (int i = 0; i < count; i++)
214 | {
215 | list.Add(ReadVector3(binaryReader));
216 | }
217 | return list;
218 | }
219 | public static List ReadVector4List(this BinaryReader binaryReader)
220 | {
221 | int count = binaryReader.Read7BitEncodedInt32();
222 | List list = new List(count);
223 | for (int i = 0; i < count; i++)
224 | {
225 | list.Add(ReadVector4(binaryReader));
226 | }
227 | return list;
228 | }
229 | public static List ReadTestTestEnumList(this BinaryReader binaryReader)
230 | {
231 | int count = binaryReader.Read7BitEncodedInt32();
232 | List list = new List(count);
233 | for (int i = 0; i < count; i++)
234 | {
235 | list.Add((Test.TestEnum)binaryReader.Read7BitEncodedInt32());
236 | }
237 | return list;
238 | }
239 | }
240 | }
241 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/BinaryReaderExtension.List.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 88c81a2e9e1a73d49b545efa085aec6c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/BinaryReaderExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using UnityEngine;
4 |
5 | namespace DE
6 | {
7 | public static partial class BinaryReaderExtension
8 | {
9 | public static Color32 ReadColor32(this BinaryReader binaryReader)
10 | {
11 | return new Color32(binaryReader.ReadByte(), binaryReader.ReadByte(), binaryReader.ReadByte(),
12 | binaryReader.ReadByte());
13 | }
14 |
15 | public static Color ReadColor(this BinaryReader binaryReader)
16 | {
17 | return new Color(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle(),
18 | binaryReader.ReadSingle());
19 | }
20 |
21 | public static DateTime ReadDateTime(this BinaryReader binaryReader)
22 | {
23 | return new DateTime(binaryReader.ReadInt64());
24 | }
25 |
26 | public static Quaternion ReadQuaternion(this BinaryReader binaryReader)
27 | {
28 | return new Quaternion(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle(),
29 | binaryReader.ReadSingle());
30 | }
31 |
32 | public static Rect ReadRect(this BinaryReader binaryReader)
33 | {
34 | return new Rect(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle(),
35 | binaryReader.ReadSingle());
36 | }
37 |
38 | public static Vector2 ReadVector2(this BinaryReader binaryReader)
39 | {
40 | return new Vector2(binaryReader.ReadSingle(), binaryReader.ReadSingle());
41 | }
42 |
43 | public static Vector3 ReadVector3(this BinaryReader binaryReader)
44 | {
45 | return new Vector3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle());
46 | }
47 |
48 | public static Vector4 ReadVector4(this BinaryReader binaryReader)
49 | {
50 | return new Vector4(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle(),
51 | binaryReader.ReadSingle());
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/BinaryReaderExtension.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b1fcc480dea8901419651fae27fbf776
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/DataTableExtension.Array.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | namespace DE
6 | {
7 | public static partial class DataTableExtension
8 | {
9 | public static bool[] ParseBooleanArray(string value)
10 | {
11 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
12 | return null;
13 | string[] splitValue = value.Split(',');
14 | bool[] array = new bool[splitValue.Length];
15 | for (int i = 0; i < splitValue.Length; i++)
16 | {
17 | array[i] = Boolean.Parse(splitValue[i]);
18 | }
19 |
20 | return array;
21 | }
22 | public static byte[] ParseByteArray(string value)
23 | {
24 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
25 | return null;
26 | string[] splitValue = value.Split(',');
27 | byte[] array = new byte[splitValue.Length];
28 | for (int i = 0; i < splitValue.Length; i++)
29 | {
30 | array[i] = Byte.Parse(splitValue[i]);
31 | }
32 |
33 | return array;
34 | }
35 | public static char[] ParseCharArray(string value)
36 | {
37 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
38 | return null;
39 | string[] splitValue = value.Split(',');
40 | char[] array = new char[splitValue.Length];
41 | for (int i = 0; i < splitValue.Length; i++)
42 | {
43 | array[i] = Char.Parse(splitValue[i]);
44 | }
45 |
46 | return array;
47 | }
48 | public static Color32[] ParseColor32Array(string value)
49 | {
50 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
51 | return null;
52 | string[] splitValue = value.Split('|');
53 | Color32[] array = new Color32[splitValue.Length];
54 | for (int i = 0; i < splitValue.Length; i++)
55 | {
56 | array[i] = ParseColor32(splitValue[i]);
57 | }
58 |
59 | return array;
60 | }
61 | public static Color[] ParseColorArray(string value)
62 | {
63 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
64 | return null;
65 | string[] splitValue = value.Split('|');
66 | Color[] array = new Color[splitValue.Length];
67 | for (int i = 0; i < splitValue.Length; i++)
68 | {
69 | array[i] = ParseColor(splitValue[i]);
70 | }
71 |
72 | return array;
73 | }
74 | public static DateTime[] ParseDateTimeArray(string value)
75 | {
76 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
77 | return null;
78 | string[] splitValue = value.Split(',');
79 | DateTime[] array = new DateTime[splitValue.Length];
80 | for (int i = 0; i < splitValue.Length; i++)
81 | {
82 | array[i] = DateTime.Parse(splitValue[i]);
83 | }
84 |
85 | return array;
86 | }
87 | public static decimal[] ParseDecimalArray(string value)
88 | {
89 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
90 | return null;
91 | string[] splitValue = value.Split(',');
92 | decimal[] array = new decimal[splitValue.Length];
93 | for (int i = 0; i < splitValue.Length; i++)
94 | {
95 | array[i] = Decimal.Parse(splitValue[i]);
96 | }
97 |
98 | return array;
99 | }
100 | public static double[] ParseDoubleArray(string value)
101 | {
102 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
103 | return null;
104 | string[] splitValue = value.Split(',');
105 | double[] array = new double[splitValue.Length];
106 | for (int i = 0; i < splitValue.Length; i++)
107 | {
108 | array[i] = Double.Parse(splitValue[i]);
109 | }
110 |
111 | return array;
112 | }
113 | public static float[] ParseSingleArray(string value)
114 | {
115 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
116 | return null;
117 | string[] splitValue = value.Split(',');
118 | float[] array = new float[splitValue.Length];
119 | for (int i = 0; i < splitValue.Length; i++)
120 | {
121 | array[i] = Single.Parse(splitValue[i]);
122 | }
123 |
124 | return array;
125 | }
126 | public static int[] ParseInt32Array(string value)
127 | {
128 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
129 | return null;
130 | string[] splitValue = value.Split(',');
131 | int[] array = new int[splitValue.Length];
132 | for (int i = 0; i < splitValue.Length; i++)
133 | {
134 | array[i] = Int32.Parse(splitValue[i]);
135 | }
136 |
137 | return array;
138 | }
139 | public static long[] ParseInt64Array(string value)
140 | {
141 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
142 | return null;
143 | string[] splitValue = value.Split(',');
144 | long[] array = new long[splitValue.Length];
145 | for (int i = 0; i < splitValue.Length; i++)
146 | {
147 | array[i] = Int64.Parse(splitValue[i]);
148 | }
149 |
150 | return array;
151 | }
152 | public static Quaternion[] ParseQuaternionArray(string value)
153 | {
154 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
155 | return null;
156 | string[] splitValue = value.Split('|');
157 | Quaternion[] array = new Quaternion[splitValue.Length];
158 | for (int i = 0; i < splitValue.Length; i++)
159 | {
160 | array[i] = ParseQuaternion(splitValue[i]);
161 | }
162 |
163 | return array;
164 | }
165 | public static Rect[] ParseRectArray(string value)
166 | {
167 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
168 | return null;
169 | string[] splitValue = value.Split('|');
170 | Rect[] array = new Rect[splitValue.Length];
171 | for (int i = 0; i < splitValue.Length; i++)
172 | {
173 | array[i] = ParseRect(splitValue[i]);
174 | }
175 |
176 | return array;
177 | }
178 | public static sbyte[] ParseSByteArray(string value)
179 | {
180 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
181 | return null;
182 | string[] splitValue = value.Split(',');
183 | sbyte[] array = new sbyte[splitValue.Length];
184 | for (int i = 0; i < splitValue.Length; i++)
185 | {
186 | array[i] = SByte.Parse(splitValue[i]);
187 | }
188 |
189 | return array;
190 | }
191 | public static short[] ParseInt16Array(string value)
192 | {
193 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
194 | return null;
195 | string[] splitValue = value.Split(',');
196 | short[] array = new short[splitValue.Length];
197 | for (int i = 0; i < splitValue.Length; i++)
198 | {
199 | array[i] = Int16.Parse(splitValue[i]);
200 | }
201 |
202 | return array;
203 | }
204 | public static string[] ParseStringArray(string value)
205 | {
206 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
207 | return null;
208 | string[] splitValue = value.Split(',');
209 | string[] array = new string[splitValue.Length];
210 | for (int i = 0; i < splitValue.Length; i++)
211 | {
212 | array[i] = splitValue[i];
213 | }
214 |
215 | return array;
216 | }
217 | public static uint[] ParseUInt32Array(string value)
218 | {
219 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
220 | return null;
221 | string[] splitValue = value.Split(',');
222 | uint[] array = new uint[splitValue.Length];
223 | for (int i = 0; i < splitValue.Length; i++)
224 | {
225 | array[i] = UInt32.Parse(splitValue[i]);
226 | }
227 |
228 | return array;
229 | }
230 | public static ulong[] ParseUInt64Array(string value)
231 | {
232 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
233 | return null;
234 | string[] splitValue = value.Split(',');
235 | ulong[] array = new ulong[splitValue.Length];
236 | for (int i = 0; i < splitValue.Length; i++)
237 | {
238 | array[i] = UInt64.Parse(splitValue[i]);
239 | }
240 |
241 | return array;
242 | }
243 | public static ushort[] ParseUInt16Array(string value)
244 | {
245 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
246 | return null;
247 | string[] splitValue = value.Split(',');
248 | ushort[] array = new ushort[splitValue.Length];
249 | for (int i = 0; i < splitValue.Length; i++)
250 | {
251 | array[i] = UInt16.Parse(splitValue[i]);
252 | }
253 |
254 | return array;
255 | }
256 | public static Vector2[] ParseVector2Array(string value)
257 | {
258 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
259 | return null;
260 | string[] splitValue = value.Split('|');
261 | Vector2[] array = new Vector2[splitValue.Length];
262 | for (int i = 0; i < splitValue.Length; i++)
263 | {
264 | array[i] = ParseVector2(splitValue[i]);
265 | }
266 |
267 | return array;
268 | }
269 | public static Vector3[] ParseVector3Array(string value)
270 | {
271 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
272 | return null;
273 | string[] splitValue = value.Split('|');
274 | Vector3[] array = new Vector3[splitValue.Length];
275 | for (int i = 0; i < splitValue.Length; i++)
276 | {
277 | array[i] = ParseVector3(splitValue[i]);
278 | }
279 |
280 | return array;
281 | }
282 | public static Vector4[] ParseVector4Array(string value)
283 | {
284 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
285 | return null;
286 | string[] splitValue = value.Split('|');
287 | Vector4[] array = new Vector4[splitValue.Length];
288 | for (int i = 0; i < splitValue.Length; i++)
289 | {
290 | array[i] = ParseVector4(splitValue[i]);
291 | }
292 |
293 | return array;
294 | }
295 | public static Test.TestEnum[] ParseTestTestEnumArray(string value)
296 | {
297 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
298 | return null;
299 | string[] splitValue = value.Split(',');
300 | Test.TestEnum[] array = new Test.TestEnum[splitValue.Length];
301 | for (int i = 0; i < splitValue.Length; i++)
302 | {
303 | bool isInt = int.TryParse(splitValue[i], out int v);
304 | if (isInt)
305 | {
306 | array[i] = (Test.TestEnum)v;
307 | continue;
308 | }
309 | bool isString = EnumParse(splitValue[i], out Test.TestEnum v1);
310 | if (isString)
311 | {
312 | array[i] = v1;
313 | }
314 | }
315 |
316 | return array;
317 | }
318 | }
319 | }
320 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/DataTableExtension.Array.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8a8b3c35c203512499d32c159015ef85
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/DataTableExtension.Dictionary.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | namespace DE
6 | {
7 | public static partial class DataTableExtension
8 | {
9 | public static Dictionary ParseInt32Int32Dictionary(string value)
10 | {
11 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
12 | return null;
13 | string[] splitValue = value.Split('|');
14 | Dictionary dictionary = new Dictionary(splitValue.Length);
15 | for (int i = 0; i < splitValue.Length; i++)
16 | {
17 | string[] keyValue = splitValue[i].Split('#');
18 | dictionary.Add(Int32.Parse(keyValue[0].Substring(1)),Int32.Parse(keyValue[1].Substring(0, keyValue[1].Length - 1)));
19 | }
20 | return dictionary;
21 | }
22 | public static Dictionary ParseInt32Vector3Dictionary(string value)
23 | {
24 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
25 | return null;
26 | string[] splitValue = value.Split('|');
27 | Dictionary dictionary = new Dictionary(splitValue.Length);
28 | for (int i = 0; i < splitValue.Length; i++)
29 | {
30 | string[] keyValue = splitValue[i].Split('#');
31 | dictionary.Add(Int32.Parse(keyValue[0].Substring(1)),ParseVector3(keyValue[1].Substring(0, keyValue[1].Length - 1)));
32 | }
33 | return dictionary;
34 | }
35 | public static Dictionary ParseTestTestEnumInt32Dictionary(string value)
36 | {
37 | if (string.IsNullOrEmpty(value) || value.ToLowerInvariant().Equals("null"))
38 | return null;
39 | string[] splitValue = value.Split('|');
40 | Dictionary dictionary = new Dictionary(splitValue.Length);
41 | for (int i = 0; i < splitValue.Length; i++)
42 | {
43 | string[] keyValue = splitValue[i].Split('#');
44 | dictionary.Add((Test.TestEnum) int.Parse(keyValue[0].Substring(1)),Int32.Parse(keyValue[1].Substring(0, keyValue[1].Length - 1)));
45 | }
46 | return dictionary;
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/DataTableExtension.Dictionary.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c8b469682d1140bfa12d92ed3a9e7e53
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/DataTableExtension.List.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b595635afbcb3fa4abca93aea02cdf33
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/DataTableExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace DE
5 | {
6 | public static partial class DataTableExtension
7 | {
8 | internal static readonly char[] DataSplitSeparators = {'\t'};
9 | internal static readonly char[] DataTrimSeparators = {'\"'};
10 |
11 | public static Color32 ParseColor32(string value)
12 | {
13 | var splitValue = value.Split(',');
14 | return new Color32(byte.Parse(splitValue[0]), byte.Parse(splitValue[1]), byte.Parse(splitValue[2]),
15 | byte.Parse(splitValue[3]));
16 | }
17 |
18 | public static Color ParseColor(string value)
19 | {
20 | var splitValue = value.Split(',');
21 | return new Color(float.Parse(splitValue[0]), float.Parse(splitValue[1]), float.Parse(splitValue[2]),
22 | float.Parse(splitValue[3]));
23 | }
24 |
25 | public static Quaternion ParseQuaternion(string value)
26 | {
27 | var splitValue = value.Split(',');
28 | return new Quaternion(float.Parse(splitValue[0]), float.Parse(splitValue[1]), float.Parse(splitValue[2]),
29 | float.Parse(splitValue[3]));
30 | }
31 |
32 | public static Rect ParseRect(string value)
33 | {
34 | var splitValue = value.Split(',');
35 | return new Rect(float.Parse(splitValue[0]), float.Parse(splitValue[1]), float.Parse(splitValue[2]),
36 | float.Parse(splitValue[3]));
37 | }
38 |
39 | public static Vector2 ParseVector2(string value)
40 | {
41 | var splitValue = value.Split(',');
42 | return new Vector2(float.Parse(splitValue[0]), float.Parse(splitValue[1]));
43 | }
44 |
45 | public static Vector3 ParseVector3(string value)
46 | {
47 | var splitValue = value.Split(',');
48 | return new Vector3(float.Parse(splitValue[0]), float.Parse(splitValue[1]), float.Parse(splitValue[2]));
49 | }
50 |
51 | public static Vector4 ParseVector4(string value)
52 | {
53 | var splitValue = value.Split(',');
54 | return new Vector4(float.Parse(splitValue[0]), float.Parse(splitValue[1]), float.Parse(splitValue[2]),
55 | float.Parse(splitValue[3]));
56 | }
57 |
58 | public static bool EnumParse(string value,out TE defaultValue) where TE : struct, IConvertible
59 | {
60 | if (!typeof(TE).IsEnum) throw new ArgumentException("T must be an enumerated type");
61 | if (string.IsNullOrEmpty(value))
62 | {
63 | defaultValue = default;
64 | return false;
65 | }
66 | foreach (TE item in Enum.GetValues(typeof(TE)))
67 | {
68 | if (!item.ToString().ToLowerInvariant().Equals(value.Trim().ToLowerInvariant())) continue;
69 | defaultValue = item;
70 | return true;
71 | }
72 |
73 | defaultValue = default;
74 | return false;
75 | }
76 | }
77 | }
--------------------------------------------------------------------------------
/Assets/Scripts/DataTableExtensions/Runtime/Extensions/DataTableExtension.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c601e845617cfe64c8d3d436c1b3f042
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/Test.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bbf3ccb530784174480a3b0b206e1d03
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/Test/Procedure.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f358b7f24b95a154ea306350a8c6f617
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/Test/Procedure/ProcedureTest.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 821b8bb4ae91a4e4aab6ff335ea2dc93
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Scripts/Test/TestAsmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 756d2f3b64be6f643b4e87f5e2c8462d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/Test/TestAsmdef/Test.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Test"
3 | }
4 |
--------------------------------------------------------------------------------
/Assets/Scripts/Test/TestAsmdef/Test.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1bf2a4ff09aa0f24f979cfdebd2a7102
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Scripts/Test/TestAsmdef/TestEnum.cs:
--------------------------------------------------------------------------------
1 | namespace Test
2 | {
3 | public enum TestEnum
4 | {
5 | None,
6 | Test1,
7 | Test2,
8 | Test3,
9 | Test4,
10 | }
11 | }
--------------------------------------------------------------------------------
/Assets/Scripts/Test/TestAsmdef/TestEnum.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1b3268d83b084c559bc6772293159835
3 | timeCreated: 1618290764
--------------------------------------------------------------------------------
/Assets/Test.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5283efd156d3f324ba8cd9dd948ad6c0
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Tests.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 71db40c137c07604094d92ec3a43205f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Tests/Test.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 | using NUnit.Framework;
6 | using UnityEngine;
7 | using UnityEngine.TestTools;
8 |
9 | namespace Tests
10 | {
11 | public class Test
12 | {
13 | // A Test behaves as an ordinary method
14 | [Test]
15 | public void TestSimplePasses()
16 | {
17 | string str = File.ReadAllText(Application.dataPath+"/Test.txt");
18 | Debug.Log(ArrayToString(SplitString(str)));
19 | string ArrayToString(T[] array)
20 | {
21 | StringBuilder stringBuilder = new StringBuilder();
22 | string comma = ",";
23 | for (int i = 0; i < array.Length; i++)
24 | {
25 | string separator = (i < array.Length - 1) ? comma : string.Empty;
26 | stringBuilder.Append($"{array[i].ToString()} {separator} ");
27 | }
28 |
29 | return stringBuilder.ToString();
30 | }
31 | }
32 | public static string[] SplitString(string text)
33 | {
34 | if (text.Length<=2)
35 | {
36 | return new[] {text};
37 | }
38 |
39 | List<(int,int)> indexList = new List<(int, int)>();
40 | int start = 0;
41 | int index = 0;
42 | while (index < text.Length)
43 | {
44 | int end = text.IndexOf('"', index + 1);
45 | if (text[end-1] != '\\')
46 | {
47 | indexList.Add((start+1,end-start-1));
48 | if (end+1 < text.Length)
49 | {
50 | index = text.IndexOf('"', end+1);
51 | start = index;
52 | }
53 | else
54 | {
55 | index = text.Length;
56 | start = index;
57 | }
58 | }
59 | else
60 | {
61 | index = end;
62 | }
63 | }
64 | string[] array = new string[indexList.Count];
65 | for (var i = 0; i < indexList.Count; i++)
66 | {
67 | (int, int) value = indexList[i];
68 | array[i] = text.Substring(value.Item1, value.Item2);
69 | }
70 |
71 | return array;
72 | }
73 | // A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use
74 | // `yield return null;` to skip a frame.
75 | [UnityTest]
76 | public IEnumerator TestWithEnumeratorPasses()
77 | {
78 | // Use the Assert class to test conditions.
79 | // Use yield to skip a frame.
80 | yield return null;
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/Assets/Tests/Test.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 58538cd85e96cf841a1e8606db7c1cd2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Tests/Tests.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Tests",
3 | "optionalUnityReferences": [
4 | "TestAssemblies"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/Assets/Tests/Tests.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1150bf1b2c60a064dbf5f7baf31d85fd
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Excels/Test.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FingerCaster/UGFDataTableExtension/f509090a3797f6e0c53a84a5059913f9f5b6306d/Excels/Test.xlsx
--------------------------------------------------------------------------------
/Excels/TestDictionary.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FingerCaster/UGFDataTableExtension/f509090a3797f6e0c53a84a5059913f9f5b6306d/Excels/TestDictionary.xlsx
--------------------------------------------------------------------------------
/Excels/TestEnum.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FingerCaster/UGFDataTableExtension/f509090a3797f6e0c53a84a5059913f9f5b6306d/Excels/TestEnum.xlsx
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 FingerCaster
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 |
--------------------------------------------------------------------------------
/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Volume: 1
8 | Rolloff Scale: 1
9 | Doppler Factor: 1
10 | Default Speaker Mode: 2
11 | m_SampleRate: 0
12 | m_DSPBufferSize: 1024
13 | m_VirtualVoiceCount: 512
14 | m_RealVoiceCount: 32
15 | m_SpatializerPlugin:
16 | m_AmbisonicDecoderPlugin:
17 | m_DisableAudio: 0
18 | m_VirtualizeEffects: 1
19 | m_RequestedDSPBufferSize: 0
20 |
--------------------------------------------------------------------------------
/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 10
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0
18 | m_ClothInterCollisionStiffness: 0
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 0
23 | m_ReuseCollisionCallbacks: 0
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ContactPairsMode: 0
26 | m_BroadphaseType: 0
27 | m_WorldBounds:
28 | m_Center: {x: 0, y: 0, z: 0}
29 | m_Extent: {x: 250, y: 250, z: 250}
30 | m_WorldSubdivisions: 8
31 | m_FrictionType: 0
32 | m_EnableEnhancedDeterminism: 0
33 | m_EnableUnifiedHeightmaps: 1
34 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes: []
8 | m_configObjects: {}
9 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 9
7 | m_ExternalVersionControlSupport: Hidden Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 2
10 | m_DefaultBehaviorMode: 0
11 | m_PrefabRegularEnvironment: {fileID: 0}
12 | m_PrefabUIEnvironment: {fileID: 0}
13 | m_SpritePackerMode: 0
14 | m_SpritePackerPaddingPower: 1
15 | m_EtcTextureCompressorBehavior: 1
16 | m_EtcTextureFastCompressor: 1
17 | m_EtcTextureNormalCompressor: 2
18 | m_EtcTextureBestCompressor: 4
19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref
20 | m_ProjectGenerationRootNamespace:
21 | m_CollabEditorSettings:
22 | inProgressEnabled: 1
23 | m_EnableTextureStreamingInEditMode: 1
24 | m_EnableTextureStreamingInPlayMode: 1
25 | m_AsyncShaderCompilation: 1
26 | m_EnterPlayModeOptionsEnabled: 0
27 | m_EnterPlayModeOptions: 3
28 | m_ShowLightmapResolutionOverlay: 1
29 | m_UseLegacyProbeSampleCount: 1
30 | m_AssetPipelineMode: 1
31 | m_CacheServerMode: 0
32 | m_CacheServerEndpoint:
33 | m_CacheServerNamespacePrefix: default
34 | m_CacheServerEnableDownload: 1
35 | m_CacheServerEnableUpload: 1
36 |
--------------------------------------------------------------------------------
/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 12
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_LegacyDeferred:
17 | m_Mode: 1
18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
19 | m_DepthNormals:
20 | m_Mode: 1
21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
22 | m_MotionVectors:
23 | m_Mode: 1
24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LightHalo:
26 | m_Mode: 1
27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
28 | m_LensFlare:
29 | m_Mode: 1
30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
31 | m_AlwaysIncludedShaders:
32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
38 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
39 | m_PreloadedShaders: []
40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
41 | type: 0}
42 | m_CustomRenderPipeline: {fileID: 0}
43 | m_TransparencySortMode: 0
44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
45 | m_DefaultRenderingPath: 1
46 | m_DefaultMobileRenderingPath: 1
47 | m_TierSettings: []
48 | m_LightmapStripping: 0
49 | m_FogStripping: 0
50 | m_InstancingStripping: 0
51 | m_LightmapKeepPlain: 1
52 | m_LightmapKeepDirCombined: 1
53 | m_LightmapKeepDynamicPlain: 1
54 | m_LightmapKeepDynamicDirCombined: 1
55 | m_LightmapKeepShadowMask: 1
56 | m_LightmapKeepSubtractive: 1
57 | m_FogKeepLinear: 1
58 | m_FogKeepExp: 1
59 | m_FogKeepExp2: 1
60 | m_AlbedoSwatchInfos: []
61 | m_LightsUseLinearIntensity: 0
62 | m_LightsUseColorTemperature: 0
63 | m_LogWhenShaderIsCompiled: 0
64 |
--------------------------------------------------------------------------------
/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: 0.001
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: 0.001
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: 0.001
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: 0.001
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: 0.001
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: 0.001
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: 0.1
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: 0.1
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: 0.1
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: 0.19
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: 0.19
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: 0.001
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: 0.001
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: 0.001
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: 0.001
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: 0.001
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: 0.001
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: 0.001
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 |
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_AutoSimulation: 1
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_ReuseCollisionCallbacks: 0
46 | m_AutoSyncTransforms: 0
47 | m_AlwaysShowColliders: 0
48 | m_ShowColliderSleep: 1
49 | m_ShowColliderContacts: 0
50 | m_ShowColliderAABB: 0
51 | m_ContactArrowScale: 0.2
52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
57 |
--------------------------------------------------------------------------------
/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | m_DefaultList: []
7 |
--------------------------------------------------------------------------------
/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 5
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Very Low
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 15
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | blendWeights: 1
22 | textureQuality: 1
23 | anisotropicTextures: 0
24 | antiAliasing: 0
25 | softParticles: 0
26 | softVegetation: 0
27 | realtimeReflectionProbes: 0
28 | billboardsFaceCameraPosition: 0
29 | vSyncCount: 0
30 | lodBias: 0.3
31 | maximumLODLevel: 0
32 | streamingMipmapsActive: 0
33 | streamingMipmapsAddAllCameras: 1
34 | streamingMipmapsMemoryBudget: 512
35 | streamingMipmapsRenderersPerFrame: 512
36 | streamingMipmapsMaxLevelReduction: 2
37 | streamingMipmapsMaxFileIORequests: 1024
38 | particleRaycastBudget: 4
39 | asyncUploadTimeSlice: 2
40 | asyncUploadBufferSize: 16
41 | asyncUploadPersistentBuffer: 1
42 | resolutionScalingFixedDPIFactor: 1
43 | excludedTargetPlatforms: []
44 | - serializedVersion: 2
45 | name: Low
46 | pixelLightCount: 0
47 | shadows: 0
48 | shadowResolution: 0
49 | shadowProjection: 1
50 | shadowCascades: 1
51 | shadowDistance: 20
52 | shadowNearPlaneOffset: 3
53 | shadowCascade2Split: 0.33333334
54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
55 | shadowmaskMode: 0
56 | blendWeights: 2
57 | textureQuality: 0
58 | anisotropicTextures: 0
59 | antiAliasing: 0
60 | softParticles: 0
61 | softVegetation: 0
62 | realtimeReflectionProbes: 0
63 | billboardsFaceCameraPosition: 0
64 | vSyncCount: 0
65 | lodBias: 0.4
66 | maximumLODLevel: 0
67 | streamingMipmapsActive: 0
68 | streamingMipmapsAddAllCameras: 1
69 | streamingMipmapsMemoryBudget: 512
70 | streamingMipmapsRenderersPerFrame: 512
71 | streamingMipmapsMaxLevelReduction: 2
72 | streamingMipmapsMaxFileIORequests: 1024
73 | particleRaycastBudget: 16
74 | asyncUploadTimeSlice: 2
75 | asyncUploadBufferSize: 16
76 | asyncUploadPersistentBuffer: 1
77 | resolutionScalingFixedDPIFactor: 1
78 | excludedTargetPlatforms: []
79 | - serializedVersion: 2
80 | name: Medium
81 | pixelLightCount: 1
82 | shadows: 1
83 | shadowResolution: 0
84 | shadowProjection: 1
85 | shadowCascades: 1
86 | shadowDistance: 20
87 | shadowNearPlaneOffset: 3
88 | shadowCascade2Split: 0.33333334
89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
90 | shadowmaskMode: 0
91 | blendWeights: 2
92 | textureQuality: 0
93 | anisotropicTextures: 1
94 | antiAliasing: 0
95 | softParticles: 0
96 | softVegetation: 0
97 | realtimeReflectionProbes: 0
98 | billboardsFaceCameraPosition: 0
99 | vSyncCount: 1
100 | lodBias: 0.7
101 | maximumLODLevel: 0
102 | streamingMipmapsActive: 0
103 | streamingMipmapsAddAllCameras: 1
104 | streamingMipmapsMemoryBudget: 512
105 | streamingMipmapsRenderersPerFrame: 512
106 | streamingMipmapsMaxLevelReduction: 2
107 | streamingMipmapsMaxFileIORequests: 1024
108 | particleRaycastBudget: 64
109 | asyncUploadTimeSlice: 2
110 | asyncUploadBufferSize: 16
111 | asyncUploadPersistentBuffer: 1
112 | resolutionScalingFixedDPIFactor: 1
113 | excludedTargetPlatforms: []
114 | - serializedVersion: 2
115 | name: High
116 | pixelLightCount: 2
117 | shadows: 2
118 | shadowResolution: 1
119 | shadowProjection: 1
120 | shadowCascades: 2
121 | shadowDistance: 40
122 | shadowNearPlaneOffset: 3
123 | shadowCascade2Split: 0.33333334
124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
125 | shadowmaskMode: 1
126 | blendWeights: 2
127 | textureQuality: 0
128 | anisotropicTextures: 1
129 | antiAliasing: 0
130 | softParticles: 0
131 | softVegetation: 1
132 | realtimeReflectionProbes: 1
133 | billboardsFaceCameraPosition: 1
134 | vSyncCount: 1
135 | lodBias: 1
136 | maximumLODLevel: 0
137 | streamingMipmapsActive: 0
138 | streamingMipmapsAddAllCameras: 1
139 | streamingMipmapsMemoryBudget: 512
140 | streamingMipmapsRenderersPerFrame: 512
141 | streamingMipmapsMaxLevelReduction: 2
142 | streamingMipmapsMaxFileIORequests: 1024
143 | particleRaycastBudget: 256
144 | asyncUploadTimeSlice: 2
145 | asyncUploadBufferSize: 16
146 | asyncUploadPersistentBuffer: 1
147 | resolutionScalingFixedDPIFactor: 1
148 | excludedTargetPlatforms: []
149 | - serializedVersion: 2
150 | name: Very High
151 | pixelLightCount: 3
152 | shadows: 2
153 | shadowResolution: 2
154 | shadowProjection: 1
155 | shadowCascades: 2
156 | shadowDistance: 70
157 | shadowNearPlaneOffset: 3
158 | shadowCascade2Split: 0.33333334
159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
160 | shadowmaskMode: 1
161 | blendWeights: 4
162 | textureQuality: 0
163 | anisotropicTextures: 2
164 | antiAliasing: 2
165 | softParticles: 1
166 | softVegetation: 1
167 | realtimeReflectionProbes: 1
168 | billboardsFaceCameraPosition: 1
169 | vSyncCount: 1
170 | lodBias: 1.5
171 | maximumLODLevel: 0
172 | streamingMipmapsActive: 0
173 | streamingMipmapsAddAllCameras: 1
174 | streamingMipmapsMemoryBudget: 512
175 | streamingMipmapsRenderersPerFrame: 512
176 | streamingMipmapsMaxLevelReduction: 2
177 | streamingMipmapsMaxFileIORequests: 1024
178 | particleRaycastBudget: 1024
179 | asyncUploadTimeSlice: 2
180 | asyncUploadBufferSize: 16
181 | asyncUploadPersistentBuffer: 1
182 | resolutionScalingFixedDPIFactor: 1
183 | excludedTargetPlatforms: []
184 | - serializedVersion: 2
185 | name: Ultra
186 | pixelLightCount: 4
187 | shadows: 2
188 | shadowResolution: 2
189 | shadowProjection: 1
190 | shadowCascades: 4
191 | shadowDistance: 150
192 | shadowNearPlaneOffset: 3
193 | shadowCascade2Split: 0.33333334
194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
195 | shadowmaskMode: 1
196 | blendWeights: 4
197 | textureQuality: 0
198 | anisotropicTextures: 2
199 | antiAliasing: 2
200 | softParticles: 1
201 | softVegetation: 1
202 | realtimeReflectionProbes: 1
203 | billboardsFaceCameraPosition: 1
204 | vSyncCount: 1
205 | lodBias: 2
206 | maximumLODLevel: 0
207 | streamingMipmapsActive: 0
208 | streamingMipmapsAddAllCameras: 1
209 | streamingMipmapsMemoryBudget: 512
210 | streamingMipmapsRenderersPerFrame: 512
211 | streamingMipmapsMaxLevelReduction: 2
212 | streamingMipmapsMaxFileIORequests: 1024
213 | particleRaycastBudget: 4096
214 | asyncUploadTimeSlice: 2
215 | asyncUploadBufferSize: 16
216 | asyncUploadPersistentBuffer: 1
217 | resolutionScalingFixedDPIFactor: 1
218 | excludedTargetPlatforms: []
219 | m_PerPlatformDefaultQuality:
220 | Android: 2
221 | Lumin: 5
222 | Nintendo Switch: 5
223 | PS4: 5
224 | Standalone: 5
225 | WebGL: 3
226 | Windows Store Apps: 5
227 | XboxOne: 5
228 | iPhone: 2
229 | tvOS: 2
230 |
--------------------------------------------------------------------------------
/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 0
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_TestInitMode: 0
13 | CrashReportingSettings:
14 | m_EventUrl: https://perf-events.cloud.unity3d.com
15 | m_Enabled: 0
16 | m_LogBufferSize: 10
17 | m_CaptureEditorExceptions: 1
18 | UnityPurchasingSettings:
19 | m_Enabled: 0
20 | m_TestMode: 0
21 | UnityAnalyticsSettings:
22 | m_Enabled: 0
23 | m_TestMode: 0
24 | m_InitializeOnStartup: 1
25 | UnityAdsSettings:
26 | m_Enabled: 0
27 | m_InitializeOnStartup: 1
28 | m_TestMode: 0
29 | m_IosGameId:
30 | m_AndroidGameId:
31 | m_GameIds: {}
32 | m_GameId:
33 | PerformanceReportingSettings:
34 | m_Enabled: 0
35 |
--------------------------------------------------------------------------------
/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_RenderPipeSettingsPath:
10 | m_FixedTimeStep: 0.016666668
11 | m_MaxDeltaTime: 0.05
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 项目迁移到 [FingerCaster/UGFExtensions: 一些对UnityGameFramework的扩展 (github.com)](https://github.com/FingerCaster/UGFExtensions)
2 |
3 |
--------------------------------------------------------------------------------
/Tests.csproj.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 00b69d5277bf400fbf28db55df844ab1
3 | timeCreated: 1590976914
--------------------------------------------------------------------------------