Compare commits
29 Commits
pgd/202504
...
pgd/202504
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cef08df8e0 | ||
|
|
7cb9a08144 | ||
|
|
99c6a0f6f1 | ||
| c27db88402 | |||
|
|
5cfad8eab4 | ||
| a24205d929 | |||
|
|
7c958faa42 | ||
|
|
e4344e538b | ||
|
|
1f525994d0 | ||
|
|
d4ead516d2 | ||
| 6bf31ac71c | |||
|
|
1cd614a45d | ||
|
|
2c3f69b0b8 | ||
| beaf61b399 | |||
|
|
1ce63b9870 | ||
|
|
7c24cb0cc3 | ||
|
|
410a3a5bb4 | ||
| afe8652786 | |||
|
|
516412f585 | ||
| 981a1685f5 | |||
| 92c7655ecb | |||
| 62f019c256 | |||
|
|
b962d25930 | ||
|
|
b87ea36afb | ||
|
|
f28d0a09a2 | ||
|
|
16fe55edc6 | ||
| 67fd6739ec | |||
|
|
807ec619e4 | ||
|
|
a63c42e968 |
71
.cursorignore
Normal file
71
.cursorignore
Normal file
@@ -0,0 +1,71 @@
|
||||
# Unity 생성 디렉토리
|
||||
/[Ll]ibrary/
|
||||
/[Tt]emp/
|
||||
/[Oo]bj/
|
||||
/[Bb]uild/
|
||||
/[Bb]uilds/
|
||||
/[Ll]ogs/
|
||||
/[Uu]ser[Ss]ettings/
|
||||
|
||||
# Unity 자동 생성 파일
|
||||
*.pidb.meta
|
||||
*.pdb.meta
|
||||
*.mdb.meta
|
||||
|
||||
# Unity3D 충돌 파일
|
||||
sysinfo.txt
|
||||
|
||||
# 빌드 결과물
|
||||
*.apk
|
||||
*.aab
|
||||
*.unitypackage
|
||||
*.app
|
||||
|
||||
# VS/VS Code 설정
|
||||
.vs/
|
||||
.vscode/
|
||||
*.csproj
|
||||
*.sln
|
||||
*.suo
|
||||
*.tmp
|
||||
*.user
|
||||
*.userprefs
|
||||
*.lock
|
||||
*.ide
|
||||
*.ide-shm
|
||||
*.ide-wal
|
||||
|
||||
# OS 생성 파일
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# 로그 파일
|
||||
*.log
|
||||
|
||||
# 임시 파일
|
||||
*.tmp
|
||||
*.temp
|
||||
*~
|
||||
|
||||
# Unity 에셋 파일
|
||||
*.fbx
|
||||
*.obj
|
||||
*.max
|
||||
*.blend
|
||||
*.dae
|
||||
*.mb
|
||||
*.ma
|
||||
|
||||
# 프로젝트 특정 설정
|
||||
/Assets/SpecialAssets/
|
||||
/Assets/Plugins/ThirdParty/
|
||||
/Assets/StreamingAssets/Config/
|
||||
|
||||
# 임시 작업 디렉토리
|
||||
_temp/
|
||||
_backup/
|
||||
@@ -1,5 +1,6 @@
|
||||
using NUnit.Framework;
|
||||
using System.Collections.Generic;
|
||||
using XED.Manage;
|
||||
|
||||
namespace XED.VirtualFactory
|
||||
{
|
||||
|
||||
@@ -9,8 +9,6 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1821569750776054505}
|
||||
- component: {fileID: 7245323945551537659}
|
||||
- component: {fileID: 2051839441129491893}
|
||||
- component: {fileID: 4636811485307056759}
|
||||
- component: {fileID: 8127948644408097011}
|
||||
m_Layer: 0
|
||||
@@ -35,43 +33,6 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7245323945551537659
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1409607586026230811}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2bb472437f31bb444ac3a380ebdd2f3f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
nodePrefab: {fileID: 2579942234611465176, guid: 5b3355ff1ae888e428ebf6ad2853e303, type: 3}
|
||||
markerPrefab: {fileID: 2579942234611465176, guid: f2ef013240a7d2548b78c9434734181a, type: 3}
|
||||
nodeSelectMode: 2
|
||||
currentlySelectedNode: {fileID: 0}
|
||||
agvNodeMap:
|
||||
maxid: 0
|
||||
agvNodeData: []
|
||||
--- !u!114 &2051839441129491893
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1409607586026230811}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a6552f9ab96d944459a5e5a6f3eb6463, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveGizmo:
|
||||
_settings:
|
||||
_canBeDisplayed: 1
|
||||
_isExpanded: 1
|
||||
_transformableLayers: -1
|
||||
target: {fileID: 0}
|
||||
--- !u!114 &4636811485307056759
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -98,6 +59,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 43c2fa2860dfa344d856558ec881bb8a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
agvPrefab: {fileID: 1505508720499862715, guid: 03eb7e95fc0cb334d848d40c49b4110e, type: 3}
|
||||
agvs: []
|
||||
fileName: Assets/AGVsLog.csv
|
||||
prf_AGV: {fileID: 0}
|
||||
prf_Spec: {fileID: 0}
|
||||
autoIndexing: 0
|
||||
|
||||
@@ -59,7 +59,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0.39215687}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
|
||||
@@ -255,6 +255,52 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 88186217}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &121134311
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 121134312}
|
||||
- component: {fileID: 121134313}
|
||||
m_Layer: 0
|
||||
m_Name: LinkDataUIManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &121134312
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 121134311}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1093055756}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &121134313
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 121134311}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: beaea798e37c61142a62ba5cecd426f2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
prf_LinkDataUI: {fileID: 3588877776299194241, guid: 9f62a52c6a3d48947b57fdd4f941a260, type: 3}
|
||||
body: {fileID: 1617081465}
|
||||
--- !u!1 &157533902
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -369,50 +415,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 157621255}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &183140327
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 183140328}
|
||||
- component: {fileID: 183140329}
|
||||
m_Layer: 0
|
||||
m_Name: InterferedObjectManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &183140328
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 183140327}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1093055756}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &183140329
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 183140327}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0c728344b2bbf5746b1a41daa8ff51b0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &205918190
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1009,7 +1011,8 @@ PrefabInstance:
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedComponents:
|
||||
- {fileID: 7997719753715833387, guid: 82511e73cbe6181438fd98254170e476, type: 3}
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
@@ -1308,6 +1311,51 @@ Transform:
|
||||
- {fileID: 741022416}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &391151067
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 391151068}
|
||||
- component: {fileID: 391151069}
|
||||
m_Layer: 0
|
||||
m_Name: Raycaster
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &391151068
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 391151067}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1093055756}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &391151069
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 391151067}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 73c8199685949fb4eb02e83a235ec68b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
uiHoverTime: 0
|
||||
--- !u!1 &394283229
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2309,51 +2357,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 502356474}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &503307893
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 503307894}
|
||||
- component: {fileID: 503307895}
|
||||
m_Layer: 0
|
||||
m_Name: Raycaster
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &503307894
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 503307893}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1093055756}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &503307895
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 503307893}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 73c8199685949fb4eb02e83a235ec68b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
uiHoverTime: 0
|
||||
--- !u!1 &535540530
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2829,6 +2832,50 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 1670299614426086028, guid: db3e2e7e03663874a9b223063e7ea2d9, type: 3}
|
||||
m_PrefabInstance: {fileID: 1976685923}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &671739450
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 671739451}
|
||||
- component: {fileID: 671739452}
|
||||
m_Layer: 0
|
||||
m_Name: UserInputManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &671739451
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 671739450}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1093055756}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &671739452
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 671739450}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6b37771737b0e1c45aa27bf9a659ee88, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &712266949
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2946,7 +2993,7 @@ GameObject:
|
||||
- component: {fileID: 749092880}
|
||||
- component: {fileID: 749092881}
|
||||
m_Layer: 0
|
||||
m_Name: GameObject
|
||||
m_Name: ManagerHub
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -3062,68 +3109,6 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 4, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1001 &812349387
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1093055756}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3963811325703941763, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: WallBuilder
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7756644939596186566, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 1.3484559
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7756644939596186566, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 3.002852
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7756644939596186566, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -2.1850286
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7756644939596186566, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7756644939596186566, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7756644939596186566, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7756644939596186566, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7756644939596186566, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7756644939596186566, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7756644939596186566, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
--- !u!4 &812349388 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 7756644939596186566, guid: a906cd4ab09260143b9d87e622d9e458, type: 3}
|
||||
m_PrefabInstance: {fileID: 812349387}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &827571245
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4328,18 +4313,13 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 1149817090}
|
||||
- {fileID: 636283413}
|
||||
- {fileID: 1451571416}
|
||||
- {fileID: 1552320077}
|
||||
- {fileID: 2021424132}
|
||||
- {fileID: 812349388}
|
||||
- {fileID: 503307894}
|
||||
- {fileID: 2057021881}
|
||||
- {fileID: 538683123}
|
||||
- {fileID: 617235297}
|
||||
- {fileID: 1801579273}
|
||||
- {fileID: 183140328}
|
||||
- {fileID: 749092880}
|
||||
- {fileID: 1683270824}
|
||||
- {fileID: 671739451}
|
||||
- {fileID: 391151068}
|
||||
- {fileID: 121134312}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1093055757
|
||||
@@ -8975,52 +8955,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1441967167}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1451571415
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1451571416}
|
||||
- component: {fileID: 1451571417}
|
||||
m_Layer: 0
|
||||
m_Name: CameraManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1451571416
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1451571415}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1093055756}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1451571417
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1451571415}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d2be0153517c66d468b831d2f067af0f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
objectViewDistance: 25
|
||||
objectViewRotation: {x: 45, y: 145, z: 0}
|
||||
--- !u!1 &1464917248
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -9185,51 +9119,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 7e770d58ca963cd42a42328ab60b8216, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1552320075
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1552320077}
|
||||
- component: {fileID: 1552320076}
|
||||
m_Layer: 0
|
||||
m_Name: CursorManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1552320076
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1552320075}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 23783baffd622ff438e68f32651014a5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
currentUseGUIWindow: {fileID: 0}
|
||||
--- !u!4 &1552320077
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1552320075}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 1244.8824, y: 617.2903, z: -1.7088666}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1093055756}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1558737740
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -9750,6 +9639,11 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 2186512387788540450, guid: 985020025db5cc04da0f50eaa5351616, type: 3}
|
||||
m_PrefabInstance: {fileID: 1615364366}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!224 &1617081465 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 940260026812176822, guid: 82511e73cbe6181438fd98254170e476, type: 3}
|
||||
m_PrefabInstance: {fileID: 297039007}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1647579088
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -9933,50 +9827,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1656807015}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1683270823
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1683270824}
|
||||
- component: {fileID: 1683270825}
|
||||
m_Layer: 0
|
||||
m_Name: UpdateRunner
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1683270824
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1683270823}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1093055756}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1683270825
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1683270823}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 40294507f68cc2942b2bef179e37eb08, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1688921138
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -10335,50 +10185,6 @@ MonoBehaviour:
|
||||
panel_topbar: {fileID: 0}
|
||||
panel_toolbar: {fileID: 0}
|
||||
panel_modecontrol: {fileID: 0}
|
||||
--- !u!1 &1801579272
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1801579273}
|
||||
- component: {fileID: 1801579274}
|
||||
m_Layer: 0
|
||||
m_Name: ProjectManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1801579273
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1801579272}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1093055756}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1801579274
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1801579272}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d3b7eb8ddaf6a2c4a94629439aa5654f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1809156807
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -11453,68 +11259,6 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
currentMode: 0
|
||||
--- !u!1001 &2057021880
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1093055756}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1409607586026230811, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: AGVNodeManager
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1821569750776054505, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1821569750776054505, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1821569750776054505, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1821569750776054505, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1821569750776054505, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1821569750776054505, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1821569750776054505, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1821569750776054505, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1821569750776054505, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1821569750776054505, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
--- !u!4 &2057021881 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 1821569750776054505, guid: 2e1f6b521b86f624a9e2eba79ecb0de5, type: 3}
|
||||
m_PrefabInstance: {fileID: 2057021880}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!224 &34056510312835704
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -108,6 +108,8 @@ namespace XED.RuntimeGizmo
|
||||
objectRotationGizmo.SetTargetObjects(selectedObjects);
|
||||
objectScaleGizmo.SetTargetObjects(selectedObjects);
|
||||
objectUniversalGizmo.SetTargetObjects(selectedObjects);
|
||||
|
||||
workGizmo.Gizmo.SetEnabled(selectedObjects.Count != 0);
|
||||
}
|
||||
private void OnGizmoDragBegin(Gizmo gizmo, int t)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace XED.Repositories
|
||||
return p != null;
|
||||
}
|
||||
|
||||
private CustomAssetData FindFromName(string name)
|
||||
public CustomAssetData FindFromName(string name)
|
||||
{
|
||||
return assetDatas.Find(data => data.assetName == name);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace XED.Util
|
||||
Show();
|
||||
}
|
||||
|
||||
OnOverlabBegin?.Invoke(GetComponent<TwinObject>(), other.GetComponent<TwinObject>());
|
||||
OnOverlabBegin?.Invoke(GetComponent<TwinObject>(), other.gameObject.GetComponent<TwinObject>());
|
||||
}
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ namespace XED.Util
|
||||
}
|
||||
}
|
||||
|
||||
OnOverlabEnd?.Invoke(GetComponent<TwinObject>(), other.GetComponent<TwinObject>());
|
||||
OnOverlabEnd?.Invoke(GetComponent<TwinObject>(), other.gameObject.GetComponent<TwinObject>());
|
||||
}
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,8 @@ using System;
|
||||
using System.Linq;
|
||||
using XED.Repositories;
|
||||
using XED.Asset;
|
||||
using Ookii.Dialogs;
|
||||
using XED.Command;
|
||||
|
||||
namespace XED.Manage
|
||||
{
|
||||
@@ -38,6 +40,7 @@ namespace XED.Manage
|
||||
messagePacker.Initialize();
|
||||
|
||||
identifier = string.IsNullOrEmpty(identifier) ? "defaultAssetData" : identifier;
|
||||
fbxAnchor = new GameObject("LocalAssetDataAnchor").transform;
|
||||
}
|
||||
public override void Init()
|
||||
{
|
||||
@@ -51,23 +54,23 @@ namespace XED.Manage
|
||||
|
||||
private void OnLoadLocalFBXDirectory(IList<ItemWithStream> list)
|
||||
{
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
if (!list[i].HasData)
|
||||
continue;
|
||||
//for (int i = 0; i < list.Count; i++)
|
||||
//{
|
||||
// if (!list[i].HasData)
|
||||
// continue;
|
||||
|
||||
var path = list[i].Name;
|
||||
Debug.Log("path " + path);
|
||||
var files = Directory.GetFiles(path, "*.fbx", SearchOption.AllDirectories);
|
||||
// var path = list[i].Name;
|
||||
// Debug.Log("path " + path);
|
||||
// var files = Directory.GetFiles(path, "*.fbx", SearchOption.AllDirectories);
|
||||
|
||||
if (dataRepo.TryGetDataFromPath(path, out var p))
|
||||
return;
|
||||
// if (dataRepo.TryGetDataFromPath(path, out var p))
|
||||
// return;
|
||||
|
||||
foreach (var file in files)
|
||||
{
|
||||
loadFilePath.Enqueue(file);
|
||||
}
|
||||
}
|
||||
// foreach (var file in files)
|
||||
// {
|
||||
// loadFilePath.Enqueue(file);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
public void SaveToLocalData(List<CustomAssetData> assetDatas, string path = "")
|
||||
@@ -86,135 +89,26 @@ namespace XED.Manage
|
||||
}
|
||||
|
||||
string path = Application.streamingAssetsPath + "/baseAssetData";
|
||||
CoroutineRunner.instance.StartCoroutine(CoroutineLoadFromLocalData(path));
|
||||
string filePath = GetLocalPath(path);
|
||||
|
||||
if (!CheckFilePathExists(filePath))
|
||||
{
|
||||
isLoadTaskComplete = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// var command = new ActivateMoveGizmoCommand(rtgController);
|
||||
//CommandInvoker.instance.Invoke(command);
|
||||
|
||||
CoroutineRunner.instance.StartCoroutine(CoroutineLoadFromLocalData(filePath));
|
||||
}
|
||||
|
||||
public CustomAssetData GetCustomAssetData(string name)
|
||||
{
|
||||
return dataRepo.FindFromPath(name);
|
||||
return dataRepo.FindFromName(name);
|
||||
//return listAssets.FirstOrDefault(x => x.name == name);
|
||||
}
|
||||
|
||||
IEnumerator CoroutineLoadLocalFiles()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
yield return new WaitUntil(() => loadFilePath.Count > 0);
|
||||
string path = loadFilePath.Dequeue();
|
||||
string name = System.IO.Path.GetFileNameWithoutExtension(path);
|
||||
|
||||
//if (listAssets.Find(x => x.name == name) != null)
|
||||
//{
|
||||
// yield return null;
|
||||
// continue;
|
||||
//}
|
||||
|
||||
if (dataRepo.TryGetDataFromName(name, out var p))
|
||||
{
|
||||
yield return null;
|
||||
continue;
|
||||
}
|
||||
|
||||
string directoryPath = Path.GetDirectoryName(path);
|
||||
string lastFolderName = Path.GetFileName(directoryPath);
|
||||
string createDate = File.GetCreationTime(path).ToShortDateString();
|
||||
string lastRevisionDate = File.GetLastAccessTime(path).ToShortDateString();
|
||||
string uploadDate = DateTime.Now.ToShortDateString();
|
||||
|
||||
GameObject newObject = new GameObject(name);
|
||||
newObject.transform.parent = fbxAnchor;
|
||||
CustomAssetData assetData = newObject.AddComponent<CustomAssetData>();
|
||||
assetData.assetName = name;
|
||||
assetData.folderName = lastFolderName;
|
||||
assetData.createDate = createDate;
|
||||
assetData.LastRevisionDate = lastRevisionDate;
|
||||
assetData.UploadDate = uploadDate;
|
||||
assetData.Creator = "xr@uvc.co.kr";
|
||||
assetData.Manager = "xr@uvc.co.kr";
|
||||
assetData.LoadLocalFBX(path);
|
||||
dataRepo.Add(assetData);
|
||||
//onLoadFbxFile?.Invoke(name, lastFolderName, assetData);
|
||||
yield return new WaitUntil(() => (assetData.isLoadComplete == true && assetData.progress == 1) || assetData.isLoadError == true);
|
||||
if (assetData.isLoadError)
|
||||
{
|
||||
dataRepo.Remove(assetData);
|
||||
ManagerHub.instance.Get<CustomAssetConnector>().assetDataHandler.OnRemoveFbxFile(name);
|
||||
//onRemoveFbxFile?.Invoke(name);
|
||||
}
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
IEnumerator CoroutineSaveToLocalData(List<CustomAssetData> assetDatas, string path)
|
||||
{
|
||||
//if (assetDatas == null || assetDatas.Count == 0)
|
||||
//{
|
||||
// assetDatas = listAssets;
|
||||
//}
|
||||
//if (assetDatas.Count == 0)
|
||||
//{
|
||||
// Debug.Log("No AssetDatas to Save");
|
||||
// isSaveTaskComplete = true;
|
||||
// yield break;
|
||||
//}
|
||||
|
||||
if (dataRepo.isEmpty)
|
||||
{
|
||||
dataRepo.AddRange(assetDatas);
|
||||
}
|
||||
|
||||
if (dataRepo.isEmpty)
|
||||
{
|
||||
Debug.Log("No AssetDatas to Save");
|
||||
isSaveTaskComplete = true;
|
||||
yield break;
|
||||
}
|
||||
|
||||
isSaveTaskComplete = false;
|
||||
List<SavedModelData> savedModels = new List<SavedModelData>();
|
||||
List<ThumbnailData> thumbnails = new List<ThumbnailData>();
|
||||
RuntimePreviewGenerator.BackgroundColor = Color.clear;
|
||||
RuntimePreviewGenerator.OrthographicMode = true;
|
||||
|
||||
for (int i = 0; i < assetDatas.Count; i++)
|
||||
{
|
||||
var modelData = ConvertToSaveData(assetDatas[i]);
|
||||
Texture2D thumbnail = RuntimePreviewGenerator.GenerateModelPreview(assetDatas[i].loadedObject.transform, 320, 200);
|
||||
thumbnail = thumbnail.MakeReadableTexture();
|
||||
thumbnails.Add(new ThumbnailData(thumbnail.EncodeToPNG()));
|
||||
savedModels.Add(modelData);
|
||||
}
|
||||
saveData.modelDatas = savedModels.ToArray();
|
||||
saveData.textureDatas = sharedMaterial.textureDatas.ToArray();
|
||||
saveData.thumbnailDatas = thumbnails.ToArray();
|
||||
yield return null;
|
||||
|
||||
//Task task = SaveAsync(identifier, saveData);
|
||||
|
||||
string filePath = string.IsNullOrEmpty(path) ? Path.Combine(Application.persistentDataPath, identifier) : path;
|
||||
Task task = Task.Run(() => messagePacker.SaveAsync(filePath, saveData));
|
||||
|
||||
yield return new WaitUntil(() => task.IsCompleted);
|
||||
isSaveTaskComplete = true;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
SavedModelData ConvertToSaveData(CustomAssetData assetData)
|
||||
{
|
||||
SavedModelData modelData = new SavedModelData();
|
||||
modelData.SaveData(assetData.loadedObject, sharedMaterial);
|
||||
//갯수 제한 없음 원하는 만큼 조절 가능. 테스트로 10개만 지정
|
||||
modelData.attributes = new string[7][];
|
||||
modelData.attributes[0] = new string[] { "assetName", assetData.assetName };
|
||||
modelData.attributes[1] = new string[] { "folderName", assetData.folderName };
|
||||
|
||||
modelData.attributes[2] = new string[] { "createDate", assetData.createDate };
|
||||
modelData.attributes[3] = new string[] { "LastRevisionDate", assetData.LastRevisionDate };
|
||||
modelData.attributes[4] = new string[] { "UploadDate", assetData.UploadDate };
|
||||
modelData.attributes[5] = new string[] { "Creator", assetData.createDate };
|
||||
modelData.attributes[6] = new string[] { "Manager", assetData.Manager };
|
||||
return modelData;
|
||||
}
|
||||
|
||||
string GetLocalPath(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
@@ -236,25 +130,9 @@ namespace XED.Manage
|
||||
return true;
|
||||
}
|
||||
|
||||
IEnumerator CoroutineLoadFromLocalData(string path)
|
||||
IEnumerator CoroutineLoadFromLocalData(string filePath)
|
||||
{
|
||||
isLoadTaskComplete = false;
|
||||
float loadTime = 0;
|
||||
|
||||
//string filePath = string.IsNullOrEmpty(path) ? Path.Combine(Application.persistentDataPath, identifier) : path;
|
||||
string filePath = GetLocalPath(path);
|
||||
|
||||
if (!CheckFilePathExists(filePath))
|
||||
{
|
||||
isLoadTaskComplete = true;
|
||||
yield break;
|
||||
}
|
||||
//if (!System.IO.File.Exists(filePath))
|
||||
//{
|
||||
// Debug.Log("No File Found At : " + filePath);
|
||||
// isLoadTaskComplete = true;
|
||||
// yield break;
|
||||
//}
|
||||
|
||||
Task<SaveData> task = Task<SaveData>.Run(() => messagePacker.LoadAsync(filePath));
|
||||
yield return new WaitUntil(() => task.IsCompleted);
|
||||
@@ -266,72 +144,19 @@ namespace XED.Manage
|
||||
isLoadTaskComplete = true;
|
||||
yield break;
|
||||
}
|
||||
|
||||
saveData = task.Result;
|
||||
for (int i = 0; i < saveData.textureDatas.Length; i++)
|
||||
{
|
||||
TextureData texData = saveData.textureDatas[i];
|
||||
sharedMaterial.AddTextureData(texData);
|
||||
loadTime += Time.deltaTime;
|
||||
if (loadTime > 1.0f / 30.0f)
|
||||
{
|
||||
loadTime = 0;
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < saveData.modelDatas.Length; i++)
|
||||
{
|
||||
if (!LoadSaveData(saveData, i))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
loadTime += Time.deltaTime;
|
||||
if (loadTime > 1.0f / 30.0f)
|
||||
{
|
||||
loadTime = 0;
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
// float loadTime = 0f;
|
||||
|
||||
|
||||
var command = new LoadLocalTextureDataCommand(sharedMaterial, saveData.textureDatas);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
|
||||
|
||||
var command2 = new LoadLocalModelDataCommand(saveData, dataRepo, fbxAnchor, sharedMaterial);
|
||||
CommandInvoker.instance.Invoke(command2);
|
||||
|
||||
isLoadTaskComplete = true;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
bool LoadSaveData(SaveData saveData, int index)
|
||||
{
|
||||
var modelData = saveData.modelDatas[index];
|
||||
string assetName = modelData.attributes.FirstOrDefault(x => x[0].Equals("assetName"))?[1];
|
||||
|
||||
if (dataRepo.TryGetDataFromName(assetName, out var p))
|
||||
return false;
|
||||
|
||||
string folderName = modelData.attributes.FirstOrDefault(x => x[0].Equals("folderName"))?[1];
|
||||
string createDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("createDate"))?[1];
|
||||
string lastRevisionDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("lastRevisionDate"))?[1];
|
||||
string uploadDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("uploadDate"))?[1];
|
||||
string creator = modelData.attributes.FirstOrDefault(x => x[0].Equals("creator"))?[1];
|
||||
string manager = modelData.attributes.FirstOrDefault(x => x[0].Equals("manager"))?[1];
|
||||
|
||||
Texture2D thumbnail = new Texture2D(1, 1);
|
||||
thumbnail.LoadImage(saveData.thumbnailDatas[index].data);
|
||||
GameObject newObject = new GameObject(assetName);
|
||||
newObject.transform.parent = fbxAnchor;
|
||||
CustomAssetData assetData = newObject.AddComponent<CustomAssetData>();
|
||||
assetData.assetName = assetName;
|
||||
assetData.folderName = folderName;
|
||||
assetData.createDate = createDate;
|
||||
assetData.LastRevisionDate = lastRevisionDate;
|
||||
assetData.UploadDate = uploadDate;
|
||||
assetData.Creator = creator;
|
||||
assetData.Manager = manager;
|
||||
assetData.loadedObject = modelData.LoadModelData(sharedMaterial);
|
||||
assetData.thumbnail = thumbnail;
|
||||
assetData.OnLoadComplete();
|
||||
|
||||
dataRepo.Add(assetData);
|
||||
//listAssets.Add(assetData);
|
||||
ManagerHub.instance.Get<CustomAssetConnector>().assetDataHandler.OnLoadFbxFile(assetData.assetName, assetData.folderName, assetData);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,15 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.EventSystems;
|
||||
using XED.Asset;
|
||||
using XED.Command;
|
||||
using XED.Core;
|
||||
using XED.DataStructures;
|
||||
using XED.Interfaces;
|
||||
using XED.Manage;
|
||||
using XED.RuntimeGizmo;
|
||||
using XED.RuntimeGizmo;
|
||||
|
||||
namespace XED.Util
|
||||
{
|
||||
@@ -24,6 +22,7 @@ namespace XED.Util
|
||||
CustomAssetRenderObject prevSelectedObject;
|
||||
RTGController rtgController;
|
||||
ConvexHullCalculator convexHullCalculator = new ConvexHullCalculator();
|
||||
UserInputManager userInputManager;
|
||||
Vector3 clickBeginPos;
|
||||
float clickLengthThreshold = 5.0f;
|
||||
int uiLayer;
|
||||
@@ -37,7 +36,10 @@ namespace XED.Util
|
||||
rtgController.onTransformBegin = OnTransformBegin;
|
||||
rtgController.onTransformChanged = OnTransformChangedFromRTG;
|
||||
uiLayer = LayerMask.NameToLayer("UI");
|
||||
//var inputManager = FindSingle<UserInputManager>();
|
||||
userInputManager = GameObject.FindAnyObjectByType<UserInputManager>();
|
||||
var statusPanel = GameObject.FindFirstObjectByType<ModePanel>();
|
||||
statusPanel.AddController(this);
|
||||
|
||||
selectIndex = 0;
|
||||
}
|
||||
|
||||
@@ -214,19 +216,23 @@ namespace XED.Util
|
||||
}
|
||||
public void ResetRTG()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.None);
|
||||
var command = new ResetGizmoCommand(rtgController);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
public void SetRTGMove()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Move);
|
||||
var command = new ActivateMoveGizmoCommand(rtgController);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
public void SetRTGScale()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Scale);
|
||||
var command = new ActivateScaleGizmoCommand(rtgController);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
public void SetRTGRotate()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Rotate);
|
||||
var command = new ActivateRotateGizmoCommand(rtgController);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
public void OnTransformBegin()
|
||||
{
|
||||
@@ -260,7 +266,7 @@ namespace XED.Util
|
||||
if (selectedRenderObjects.Count == 0)
|
||||
return;
|
||||
|
||||
ManagerHub.instance.Get<CustomAssetConnector>().OnCopyObject(copyRenderObjects);
|
||||
ManagerHub.instance.Get<CustomAssetConnector>().OnCopyObject(selectedRenderObjects);
|
||||
}
|
||||
public void SaveItemsToCopy()
|
||||
{
|
||||
@@ -419,12 +425,12 @@ namespace XED.Util
|
||||
|
||||
public void StatusEnterEvent()
|
||||
{
|
||||
ManagerHub.instance.Get<UserInputManager>().SetHandler(myHandler);
|
||||
userInputManager.SetHandler(myHandler);
|
||||
}
|
||||
|
||||
public void StatusExitEvent()
|
||||
{
|
||||
ManagerHub.instance.Get<UserInputManager>().RemoveHandler(myHandler);
|
||||
userInputManager .RemoveHandler(myHandler);
|
||||
}
|
||||
|
||||
public InputHandler GetInputHandler()
|
||||
|
||||
8
Assets/Scripts/Studio/Command/CameraCommand.meta
Normal file
8
Assets/Scripts/Studio/Command/CameraCommand.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 553a24c445d45734e93db3694688a065
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using XED.Command;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
public class MoveToTargetCommand : IIrreversibleCommand
|
||||
{
|
||||
private Transform target;
|
||||
private Vector3 viewAngle;
|
||||
private float cameraDistance;
|
||||
|
||||
public MoveToTargetCommand(Transform target, Vector3 viewAngle, float cameraDistance)
|
||||
{
|
||||
this.target = target;
|
||||
this.viewAngle = viewAngle;
|
||||
this.cameraDistance = cameraDistance;
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
Camera.main.transform.rotation = Quaternion.Euler(viewAngle);
|
||||
|
||||
Camera.main.transform.position = target.position;
|
||||
Camera.main.transform.position += -Camera.main.transform.forward * cameraDistance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: af71595b728196a4391585fa1be345c8
|
||||
8
Assets/Scripts/Studio/Command/FileCommand.meta
Normal file
8
Assets/Scripts/Studio/Command/FileCommand.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0344068c97e98f2499c3ef328e804d1c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,94 @@
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using XED.Asset;
|
||||
using XED.Manage;
|
||||
using XED.Repositories;
|
||||
using XED.Util;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class LoadLocalModelDataCommand : IIrreversibleCommand
|
||||
{
|
||||
private SaveData saveData;
|
||||
private CustomAssetDataRepository dataRepo;
|
||||
private Transform fbxAnchor;
|
||||
private SharedMaterial sharedMaterial;
|
||||
|
||||
float loadTime = 0f;
|
||||
|
||||
public LoadLocalModelDataCommand(SaveData saveData, CustomAssetDataRepository dataRepo, Transform fbxAnchor, SharedMaterial sharedMaterial)
|
||||
{
|
||||
this.saveData = saveData;
|
||||
this.dataRepo = dataRepo;
|
||||
this.fbxAnchor = fbxAnchor;
|
||||
this.sharedMaterial = sharedMaterial;
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
for (int i = 0; i < saveData.modelDatas.Length; i++)
|
||||
{
|
||||
CoroutineRunner.instance.StartCoroutine(LoadModelData(i));
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator LoadModelData(int index)
|
||||
{
|
||||
if (!LoadSaveData(saveData, index))
|
||||
yield break;
|
||||
|
||||
loadTime += Time.deltaTime;
|
||||
if (loadTime > 1f / 30f)
|
||||
{
|
||||
loadTime = 0f;
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
bool LoadSaveData(SaveData saveData, int index)
|
||||
{
|
||||
var modelData = saveData.modelDatas[index];
|
||||
string assetName = modelData.attributes.FirstOrDefault(x => x[0].Equals("assetName"))?[1];
|
||||
|
||||
if (dataRepo.TryGetDataFromName(assetName, out var p))
|
||||
return false;
|
||||
|
||||
string folderName = modelData.attributes.FirstOrDefault(x => x[0].Equals("folderName"))?[1];
|
||||
string createDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("createDate"))?[1];
|
||||
string lastRevisionDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("lastRevisionDate"))?[1];
|
||||
string uploadDate = modelData.attributes.FirstOrDefault(x => x[0].Equals("uploadDate"))?[1];
|
||||
string creator = modelData.attributes.FirstOrDefault(x => x[0].Equals("creator"))?[1];
|
||||
string manager = modelData.attributes.FirstOrDefault(x => x[0].Equals("manager"))?[1];
|
||||
|
||||
Texture2D thumbnail = new Texture2D(1, 1);
|
||||
thumbnail.LoadImage(saveData.thumbnailDatas[index].data);
|
||||
GameObject newObject = new GameObject(assetName);
|
||||
newObject.transform.parent = fbxAnchor;
|
||||
CustomAssetData assetData = newObject.AddComponent<CustomAssetData>();
|
||||
assetData.assetName = assetName;
|
||||
assetData.folderName = folderName;
|
||||
assetData.createDate = createDate;
|
||||
assetData.LastRevisionDate = lastRevisionDate;
|
||||
assetData.UploadDate = uploadDate;
|
||||
assetData.Creator = creator;
|
||||
assetData.Manager = manager;
|
||||
assetData.loadedObject = modelData.LoadModelData(sharedMaterial);
|
||||
assetData.thumbnail = thumbnail;
|
||||
assetData.OnLoadComplete();
|
||||
|
||||
dataRepo.Add(assetData);
|
||||
//listAssets.Add(assetData);
|
||||
ManagerHub.instance.Get<CustomAssetConnector>().assetDataHandler.OnLoadFbxFile(assetData.assetName, assetData.folderName, assetData);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34c7091e151c4654f80f16448c43f36d
|
||||
@@ -0,0 +1,50 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using XED.Manage;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class LoadLocalTextureDataCommand : IIrreversibleCommand
|
||||
{
|
||||
private SharedMaterial sharedMaterial;
|
||||
private TextureData[] textureData;
|
||||
|
||||
float loadTime = 0f;
|
||||
|
||||
public LoadLocalTextureDataCommand(SharedMaterial sharedMaterial, TextureData[] textureData)
|
||||
{
|
||||
this.sharedMaterial = sharedMaterial;
|
||||
this.textureData = textureData;
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
foreach (var tex in textureData)
|
||||
{
|
||||
CoroutineRunner.instance.StartCoroutine(LoadTextureData(tex));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
IEnumerator LoadTextureData(TextureData texData)
|
||||
{
|
||||
sharedMaterial.AddTextureData(texData);
|
||||
|
||||
loadTime += Time.deltaTime;
|
||||
if (loadTime > 1f / 30f)
|
||||
{
|
||||
loadTime = 0f;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
// yield return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 243104ea078b0364e811f6803ef3b3b2
|
||||
8
Assets/Scripts/Studio/Command/GizmoCommand.meta
Normal file
8
Assets/Scripts/Studio/Command/GizmoCommand.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58c7bd081b97acf42a09b5b4ef1d3fad
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,26 @@
|
||||
using XED.RuntimeGizmo;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class ActivateMoveGizmoCommand : IIrreversibleCommand
|
||||
{
|
||||
private RTGController rtgController;
|
||||
|
||||
public ActivateMoveGizmoCommand(RTGController rtgController)
|
||||
{
|
||||
this.rtgController = rtgController;
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Move);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96806282dbad1954fb33e13354823e92
|
||||
@@ -0,0 +1,26 @@
|
||||
using XED.RuntimeGizmo;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class ActivateRotateGizmoCommand : IIrreversibleCommand
|
||||
{
|
||||
private RTGController rtgController;
|
||||
|
||||
public ActivateRotateGizmoCommand(RTGController rtgController)
|
||||
{
|
||||
this.rtgController = rtgController;
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Rotate);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b70e099d374f64847834ff12c191bd91
|
||||
@@ -0,0 +1,26 @@
|
||||
using XED.RuntimeGizmo;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class ActivateScaleGizmoCommand : IIrreversibleCommand
|
||||
{
|
||||
private RTGController rtgController;
|
||||
|
||||
public ActivateScaleGizmoCommand(RTGController rtgController)
|
||||
{
|
||||
this.rtgController = rtgController;
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8959657a6330abd448297620191164d5
|
||||
@@ -0,0 +1,26 @@
|
||||
using XED.RuntimeGizmo;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class ResetGizmoCommand : IIrreversibleCommand
|
||||
{
|
||||
private RTGController rtgController;
|
||||
|
||||
public ResetGizmoCommand(RTGController rtgController)
|
||||
{
|
||||
this.rtgController = rtgController;
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d2c3f6f335592d4e888a96dbd9903d3
|
||||
8
Assets/Scripts/Studio/Command/ProjectCommand.meta
Normal file
8
Assets/Scripts/Studio/Command/ProjectCommand.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cee17c4be8819da47a5eb95110ec3455
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,62 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using XED.Asset;
|
||||
using XED.HierarchyTree;
|
||||
using XED.Util;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class LoadProjectCommand : IIrreversibleCommand
|
||||
{
|
||||
private List<AssetData> assets;
|
||||
private CustomAssetConnector connector;
|
||||
|
||||
Dictionary<int, HierarchyItem> itemDict = new Dictionary<int, HierarchyItem>();
|
||||
|
||||
public LoadProjectCommand(List<AssetData> assets, CustomAssetConnector connector)
|
||||
{
|
||||
this.assets = assets;
|
||||
this.connector = connector;
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
foreach (AssetData asset in assets)
|
||||
{
|
||||
LoadAsset(asset);
|
||||
}
|
||||
|
||||
foreach (AssetData asset in assets)
|
||||
{
|
||||
RestoreHierarchy(asset);
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadAsset(AssetData asset)
|
||||
{
|
||||
connector.OnLoadAsset(asset);
|
||||
itemDict.Add(asset.id, connector.connectedAssets.Last().hierarchyItem);
|
||||
}
|
||||
|
||||
private void RestoreHierarchy(AssetData asset)
|
||||
{
|
||||
foreach (int id in asset.children)
|
||||
{
|
||||
HierarchyItem parent = itemDict[asset.id];
|
||||
HierarchyItem child = itemDict[id];
|
||||
|
||||
if (parent == null || child == null)
|
||||
continue;
|
||||
|
||||
connector.OnRestoreHierarchy(parent, child);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58dff3fed88a2eb4fab1bc8116f0c170
|
||||
@@ -0,0 +1,27 @@
|
||||
using XED.Asset;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class NewProjectCommand : IIrreversibleCommand
|
||||
{
|
||||
CustomAssetConnector connector;
|
||||
|
||||
public NewProjectCommand(CustomAssetConnector connector)
|
||||
{
|
||||
this.connector = connector;
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
connector.ClearObjects();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16f7564790f59584283a83911585ada8
|
||||
@@ -0,0 +1,36 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.IO;
|
||||
using XED.Command;
|
||||
using XED.Util;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
public class SaveProjectCommand : IIrreversibleCommand
|
||||
{
|
||||
private string projectPath;
|
||||
private ProjectData projectData;
|
||||
|
||||
|
||||
public SaveProjectCommand(string projectPath, ProjectData projectData)
|
||||
{
|
||||
this.projectPath = projectPath;
|
||||
this.projectData = projectData;
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
string json = JsonConvert.SerializeObject(projectData);
|
||||
FileStream fs = new FileStream(projectPath, FileMode.Create, FileAccess.Write);
|
||||
StreamWriter writer = new StreamWriter(fs, System.Text.Encoding.Unicode);
|
||||
writer.Write(json);
|
||||
writer.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91703b89f5f43354d9d896c2f4b8dcde
|
||||
34
Assets/Scripts/Studio/DataStructures/Enums.cs
Normal file
34
Assets/Scripts/Studio/DataStructures/Enums.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
public static class Enums
|
||||
{
|
||||
public enum NodeSelectMode
|
||||
{
|
||||
Idle,
|
||||
Draw,
|
||||
SelectRunNode,
|
||||
Select,
|
||||
Setting
|
||||
}
|
||||
|
||||
public enum VirtualPoint
|
||||
{
|
||||
LeftTop,
|
||||
LeftBottom,
|
||||
RightTop,
|
||||
RightBottom,
|
||||
LeftCenter,
|
||||
RightCenter,
|
||||
}
|
||||
|
||||
public enum BuilderState
|
||||
{
|
||||
None,
|
||||
PointModfiy,
|
||||
PointRemove,
|
||||
Drawing
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Studio/DataStructures/Enums.cs.meta
Normal file
2
Assets/Scripts/Studio/DataStructures/Enums.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca60beab57bc28c4ba8d59f3593937b2
|
||||
@@ -5,9 +5,9 @@ using TriLibCore.Dae.Schema;
|
||||
using UnityEngine;
|
||||
using XRLib;
|
||||
|
||||
namespace XED
|
||||
namespace XED.Manage
|
||||
{
|
||||
public class MeshCreator : MonoBehaviour,ISingle
|
||||
public class MeshCreator : Manager
|
||||
{
|
||||
Vector3[] vertices;
|
||||
int[] triangles;
|
||||
@@ -15,6 +15,11 @@ namespace XED
|
||||
private MeshFilter meshfilter;
|
||||
//private Vector3 offset = Vector3.zero;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void MeshDeformer<T>(HashSet<T> type)
|
||||
{
|
||||
if(type is HashSet<Floor>)
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using UnityEngine;
|
||||
using XRLib;
|
||||
using static XED.WallBuilder;
|
||||
using static XED.Enums;
|
||||
using Color = UnityEngine.Color;
|
||||
|
||||
namespace XED
|
||||
|
||||
@@ -9,28 +9,13 @@ using XRLib;
|
||||
using XED.Interfaces;
|
||||
using XED.Manage;
|
||||
using XED.RuntimeGizmo;
|
||||
using Object = UnityEngine.Object;
|
||||
using static XED.Enums;
|
||||
|
||||
namespace XED
|
||||
namespace XED.Manage
|
||||
{
|
||||
public class WallBuilder : MonoBehaviour, ISingle, IInputHandler, IModeController
|
||||
public class WallBuilder : Manager, IInputHandler, IModeController
|
||||
{
|
||||
public enum VirtualPoint
|
||||
{
|
||||
LeftTop,
|
||||
LeftBottom,
|
||||
RightTop,
|
||||
RightBottom,
|
||||
LeftCenter,
|
||||
RightCenter,
|
||||
}
|
||||
public enum BuilderState
|
||||
{
|
||||
None,
|
||||
PointModfiy,
|
||||
PointRemove,
|
||||
Drawing
|
||||
}
|
||||
|
||||
public float thickness;
|
||||
private GameObject renderParent;
|
||||
private Material lineMat;
|
||||
@@ -69,6 +54,9 @@ namespace XED
|
||||
|
||||
internal event Action onDrawStart;
|
||||
private MeshCreator meshCreator;
|
||||
private UserInputManager userInputManager;
|
||||
private Raycaster raycaster;
|
||||
|
||||
public class Group
|
||||
{
|
||||
public List<LinePoint> points = new();
|
||||
@@ -81,7 +69,8 @@ namespace XED
|
||||
wallLines.Add(wallLine);
|
||||
}
|
||||
}
|
||||
public override void AfterAwake()
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
renderParent = new GameObject("LineRenderParent");
|
||||
lineMat = Resources.Load<Material>("Materials/Mat_LineRender");
|
||||
@@ -90,7 +79,9 @@ namespace XED
|
||||
prf_Wall = Resources.Load<Wall>("Prefabs/PRF_Wall");
|
||||
prf_WallGroup = Resources.Load<WallGroup>("Prefabs/PRF_WallGroup");
|
||||
|
||||
meshCreator = FindSingle<MeshCreator>();
|
||||
meshCreator = ManagerHub.instance.Get<MeshCreator>();
|
||||
userInputManager = GameObject.FindAnyObjectByType<UserInputManager>();
|
||||
raycaster = GameObject.FindAnyObjectByType<Raycaster>();
|
||||
handler = GetInputHandler();
|
||||
}
|
||||
|
||||
@@ -146,14 +137,14 @@ namespace XED
|
||||
{
|
||||
//ToDo..연결된 포인트가 없는 Point찾아서 제거
|
||||
DisconnectLine(removeWalls[i]);
|
||||
Destroy(removeWalls[i].gameObject);
|
||||
Object.Destroy(removeWalls[i].gameObject);
|
||||
}
|
||||
Remove(lp);
|
||||
}
|
||||
|
||||
public LinePoint CreateLinePoint(Vector3 pos)
|
||||
{
|
||||
var result = Instantiate(prf_LinePoint);
|
||||
var result = Object.Instantiate(prf_LinePoint);
|
||||
result.transform.SetParent(renderParent.transform);
|
||||
result.name = cc++.ToString();
|
||||
result.transform.position = pos;
|
||||
@@ -175,7 +166,7 @@ namespace XED
|
||||
|
||||
private Wall CreateWall(LinePoint lcp, LinePoint rcp)
|
||||
{
|
||||
var result = Instantiate(prf_Wall);
|
||||
var result = Object.Instantiate(prf_Wall);
|
||||
result.Generate(lcp, rcp, lineMat, thickness);
|
||||
result.name = "WallLine" + index++;
|
||||
walls.Add(result);
|
||||
@@ -339,7 +330,7 @@ namespace XED
|
||||
{
|
||||
linePoints.Remove(lp);
|
||||
pointToWall.Remove(lp);
|
||||
Destroy(lp.gameObject);
|
||||
Object.Destroy(lp.gameObject);
|
||||
}
|
||||
|
||||
void BuildWall(Vector3 endPos)
|
||||
@@ -426,7 +417,7 @@ namespace XED
|
||||
pointToWall.Remove(rcp);
|
||||
}
|
||||
wall.Deselect();
|
||||
Destroy(wall.gameObject);
|
||||
Object.Destroy(wall.gameObject);
|
||||
}
|
||||
|
||||
Wall BuildContinuesWall(Vector3 p)
|
||||
@@ -684,7 +675,7 @@ namespace XED
|
||||
|
||||
private WallGroup CreateWallGroup()
|
||||
{
|
||||
var group = Instantiate(prf_WallGroup);
|
||||
var group = Object.Instantiate(prf_WallGroup);
|
||||
|
||||
groupTable.Add(group, new());
|
||||
wallgroups.Add(group);
|
||||
@@ -996,21 +987,19 @@ namespace XED
|
||||
|
||||
public void StatusEnterEvent()
|
||||
{
|
||||
var raycaster = FindSingle<Raycaster>();
|
||||
raycaster.AddEvent(Raycaster.EventType.FirstStay, typeof (Map), OnStayMap);
|
||||
raycaster.AddEvent(Raycaster.EventType.FirstClick, typeof(Map), OnClickMap);
|
||||
raycaster.AddEvent(Raycaster.EventType.FirstClick, typeof(LinePoint), OnClickLinePoint);
|
||||
raycaster.AddEvent(Raycaster.EventType.FirstClick, typeof(LinePoint), OnClickLinePoint);
|
||||
|
||||
ManagerHub.instance.Get<UserInputManager>().SetHandler(handler);
|
||||
userInputManager.SetHandler(handler);
|
||||
}
|
||||
|
||||
public void StatusExitEvent()
|
||||
{
|
||||
var raycaster = FindSingle<Raycaster>();
|
||||
raycaster.RemoveEvent(Raycaster.EventType.FirstStay, typeof(Map), OnStayMap);
|
||||
raycaster.RemoveEvent(Raycaster.EventType.FirstClick, typeof(Map), OnClickMap);
|
||||
raycaster.RemoveEvent(Raycaster.EventType.FirstClick, typeof(LinePoint), OnClickLinePoint);
|
||||
ManagerHub.instance.Get<UserInputManager>().RemoveHandler(handler);
|
||||
userInputManager.RemoveHandler(handler);
|
||||
}
|
||||
|
||||
void Pointing()
|
||||
@@ -1026,7 +1015,7 @@ namespace XED
|
||||
linePoints.Remove(handlePoint);
|
||||
pointToWall.Remove(handlePoint);
|
||||
handlePoint.Release();
|
||||
Destroy(handlePoint.gameObject);
|
||||
Object.Destroy(handlePoint.gameObject);
|
||||
}
|
||||
|
||||
if (pilePoint != null)
|
||||
@@ -1044,7 +1033,7 @@ namespace XED
|
||||
{
|
||||
walls.Remove(tempWall);
|
||||
tempWall.Release();
|
||||
Destroy(tempWall.gameObject);
|
||||
Object.Destroy(tempWall.gameObject);
|
||||
}
|
||||
|
||||
tempWall = null;
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XED.VirtualFactory;
|
||||
using XRLib;
|
||||
|
||||
namespace XED.VirtualFactory
|
||||
namespace XED.Manage
|
||||
{
|
||||
public class AGVManager : MonoBehaviour, ISingle
|
||||
public class AGVManager : Manager
|
||||
{
|
||||
public AGV prf_AGV;
|
||||
public AGVSpec prf_Spec;
|
||||
public HashSet<AGV> agvs = new();
|
||||
public bool autoIndexing;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public bool TryGetIdleAGV(out AGV result)
|
||||
{
|
||||
//Debug.Log($"Try Get Idle AGV");
|
||||
@@ -30,7 +37,7 @@ namespace XED.VirtualFactory
|
||||
|
||||
public AGV CreateEmptyAGV()
|
||||
{
|
||||
var agv = Instantiate(prf_AGV);
|
||||
var agv = UnityEngine.Object.Instantiate(prf_AGV);
|
||||
agvs.Add(agv);
|
||||
|
||||
if (autoIndexing)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XRLib;
|
||||
using XED.VirtualFactory;
|
||||
|
||||
namespace XED.VirtualFactory
|
||||
namespace XED.Manage
|
||||
{
|
||||
public class AGVNodeLinkManager : MonoBehaviour,ISingle
|
||||
public class AGVNodeLinkManager : Manager
|
||||
{
|
||||
public HashSet<Pair<AGVNode>> linkedNode = new HashSet<Pair<AGVNode>>();
|
||||
private Dictionary<Pair<AGVNode>, GameObject> lineObjects = new Dictionary<Pair<AGVNode>, GameObject>();
|
||||
@@ -14,6 +14,11 @@ namespace XED.VirtualFactory
|
||||
[SerializeField]
|
||||
Material lineMat;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AddLines(List<AGVNode> nodeList)
|
||||
{
|
||||
for (int i = 0; i < nodeList.Count; i++)
|
||||
@@ -100,7 +105,7 @@ namespace XED.VirtualFactory
|
||||
{
|
||||
if (lineObjects.ContainsKey(pair))
|
||||
{
|
||||
Destroy(lineObjects[pair]);
|
||||
Object.Destroy(lineObjects[pair]);
|
||||
lineObjects.Remove(pair);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,27 +1,20 @@
|
||||
using Newtonsoft.Json;
|
||||
using Ookii.Dialogs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using TriLibCore.SFB;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using XRLib;
|
||||
using XED.Interfaces;
|
||||
using XED.Manage;
|
||||
using XED.VirtualFactory;
|
||||
using XED.Asset;
|
||||
using Object = UnityEngine.Object;
|
||||
using static XED.Enums;
|
||||
|
||||
namespace XED.VirtualFactory
|
||||
namespace XED.Manage
|
||||
{
|
||||
public enum NodeSelectMode
|
||||
{
|
||||
Idle,
|
||||
Draw,
|
||||
SelectRunNode,
|
||||
Select,
|
||||
Setting
|
||||
}
|
||||
public class AGVNodeManager : MonoBehaviour, ISingle, IModeController, IInputHandler
|
||||
|
||||
public class AGVNodeManager : Manager, IModeController, IInputHandler
|
||||
{
|
||||
[SerializeField]
|
||||
GameObject nodePrefab;
|
||||
@@ -50,14 +43,18 @@ namespace XED.VirtualFactory
|
||||
List<AGVNode> selectedNodeSequence = new List<AGVNode>();
|
||||
InputHandler myHandler;
|
||||
NodeGizmoController nodeGizmoController;
|
||||
UserInputManager userInputManager;
|
||||
Raycaster raycaster;
|
||||
|
||||
public ModePanel.ProgramMode mode => ModePanel.ProgramMode.AGVPathDrawing;
|
||||
|
||||
public override void AfterStart()
|
||||
public override void Init()
|
||||
{
|
||||
agvNodeMap = new AGVNodeMap();
|
||||
myHandler = GetInputHandler();
|
||||
nodeGizmoController = FindSingle<NodeGizmoController>();
|
||||
nodeGizmoController = ManagerHub.instance.Get<NodeGizmoController>();
|
||||
userInputManager = GameObject.FindAnyObjectByType<UserInputManager>();
|
||||
raycaster = GameObject.FindAnyObjectByType<Raycaster>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
@@ -200,13 +197,13 @@ namespace XED.VirtualFactory
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
nodeTarget = Instantiate(markerPrefab);
|
||||
nodeTarget = Object.Instantiate(markerPrefab);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nodeTarget)
|
||||
{
|
||||
Destroy(nodeTarget);
|
||||
Object.Destroy(nodeTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -226,7 +223,7 @@ namespace XED.VirtualFactory
|
||||
return;
|
||||
}
|
||||
|
||||
GameObject go = Instantiate(nodePrefab);
|
||||
GameObject go = Object.Instantiate(nodePrefab);
|
||||
var objNode = go.GetComponent<AGVNode>();
|
||||
nodeTable.Add(nodedata.id, objNode);
|
||||
objNode.Initialize(nodedata);
|
||||
@@ -257,7 +254,7 @@ namespace XED.VirtualFactory
|
||||
DeselectNode();
|
||||
if (nodeSelectMode == NodeSelectMode.Draw)
|
||||
{
|
||||
GameObject go = Instantiate(nodePrefab);
|
||||
GameObject go = Object.Instantiate(nodePrefab);
|
||||
go.transform.position = hit.point;
|
||||
var objNode = go.GetComponent<AGVNode>();
|
||||
int maxid = int.Parse(agvNodeMap.maxid);
|
||||
@@ -281,7 +278,7 @@ namespace XED.VirtualFactory
|
||||
{
|
||||
return;
|
||||
}
|
||||
GameObject NewNode = Instantiate(nodePrefab, currentlySelectedNode.transform.position + Vector3.right, Quaternion.identity);
|
||||
GameObject NewNode = Object.Instantiate(nodePrefab, currentlySelectedNode.transform.position + Vector3.right, Quaternion.identity);
|
||||
AGVNode node = NewNode.GetComponent<AGVNode>();
|
||||
int maxid = int.Parse(agvNodeMap.maxid);
|
||||
maxid++;
|
||||
@@ -322,7 +319,7 @@ namespace XED.VirtualFactory
|
||||
n.linkedNodID.Remove(currentlySelectedNode.nodeClass.id);
|
||||
}
|
||||
|
||||
Destroy(currentlySelectedNode.gameObject);
|
||||
Object.Destroy(currentlySelectedNode.gameObject);
|
||||
DeselectNode();
|
||||
}
|
||||
|
||||
@@ -356,7 +353,7 @@ namespace XED.VirtualFactory
|
||||
n.linkedNodID.Remove(node.nodeClass.id);
|
||||
}
|
||||
|
||||
Destroy(node.gameObject);
|
||||
Object.Destroy(node.gameObject);
|
||||
DeselectNode();
|
||||
}
|
||||
|
||||
@@ -404,8 +401,7 @@ namespace XED.VirtualFactory
|
||||
|
||||
public void StatusEnterEvent()
|
||||
{
|
||||
var raycaster = FindSingle<Raycaster>();
|
||||
ManagerHub.instance.Get<UserInputManager>().SetHandler(myHandler);
|
||||
userInputManager.SetHandler(myHandler);
|
||||
raycaster.AddEvent(Raycaster.EventType.FirstLeftClickOnly, typeof(AGVNode), OnClickAGVNode);
|
||||
raycaster.AddEvent(Raycaster.EventType.Stay, typeof(Map), MoveDrawTarget);
|
||||
raycaster.AddEvent(Raycaster.EventType.FirstLeftClickOnly, typeof(Map), ONClickGround);
|
||||
@@ -413,8 +409,7 @@ namespace XED.VirtualFactory
|
||||
|
||||
public void StatusExitEvent()
|
||||
{
|
||||
var raycaster = FindSingle<Raycaster>();
|
||||
ManagerHub.instance.Get<UserInputManager>().RemoveHandler(myHandler);
|
||||
userInputManager.RemoveHandler(myHandler);
|
||||
raycaster.RemoveEvent(Raycaster.EventType.FirstLeftClickOnly, typeof(AGVNode), OnClickAGVNode);
|
||||
raycaster.RemoveEvent(Raycaster.EventType.Stay, typeof(Map), MoveDrawTarget);
|
||||
raycaster.RemoveEvent(Raycaster.EventType.FirstLeftClickOnly, typeof(Map), ONClickGround);
|
||||
@@ -438,10 +433,10 @@ namespace XED.VirtualFactory
|
||||
return handler;
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
//vistaOpenFileDialog.Dispose();
|
||||
//saveFileDialog.Dispose();
|
||||
}
|
||||
//protected override void OnDestroy()
|
||||
//{
|
||||
// //vistaOpenFileDialog.Dispose();
|
||||
// //saveFileDialog.Dispose();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XRLib.UI;
|
||||
using static XED.Enums;
|
||||
|
||||
namespace XED.VirtualFactory
|
||||
{
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
using RTG;
|
||||
using UnityEngine;
|
||||
using XRLib;
|
||||
|
||||
namespace XED.VirtualFactory
|
||||
namespace XED.Manage
|
||||
{
|
||||
public class NodeGizmoController : MonoBehaviour,ISingle
|
||||
public class NodeGizmoController : Manager
|
||||
{
|
||||
public ObjectTransformGizmo moveGizmo;
|
||||
public GameObject target;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Awake()
|
||||
public override void Init()
|
||||
{
|
||||
moveGizmo = RTGizmosEngine.Get.CreateObjectMoveGizmo();
|
||||
moveGizmo.Gizmo.SetEnabled(false);
|
||||
//moveGizmo = RTGizmosEngine.Get.CreateObjectMoveGizmo();
|
||||
//moveGizmo.Gizmo.SetEnabled(false);
|
||||
}
|
||||
|
||||
public void Attach(GameObject target)
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
using UnityEngine;
|
||||
using XRLib;
|
||||
using XED.Command;
|
||||
|
||||
namespace XED
|
||||
namespace XED.Manage
|
||||
{
|
||||
public class CameraManager : MonoBehaviour, ISingle
|
||||
public class CameraManager : Manager
|
||||
{
|
||||
[SerializeField]
|
||||
float objectViewDistance = 25f;
|
||||
[SerializeField]
|
||||
Vector3 objectViewRotation = new Vector3(45, 145, 0);
|
||||
private float cameraDistance;
|
||||
private Vector3 viewAngle;
|
||||
|
||||
public void MoveToTwinObjectPos(TwinObject twinObject)
|
||||
public override void Init()
|
||||
{
|
||||
Camera.main.transform.rotation = Quaternion.Euler(objectViewRotation);
|
||||
cameraDistance = 25f;
|
||||
viewAngle = new Vector3(45, 145, 0);
|
||||
}
|
||||
|
||||
Camera.main.transform.position = twinObject.transform.position;
|
||||
Camera.main.transform.position += -Camera.main.transform.forward * objectViewDistance;
|
||||
public void MoveToTwinObjectPos(TwinObject target)
|
||||
{
|
||||
var command = new MoveToTargetCommand(target.transform, viewAngle, cameraDistance);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System;
|
||||
using System.Drawing.Printing;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XED.UI;
|
||||
using XRLib;
|
||||
|
||||
namespace XED
|
||||
namespace XED.Manage
|
||||
{
|
||||
public class CursorManager : MonoBehaviour, ISingle
|
||||
public class CursorManager : Manager
|
||||
{
|
||||
Texture2D cursor_Up;
|
||||
Texture2D cursor_Down;
|
||||
@@ -19,7 +17,7 @@ namespace XED
|
||||
|
||||
public UI_GUIWindow currentUseGUIWindow;
|
||||
|
||||
public override void AfterAwake()
|
||||
public override void Init()
|
||||
{
|
||||
cursor_Up = Resources.Load<Texture2D>("Images/cursor_vertical");
|
||||
cursor_Down = Resources.Load<Texture2D>("Images/cursor_vertical");
|
||||
@@ -31,22 +29,7 @@ namespace XED
|
||||
cursor_DownRight = Resources.Load<Texture2D>("Images/cursor_diag_a");
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (currentUseGUIWindow == null)
|
||||
return;
|
||||
|
||||
if (currentUseGUIWindow.state == GUIState.Resize)
|
||||
{
|
||||
ChangeMouseCursor(currentUseGUIWindow.resizeDirection);
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeMouseCursor(currentUseGUIWindow.GetHandleDirection());
|
||||
}
|
||||
}
|
||||
|
||||
void ChangeMouseCursor(ResizeDirection dir)
|
||||
public void ChangeMouseCursor(ResizeDirection dir)
|
||||
{
|
||||
switch (dir)
|
||||
{
|
||||
|
||||
@@ -38,39 +38,11 @@ namespace XED.Manage
|
||||
|
||||
public void Init()
|
||||
{
|
||||
var rayCaster = FindAnyObjectByType<Raycaster>();
|
||||
var statusPanel = FindAnyObjectByType<ModePanel>();
|
||||
var userInputManager = GameObject.FindAnyObjectByType<UserInputManager>();
|
||||
|
||||
var canvas_static = FindAnyObjectByType<Canvas_Static>();
|
||||
var canvas_Popup = FindAnyObjectByType<Canvas_Popup>();
|
||||
var canvas_DragArea = FindAnyObjectByType<Canvas_DragArea>();
|
||||
|
||||
var wallBuilder = FindAnyObjectByType<WallBuilder>();
|
||||
var userInputManager = ManagerHub.instance.Get<UserInputManager>();
|
||||
var customAssetConnector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
var renderObjectHandler = ManagerHub.instance.Get<RenderObjectHandler>();
|
||||
var projectManager = ManagerHub.instance.Get<ProjectManager>();
|
||||
|
||||
FBXFileManager fbxFileManager = ManagerHub.instance.Get<FBXFileManager>();
|
||||
GameObject componentWindow = canvas_Popup.panel_hierarchy.gameObject;
|
||||
GameObject interferedobjectlistWindow = canvas_Popup.panel_interferedobjectlist.gameObject;
|
||||
|
||||
canvas_Popup.panel_objectinfo.onTransformChanged += renderObjectHandler.OnTransformChanged;
|
||||
|
||||
canvas_DragArea.panel_draghandler.onDragBoxSelect += customAssetConnector.assetEventHandler.OnDragBoxSelect;
|
||||
statusPanel.AddController(renderObjectHandler);
|
||||
statusPanel.AddController(wallBuilder);
|
||||
statusPanel.AddModeEnterEvent(ModePanel.ProgramMode.AGVPathDrawing, canvas_Popup.agvnodemodepopup.Open);
|
||||
statusPanel.SetMode(ModePanel.ProgramMode.ObjectLayout);
|
||||
var commandHandler = CommandInvoker.instance.GetInputHandler();
|
||||
userInputManager.SetHandler(GetDefaultInputHandler());
|
||||
userInputManager.SetHandler(commandHandler);
|
||||
canvas_static.panel_modecontrol.onClickObjectMode += () => statusPanel.SetMode(ModePanel.ProgramMode.ObjectLayout);
|
||||
//canvas_static.panel_modecontrol.onClickPropertyMode += () => statusPanel.SetMode(ModePanel.ProgramMode.None);
|
||||
|
||||
rayCaster.onUIHoverEvent += canvas_Popup.panel_tooltip.ActivateTooltip;
|
||||
rayCaster.onUIHoverExitEvent += canvas_Popup.panel_tooltip.DeactivateTooltip;
|
||||
//rayCaster.AddEvent(Raycaster.EventType.FirstRightClickOnly, typeof(TwinObject), canvas_Popup.panel_propertyviewer.Activate);
|
||||
}
|
||||
|
||||
InputHandler defaultInputHandler;
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.IO;
|
||||
using TriLibCore.SFB;
|
||||
using UnityEngine;
|
||||
using XRLib;
|
||||
|
||||
namespace XED.Manage
|
||||
{
|
||||
public class FileBrowserHandler : MonoBehaviour, ISingle
|
||||
{
|
||||
private string lastOpenFilePath;
|
||||
|
||||
public void SaveFileBrowser<T>(T saveData, string title, string defaultfileName = "", string directory = "", string extension = "json")
|
||||
{
|
||||
var data = StandaloneFileBrowser.SaveFilePanel(title, directory, defaultfileName, extension);
|
||||
SaveFile(saveData, data.Name);
|
||||
}
|
||||
|
||||
public void SaveFile<T>(T saveData, string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
return;
|
||||
|
||||
string json = JsonConvert.SerializeObject(saveData);
|
||||
FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write);
|
||||
StreamWriter writer = new StreamWriter(fs, System.Text.Encoding.Unicode);
|
||||
lastOpenFilePath = path;
|
||||
writer.Write(json);
|
||||
writer.Close();
|
||||
}
|
||||
|
||||
public T OpenFileBrowser<T>(string title, string directory = "", string extension = "json")
|
||||
{
|
||||
var data = StandaloneFileBrowser.OpenFilePanel(title, directory, extension, false);
|
||||
if (data.Count >= 1 && !string.IsNullOrEmpty(data[0].Name))
|
||||
{
|
||||
string json = File.ReadAllText(data[0].Name);
|
||||
try
|
||||
{
|
||||
lastOpenFilePath = data[0].Name;
|
||||
return JsonConvert.DeserializeObject<T>(json);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Log(ex.Message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("File not found!");
|
||||
}
|
||||
return default(T);
|
||||
}
|
||||
|
||||
public string GetLastOpenFilePath()
|
||||
{
|
||||
return lastOpenFilePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d3b7eb8ddaf6a2c4a94629439aa5654f
|
||||
@@ -14,9 +14,13 @@ namespace XED.Manage
|
||||
public event Action<(TwinObject, TwinObject)> OnAddInterferedPair;
|
||||
public event Action<(TwinObject, TwinObject)> OnRemoveInterferedPair;
|
||||
|
||||
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
|
||||
var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>();
|
||||
OnAddInterferedPair += canvas_Popup.panel_interferedobjectlist.CreateContentButton;
|
||||
OnRemoveInterferedPair += canvas_Popup.panel_interferedobjectlist.RemoveContentButton;
|
||||
}
|
||||
|
||||
public void AddInterferedPair(TwinObject obj1, TwinObject obj2)
|
||||
|
||||
@@ -14,10 +14,17 @@ namespace XED.Manage
|
||||
{
|
||||
Join(new ProjectManager());
|
||||
Join(new FBXFileManager());
|
||||
Join(new UserInputManager());
|
||||
Join(new CustomAssetConnector());
|
||||
Join(new RenderObjectHandler());
|
||||
Join(new InterferedObjectManager());
|
||||
Join(new CursorManager());
|
||||
Join(new CameraManager());
|
||||
Join(new AGVNodeManager());
|
||||
Join(new NodeGizmoController());
|
||||
Join(new AGVNodeLinkManager());
|
||||
Join(new AGVManager());
|
||||
Join(new WallBuilder());
|
||||
Join(new MeshCreator());
|
||||
|
||||
foreach(var m in managers)
|
||||
{
|
||||
|
||||
@@ -4,13 +4,10 @@ namespace XED.Manage
|
||||
{
|
||||
public PopupCanvasHandler(Canvas_Popup canvas_Popup)
|
||||
{
|
||||
var fbxFileManager = ManagerHub.instance.Get<FBXFileManager>();
|
||||
canvas_Popup.panel_assetlibrary.scrollView.onSelect.AddListener(canvas_Popup.panel_assetproperties.Open);
|
||||
canvas_Popup.panel_assetlibrary.scrollView.onHover.AddListener(canvas_Popup.panel_thumbnail.HandleOpenClose);
|
||||
canvas_Popup.panel_assetlibrary.scrollRect.onExit.AddListener(canvas_Popup.panel_thumbnail.HandleOpenClose);
|
||||
canvas_Popup.panel_assetproperties.onClickPreview += canvas_Popup.panel_predefinedtype.Open;
|
||||
canvas_Popup.panel_assetproperties.onOpen += fbxFileManager.GetCustomAssetData;
|
||||
canvas_Popup.panel_thumbnail.onOpen += fbxFileManager.GetCustomAssetData;
|
||||
canvas_Popup.panel_thumbnail.onGetPosition += canvas_Popup.panel_assetlibrary.GetPositionX;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,11 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using TriLibCore.Dae.Schema;
|
||||
using TriLibCore.SFB;
|
||||
using UnityEditor;
|
||||
using XED.Asset;
|
||||
using XED.Command;
|
||||
using XED.HierarchyTree;
|
||||
using XED.Service;
|
||||
using XED.Util;
|
||||
@@ -16,23 +18,23 @@ namespace XED.Manage
|
||||
public class ProjectManager : Manager
|
||||
{
|
||||
private AssetDataService assetDataService;
|
||||
private CustomAssetConnector connector;
|
||||
|
||||
private string curProjectPath;
|
||||
private ProjectData curProjectData;
|
||||
Dictionary<int, HierarchyItem> itemDict = new Dictionary<int, HierarchyItem>();
|
||||
|
||||
|
||||
public ProjectManager()
|
||||
{
|
||||
assetDataService = new AssetDataService();
|
||||
|
||||
connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
curProjectPath = string.Empty;
|
||||
curProjectData = null;
|
||||
itemDict.Clear();
|
||||
}
|
||||
|
||||
public void SaveProject()
|
||||
{
|
||||
bool isNewProject = string.IsNullOrEmpty(curProjectPath);
|
||||
@@ -42,14 +44,14 @@ namespace XED.Manage
|
||||
if (string.IsNullOrEmpty(path))
|
||||
return;
|
||||
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
List<AssetData> assetDatas = assetDataService.SortAssetDatas(connector.connectedAssets);
|
||||
ProjectData projectData = CreateProjectData(path, assetDatas);
|
||||
|
||||
curProjectPath = path;
|
||||
curProjectData = projectData;
|
||||
|
||||
SaveFile();
|
||||
var command = new SaveProjectCommand(curProjectPath, curProjectData);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
|
||||
public void LoadProject()
|
||||
@@ -67,24 +69,23 @@ namespace XED.Manage
|
||||
if (projectData == null)
|
||||
return;
|
||||
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
connector.ClearObjects();
|
||||
|
||||
Init();
|
||||
|
||||
LoadAssets(projectData.assetDatas);
|
||||
RestoreHierarchys(projectData.assetDatas);
|
||||
|
||||
curProjectPath = path;
|
||||
curProjectData = projectData;
|
||||
|
||||
var command = new LoadProjectCommand(curProjectData.assetDatas, connector);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
|
||||
public void NewProject()
|
||||
{
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
connector.ClearObjects();
|
||||
|
||||
Init();
|
||||
|
||||
var command = new NewProjectCommand(connector);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
|
||||
private ProjectData CreateProjectData(string path, List<AssetData> assetDatas)
|
||||
@@ -97,43 +98,6 @@ namespace XED.Manage
|
||||
};
|
||||
}
|
||||
|
||||
private void LoadAssets(List<AssetData> assets)
|
||||
{
|
||||
foreach (AssetData asset in assets)
|
||||
{
|
||||
LoadAsset(asset);
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadAsset(AssetData asset)
|
||||
{
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
connector.OnLoadAsset(asset);
|
||||
itemDict.Add(asset.id, connector.connectedAssets.Last().hierarchyItem);
|
||||
}
|
||||
|
||||
private void RestoreHierarchys(List<AssetData> assets)
|
||||
{
|
||||
foreach (AssetData asset in assets)
|
||||
{
|
||||
RestoreHierarchy(asset);
|
||||
}
|
||||
}
|
||||
|
||||
private void RestoreHierarchy(AssetData asset)
|
||||
{
|
||||
foreach (int id in asset.children)
|
||||
{
|
||||
HierarchyItem parent = itemDict[asset.id];
|
||||
HierarchyItem child = itemDict[id];
|
||||
|
||||
if (parent == null || child == null)
|
||||
continue;
|
||||
|
||||
ManagerHub.instance.Get<CustomAssetConnector>().OnRestoreHierarchy(parent, child);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetSaveFilePath()
|
||||
{
|
||||
var data = StandaloneFileBrowser.SaveFilePanel("SaveProject", "", "", "json");
|
||||
@@ -146,14 +110,6 @@ namespace XED.Manage
|
||||
return data.Count >= 1 ? data[0].Name : "";
|
||||
}
|
||||
|
||||
private void SaveFile()
|
||||
{
|
||||
string json = JsonConvert.SerializeObject(curProjectData);
|
||||
FileStream fs = new FileStream(curProjectPath, FileMode.Create, FileAccess.Write);
|
||||
StreamWriter writer = new StreamWriter(fs, System.Text.Encoding.Unicode);
|
||||
writer.Write(json);
|
||||
writer.Close();
|
||||
}
|
||||
|
||||
private ProjectData GetFileData(string path)
|
||||
{
|
||||
|
||||
@@ -8,11 +8,7 @@ namespace XED.Manage
|
||||
public class StaticCanvasHandler : CanvasEventHandler
|
||||
{
|
||||
public StaticCanvasHandler(Canvas_Static canvas_static)
|
||||
{
|
||||
var renderObjectHandler = ManagerHub.instance.Get<RenderObjectHandler>();
|
||||
var fbxFileManager = ManagerHub.instance.Get<FBXFileManager>();
|
||||
var projectManager = ManagerHub.instance.Get<ProjectManager>();
|
||||
|
||||
{
|
||||
var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>();
|
||||
GameObject componentWindow = canvas_Popup.panel_hierarchy.gameObject;
|
||||
GameObject interferedobjectlistWindow = canvas_Popup.panel_interferedobjectlist.gameObject;
|
||||
@@ -20,24 +16,10 @@ namespace XED.Manage
|
||||
|
||||
canvas_static.panel_shortcuts.onClickOpenAssetWindow += (() => assetWindow.SetActive(!assetWindow.activeSelf));
|
||||
canvas_static.panel_shortcuts.onClickOpenComponentWindow += (() => componentWindow.SetActive(!componentWindow.activeSelf));
|
||||
canvas_static.panel_shortcuts.onClickUndo += CommandInvoker.instance.Undo;
|
||||
canvas_static.panel_shortcuts.onClickRedo += CommandInvoker.instance.Redo;
|
||||
canvas_static.panel_shortcuts.onclickSave += projectManager.SaveProject;
|
||||
|
||||
canvas_static.panel_topbar.onClickSaveProject += projectManager.SaveProject;
|
||||
canvas_static.panel_topbar.onClickLoadProject += projectManager.LoadProject;
|
||||
canvas_static.panel_topbar.onClickNewProject += projectManager.NewProject;
|
||||
canvas_static.panel_topbar.onClickLoadAssets += fbxFileManager.LoadLocalFBXDirectory;
|
||||
canvas_static.panel_topbar.onClickAssetWindow += fbxFileManager.LoadLocalData;
|
||||
canvas_static.panel_topbar.onClickAssetWindow += (() => assetWindow.SetActive(!assetWindow.activeSelf));
|
||||
canvas_static.panel_topbar.onClickComponentWindow += (() => componentWindow.SetActive(!componentWindow.activeSelf));
|
||||
canvas_static.panel_topbar.onClickInterferedListWindow += (() => interferedobjectlistWindow.SetActive(!interferedobjectlistWindow.activeSelf));
|
||||
|
||||
canvas_static.panel_toolbar.onClickMove += renderObjectHandler.SetRTGMove;
|
||||
canvas_static.panel_toolbar.onClickExpand += renderObjectHandler.SetRTGScale;
|
||||
canvas_static.panel_toolbar.onClickRotate += renderObjectHandler.SetRTGRotate;
|
||||
canvas_static.panel_toolbar.onClickRemove += renderObjectHandler.RemoveItem;
|
||||
canvas_static.panel_toolbar.onClickCopy += renderObjectHandler.CopyItem;
|
||||
//canvas_static.panel_modecontrol.onClickObjectMode += () => statusPanel.SetMode(ModePanel.ProgramMode.ObjectLayout);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XED.Core;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
public class UpdateRunner : UnitySingleton<SystemMain>
|
||||
{
|
||||
private static List<Action> updateActions = new List<Action>();
|
||||
|
||||
public static void AddAction(Action action)
|
||||
{
|
||||
if (!updateActions.Contains(action))
|
||||
{
|
||||
updateActions.Add(action);
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveAction(Action action)
|
||||
{
|
||||
if (updateActions.Contains(action))
|
||||
{
|
||||
updateActions.Remove(action);
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
foreach (Action action in updateActions)
|
||||
{
|
||||
action?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 40294507f68cc2942b2bef179e37eb08
|
||||
@@ -6,7 +6,7 @@ using XRLib;
|
||||
|
||||
namespace XED.Manage
|
||||
{
|
||||
public class UserInputManager : Manager
|
||||
public class UserInputManager : MonoBehaviour
|
||||
{
|
||||
Dictionary<KeyCode, Action> getKeyActionTable = new Dictionary<KeyCode, Action>();
|
||||
Dictionary<KeyCode, Action> upKeyActionTable = new Dictionary<KeyCode, Action>();
|
||||
@@ -149,10 +149,5 @@ namespace XED.Manage
|
||||
|
||||
updateLoop?.Invoke();
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
UpdateRunner.AddAction(Update);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using UnityEngine;
|
||||
using XED.Asset;
|
||||
using XED.Manage;
|
||||
using XED.UI;
|
||||
using XRLib.UI;
|
||||
|
||||
@@ -10,6 +12,7 @@ namespace XED
|
||||
public override void AfterAwake()
|
||||
{
|
||||
GetComponent<Canvas>().sortingOrder = 1;
|
||||
panel_draghandler.onDragBoxSelect += ManagerHub.instance.Get<CustomAssetConnector>().assetEventHandler.OnDragBoxSelect;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using XED.Manage;
|
||||
using XED.UI;
|
||||
using XED.Util;
|
||||
using XED.VirtualFactory;
|
||||
using XRLib;
|
||||
using XRLib.UI;
|
||||
using XED.UI;
|
||||
using XED.VirtualFactory;
|
||||
using XED.Manage;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
@@ -29,19 +29,32 @@ namespace XED
|
||||
public Panel_Thumbnail panel_thumbnail;
|
||||
public Panel_ObjectDistance panel_objectdistance;
|
||||
|
||||
void Awake()
|
||||
private void Awake()
|
||||
{
|
||||
canvasHandler = new PopupCanvasHandler(this);
|
||||
}
|
||||
|
||||
public override void AfterAwake()
|
||||
{
|
||||
canvasHandler = new PopupCanvasHandler(this);
|
||||
GetComponent<Canvas>().sortingOrder = 1;
|
||||
var renderObjectHandler = ManagerHub.instance.Get<RenderObjectHandler>();
|
||||
panel_objectinfo.onTransformChanged += renderObjectHandler.OnTransformChanged;
|
||||
|
||||
var raycaster = GameObject.FindAnyObjectByType<Raycaster>();
|
||||
raycaster.onUIHoverEvent += panel_tooltip.ActivateTooltip;
|
||||
raycaster.onUIHoverExitEvent += panel_tooltip.DeactivateTooltip;
|
||||
|
||||
foreach (var panel in GetComponentsInChildren<PanelBase>(true))
|
||||
{
|
||||
panel.onEnableEvent += SetPanelAsLastSibling;
|
||||
}
|
||||
|
||||
var fbxFileManager = ManagerHub.instance.Get<FBXFileManager>();
|
||||
panel_assetproperties.onOpen += fbxFileManager.GetCustomAssetData;
|
||||
panel_thumbnail.onOpen += fbxFileManager.GetCustomAssetData;
|
||||
|
||||
var linkDataUIManager = GameObject.FindAnyObjectByType<LinkDataUIManager>();
|
||||
linkDataUIManager.onUISelected += panel_assetedit.SetAssetData;
|
||||
}
|
||||
|
||||
void SetPanelAsLastSibling(UIBase panel)
|
||||
|
||||
@@ -2,6 +2,8 @@ using XRLib;
|
||||
using XRLib.UI;
|
||||
using UnityEngine;
|
||||
using XED.Manage;
|
||||
using XED.Util;
|
||||
using XED.Command;
|
||||
|
||||
namespace XED.UI
|
||||
{
|
||||
@@ -16,5 +18,32 @@ namespace XED.UI
|
||||
{
|
||||
canvasHandler = new StaticCanvasHandler(this);
|
||||
}
|
||||
|
||||
public override void AfterAwake()
|
||||
{
|
||||
var statusPanel = FindSingle<ModePanel>();
|
||||
var renderObjectHandler = ManagerHub.instance.Get<RenderObjectHandler>();
|
||||
var fbxFileManager = ManagerHub.instance.Get<FBXFileManager>();
|
||||
var projectManager = ManagerHub.instance.Get<ProjectManager>();
|
||||
|
||||
panel_modecontrol.onClickObjectMode += () => statusPanel.SetMode(ModePanel.ProgramMode.ObjectLayout);
|
||||
statusPanel.SetMode(ModePanel.ProgramMode.ObjectLayout);
|
||||
|
||||
panel_shortcuts.onClickUndo += CommandInvoker.instance.Undo;
|
||||
panel_shortcuts.onClickRedo += CommandInvoker.instance.Redo;
|
||||
panel_shortcuts.onclickSave += projectManager.SaveProject;
|
||||
|
||||
panel_topbar.onClickSaveProject += projectManager.SaveProject;
|
||||
panel_topbar.onClickLoadProject += projectManager.LoadProject;
|
||||
panel_topbar.onClickNewProject += projectManager.NewProject;
|
||||
//panel_topbar.onClickLoadAssets += fbxFileManager.LoadLocalFBXDirectory;
|
||||
panel_topbar.onClickAssetWindow += fbxFileManager.LoadLocalData;
|
||||
|
||||
panel_toolbar.onClickMove += renderObjectHandler.SetRTGMove;
|
||||
panel_toolbar.onClickExpand += renderObjectHandler.SetRTGScale;
|
||||
panel_toolbar.onClickRotate += renderObjectHandler.SetRTGRotate;
|
||||
panel_toolbar.onClickRemove += renderObjectHandler.RemoveItem;
|
||||
panel_toolbar.onClickCopy += renderObjectHandler.CopyItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ namespace XED.UI
|
||||
defaulty = Background.sizeDelta.y;
|
||||
datalist = FindAnyObjectByType<Panel_InterworkingDataList>(FindObjectsInactive.Include);
|
||||
ConnectedAssetMarker.onClick.AddListener(() => datalist.SetActive(true));
|
||||
FindAnyObjectByType<LinkDataUIManager>(FindObjectsInactive.Include).onUISelected += SetAssetData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XED.Manage;
|
||||
using XED.Util;
|
||||
using XRLib;
|
||||
using XRLib.UI;
|
||||
@@ -23,12 +24,12 @@ namespace XED.UI
|
||||
content = GetComponentInChildren<ScrollRect>().content;
|
||||
buttonPrefab = Resources.Load<GameObject>("Prefabs/UI/PRF_InterferedObjectButton");
|
||||
|
||||
cameraManager = FindSingle<CameraManager>();
|
||||
cameraManager = ManagerHub.instance.Get<CameraManager>();
|
||||
}
|
||||
|
||||
public void CreateContentButton((TwinObject, TwinObject) pair)
|
||||
{
|
||||
var newButton = Instantiate(buttonPrefab, content).GetComponent<UI_InterferedObjectButton>();
|
||||
var newButton = Object.Instantiate(buttonPrefab, content).GetComponent<UI_InterferedObjectButton>();
|
||||
newButton.OnClickButton += cameraManager.MoveToTwinObjectPos;
|
||||
newButton.Initialize(pair.Item1, pair.Item2);
|
||||
createdButtons.Add(pair, newButton);
|
||||
|
||||
@@ -45,11 +45,6 @@ namespace XED.UI
|
||||
}
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnClickOpenDropdown(UI_PredefinedTypeItem item)
|
||||
{
|
||||
curDropdownItem = item;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
using XRLib.UI;
|
||||
using static XED.WallBuilder;
|
||||
using static XED.Enums;
|
||||
|
||||
namespace XED.UI
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XED.Manage;
|
||||
using XRLib.UI;
|
||||
|
||||
namespace XED.UI
|
||||
@@ -25,7 +26,7 @@ namespace XED.UI
|
||||
None,
|
||||
}
|
||||
|
||||
public class UI_GUIWindow : UIBase, IPointerDownHandler, IPointerUpHandler, IPointerEnterHandler, IDragHandler
|
||||
public class UI_GUIWindow : UIBase, IPointerDownHandler, IPointerUpHandler, IPointerEnterHandler, IPointerMoveHandler, IDragHandler
|
||||
{
|
||||
RectTransform rect;
|
||||
CursorManager cursorManager;
|
||||
@@ -45,7 +46,7 @@ namespace XED.UI
|
||||
|
||||
public override void AfterAwake()
|
||||
{
|
||||
cursorManager = FindSingle<CursorManager>();
|
||||
cursorManager = ManagerHub.instance.Get<CursorManager>();
|
||||
rect = GetComponent<RectTransform>();
|
||||
initialPivot = rect.pivot;
|
||||
|
||||
@@ -90,6 +91,19 @@ namespace XED.UI
|
||||
InitializeState();
|
||||
}
|
||||
|
||||
public void OnPointerMove(PointerEventData eventData)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case GUIState.Resize:
|
||||
cursorManager.ChangeMouseCursor(resizeDirection);
|
||||
break;
|
||||
default:
|
||||
cursorManager.ChangeMouseCursor(GetHandleDirection());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnDrag(PointerEventData eventData)
|
||||
{
|
||||
switch (state)
|
||||
|
||||
@@ -6,10 +6,10 @@ using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XED;
|
||||
|
||||
namespace XRLib
|
||||
namespace XED.Manage
|
||||
{
|
||||
[DefaultExecutionOrder(int.MinValue)]
|
||||
public class Raycaster : MonoBehaviour, ISingle
|
||||
public class Raycaster : MonoBehaviour
|
||||
{
|
||||
public enum EventType
|
||||
{
|
||||
@@ -57,8 +57,8 @@ namespace XRLib
|
||||
#pragma warning restore IDE0044
|
||||
Vector2 prevMousePos;
|
||||
|
||||
|
||||
void Awake()
|
||||
|
||||
public override void AfterAwake()
|
||||
{
|
||||
cam = Camera.main;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XED.Manage;
|
||||
using XED.VirtualFactory;
|
||||
|
||||
namespace XED
|
||||
@@ -43,7 +44,7 @@ public class VirtualFactoryManager : MonoBehaviour
|
||||
{
|
||||
agvMap = FindSingle<AGVMap>();
|
||||
portMap = FindSingle<PortMap>();
|
||||
agvManager = FindSingle<AGVManager>();
|
||||
agvManager = ManagerHub.instance.Get<AGVManager>();
|
||||
stackerCranes = FindObjectsByType<StackerCrane>(UnityEngine.FindObjectsSortMode.None).ToList();
|
||||
|
||||
agvNeedScanner = new AGVNeedsScanner(this, agvManager);
|
||||
|
||||
Reference in New Issue
Block a user