Skip to content

Commit

Permalink
csv文件导入功能完成
Browse files Browse the repository at this point in the history
  • Loading branch information
a13782425 committed Aug 12, 2018
1 parent f4505aa commit 83b7003
Show file tree
Hide file tree
Showing 15 changed files with 476 additions and 36 deletions.
95 changes: 95 additions & 0 deletions Assets/Cube.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1002209326745940}
m_IsPrefabParent: 1
--- !u!1 &1002209326745940
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4843596935124208}
- component: {fileID: 33794275830886178}
- component: {fileID: 65534247057138830}
- component: {fileID: 23832965968962858}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4843596935124208
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1002209326745940}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.16351946, y: 2.5508344, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &23832965968962858
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1002209326745940}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &33794275830886178
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1002209326745940}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &65534247057138830
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1002209326745940}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
9 changes: 9 additions & 0 deletions Assets/Cube.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/TSDatabase.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Assets/TSDatabase/Editor/Config/Global/PrimaryKey
Binary file not shown.
64 changes: 62 additions & 2 deletions Assets/TSDatabase/Editor/Config/Global/TableConfig.asset
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ MonoBehaviour:
m_EditorClassIdentifier:
Setting:
ColumnWidth: 150
SplitVarChar: '|'
SplitListChar: ','
SplitVarChar: 124
SplitListChar: 44
CurrentLanguage: 1
TableConfigList:
- TableName: Test
Expand Down Expand Up @@ -50,3 +50,63 @@ MonoBehaviour:
HasForeignKey: 0
ForeignKeyIndex: 0
ForeignKey:
- FieldName: Vec2
Description:
FieldType: Vector2
FieldIndex: 5
GenericType: int
GenericIndex: 0
EnumIndex: 0
EnumName:
IsExport: 1
HasForeignKey: 0
ForeignKeyIndex: 0
ForeignKey:
- FieldName: Quat
Description:
FieldType: Quaternion
FieldIndex: 9
GenericType: int
GenericIndex: 0
EnumIndex: 0
EnumName:
IsExport: 1
HasForeignKey: 0
ForeignKeyIndex: 0
ForeignKey:
- FieldName: ListTest
Description:
FieldType: List
FieldIndex: 15
GenericType: int
GenericIndex: 0
EnumIndex: 0
EnumName:
IsExport: 1
HasForeignKey: 0
ForeignKeyIndex: 0
ForeignKey:
- FieldName: Obj
Description:
FieldType: GameObject
FieldIndex: 14
GenericType: int
GenericIndex: 0
EnumIndex: 0
EnumName:
IsExport: 1
HasForeignKey: 0
ForeignKeyIndex: 0
ForeignKey:
- FieldName: EnumList
Description:
FieldType: List
FieldIndex: 15
GenericType: enum
GenericIndex: 4
EnumIndex: 0
EnumName: TestEnum
IsExport: 1
HasForeignKey: 0
ForeignKeyIndex: 0
ForeignKey:
5 changes: 5 additions & 0 deletions Assets/TSDatabase/Editor/Config/Table/TestConfig.asset
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ MonoBehaviour:
- 150
- 150
- 150
- 150
- 150
- 150
- 150
- 150
ShowCount: 10
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
[System.Serializable]
public class PrimaryKeySerializeData
{
/// <summary>
/// key:表明
/// </summary>
public Dictionary<string, PrimaryKeyInfo> PrimaryKeyDic = new Dictionary<string, PrimaryKeyInfo>();

}
Expand All @@ -15,5 +18,9 @@ public class PrimaryKeyInfo
public string TableName;
public string PrimaryKey;
public string PrimaryType;
/// <summary>
/// Key:主键
/// value:出现次数
/// </summary>
public Dictionary<string, int> Values = new Dictionary<string, int>();
}
2 changes: 1 addition & 1 deletion Assets/TSDatabase/Editor/Data/Table/TestConfig.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//------------------------------------------------------------------------------------------------------------
//-----------------------------------generate file 2018-08-08 15:29:25----------------------------------------
//-----------------------------------generate file 2018-08-12 21:51:34----------------------------------------
//------------------------------------------------------------------------------------------------------------

using System.Collections.Generic;
Expand Down
Loading

0 comments on commit 83b7003

Please sign in to comment.