Compare commits
94 Commits
lh/0328_Pr
...
pgd/202504
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a373879d75 | ||
|
|
36392ea150 | ||
|
|
21e0e12ccf | ||
| ee265674b2 | |||
| 2ad3fbcf33 | |||
|
|
77b75c63ce | ||
|
|
24cae4c8db | ||
| a44e2c44c4 | |||
|
|
cef08df8e0 | ||
|
|
7cb9a08144 | ||
|
|
99c6a0f6f1 | ||
| c27db88402 | |||
|
|
5cfad8eab4 | ||
| a24205d929 | |||
|
|
7c958faa42 | ||
|
|
e4344e538b | ||
|
|
1f525994d0 | ||
|
|
d4ead516d2 | ||
| 54551b8a24 | |||
| 6bf31ac71c | |||
|
|
1cd614a45d | ||
|
|
2c3f69b0b8 | ||
| eb769bc312 | |||
| 84740b6133 | |||
| beaf61b399 | |||
|
|
1ce63b9870 | ||
|
|
7c24cb0cc3 | ||
|
|
410a3a5bb4 | ||
| afe8652786 | |||
|
|
516412f585 | ||
| 981a1685f5 | |||
| 92c7655ecb | |||
| 62f019c256 | |||
|
|
b962d25930 | ||
|
|
b87ea36afb | ||
|
|
f28d0a09a2 | ||
|
|
16fe55edc6 | ||
| 67fd6739ec | |||
|
|
807ec619e4 | ||
|
|
a63c42e968 | ||
|
|
92e3b0ce9a | ||
|
|
bc48d7e7e1 | ||
|
|
57fa1f08b6 | ||
|
|
d5ea8b03c5 | ||
|
|
514d9f2937 | ||
| df6077e260 | |||
| b36ea4f93c | |||
| e448686a61 | |||
| abbe0cc807 | |||
|
|
ea774416f8 | ||
|
|
6e1fb78966 | ||
|
|
9ac2fa3807 | ||
| 02f318c548 | |||
|
|
7005d76198 | ||
|
|
7f98e1a06c | ||
|
|
98d2b9cc95 | ||
|
|
f8878387f8 | ||
| 7769886bad | |||
| e7630541dc | |||
| 222bfc347b | |||
| 21277cbc22 | |||
| a1d9ff9da4 | |||
| 0f57e1cb24 | |||
| 70c2b7ae57 | |||
| 64ac9c0755 | |||
|
|
4a9ab69e89 | ||
|
|
a46d2b220a | ||
| 86157ee5d8 | |||
|
|
b636b4ca4d | ||
| 53abd9a361 | |||
| a089d9fe6f | |||
|
|
77ce046ff9 | ||
|
|
3f40f681df | ||
| c207777bf6 | |||
| 24057a4102 | |||
| 8d255ef06c | |||
| 5a293f6c2c | |||
| c3c9b498c4 | |||
| f94ef5b5b1 | |||
|
|
2772a3b928 | ||
|
|
32f1f3d956 | ||
| db11ffc5eb | |||
|
|
66dab5acfd | ||
|
|
347c5853c5 | ||
| 8edfe96073 | |||
|
|
9c3a0e02d7 | ||
|
|
2e01bcf527 | ||
|
|
44724629d3 | ||
|
|
fd8b6052bf | ||
|
|
09b5001f3b | ||
|
|
110b2f87ed | ||
|
|
eee79d1145 | ||
|
|
bfc68b3d93 | ||
|
|
65f0199ec6 |
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/
|
||||
5
.vscode/extensions.json
vendored
Normal file
5
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"visualstudiotoolsforunity.vstuc"
|
||||
]
|
||||
}
|
||||
10
.vscode/launch.json
vendored
Normal file
10
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Attach to Unity",
|
||||
"type": "vstuc",
|
||||
"request": "attach"
|
||||
}
|
||||
]
|
||||
}
|
||||
60
.vscode/settings.json
vendored
Normal file
60
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
"**/.DS_Store": true,
|
||||
"**/.git": true,
|
||||
"**/.vs": true,
|
||||
"**/.gitmodules": true,
|
||||
"**/.vsconfig": true,
|
||||
"**/*.booproj": true,
|
||||
"**/*.pidb": true,
|
||||
"**/*.suo": true,
|
||||
"**/*.user": true,
|
||||
"**/*.userprefs": true,
|
||||
"**/*.unityproj": true,
|
||||
"**/*.dll": true,
|
||||
"**/*.exe": true,
|
||||
"**/*.pdf": true,
|
||||
"**/*.mid": true,
|
||||
"**/*.midi": true,
|
||||
"**/*.wav": true,
|
||||
"**/*.gif": true,
|
||||
"**/*.ico": true,
|
||||
"**/*.jpg": true,
|
||||
"**/*.jpeg": true,
|
||||
"**/*.png": true,
|
||||
"**/*.psd": true,
|
||||
"**/*.tga": true,
|
||||
"**/*.tif": true,
|
||||
"**/*.tiff": true,
|
||||
"**/*.3ds": true,
|
||||
"**/*.3DS": true,
|
||||
"**/*.fbx": true,
|
||||
"**/*.FBX": true,
|
||||
"**/*.lxo": true,
|
||||
"**/*.LXO": true,
|
||||
"**/*.ma": true,
|
||||
"**/*.MA": true,
|
||||
"**/*.obj": true,
|
||||
"**/*.OBJ": true,
|
||||
"**/*.asset": true,
|
||||
"**/*.cubemap": true,
|
||||
"**/*.flare": true,
|
||||
"**/*.mat": true,
|
||||
"**/*.meta": true,
|
||||
"**/*.prefab": true,
|
||||
"**/*.unity": true,
|
||||
"build/": true,
|
||||
"Build/": true,
|
||||
"Library/": true,
|
||||
"library/": true,
|
||||
"obj/": true,
|
||||
"Obj/": true,
|
||||
"Logs/": true,
|
||||
"logs/": true,
|
||||
"ProjectSettings/": true,
|
||||
"UserSettings/": true,
|
||||
"temp/": true,
|
||||
"Temp/": true
|
||||
},
|
||||
"dotnet.defaultSolution": "OctopusStudio.sln"
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using NUnit.Framework;
|
||||
using System.Collections.Generic;
|
||||
using XED.Manage;
|
||||
|
||||
namespace XED.VirtualFactory
|
||||
{
|
||||
|
||||
214
Assets/Animations/ObjectDistanceLine.cs
Normal file
214
Assets/Animations/ObjectDistanceLine.cs
Normal file
@@ -0,0 +1,214 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
//TODO::areabox가 아니라 TwinObject를 대상으로 동작하도록 수정
|
||||
public class ObjectDistanceLine : MonoBehaviour
|
||||
{
|
||||
private Vector3 centerPoint = new();
|
||||
private Vector3[] edges = new Vector3[4];
|
||||
|
||||
private LineRenderer[] lineRenderers = new LineRenderer[4];
|
||||
private int[] distances = new int[4];
|
||||
private Vector3[] hits = new Vector3[4];
|
||||
[SerializeField]
|
||||
private float thickness;
|
||||
|
||||
private int rot;
|
||||
private Dictionary<Vector3, Vector3> dirTable = new();
|
||||
|
||||
TwinObject target;
|
||||
HashSet<TwinObject> targets = new();
|
||||
public event Action onTargetEvent;
|
||||
public event Action onTargetMissing;
|
||||
public event Action<Vector3, int, int> onLineUpdate;
|
||||
public override void AfterAwake()
|
||||
{
|
||||
//var labelCanvas;
|
||||
var lineMat = Resources.Load<Material>("Materials/Mat_LineRender");
|
||||
for (int i = 0; i < lineRenderers.Length; i++)
|
||||
{
|
||||
lineRenderers[i] = new GameObject("DistanceLine").AddComponent<LineRenderer>();
|
||||
lineRenderers[i].transform.SetParent(transform, true);
|
||||
lineRenderers[i].material = lineMat;
|
||||
lineRenderers[i].positionCount = 2;
|
||||
lineRenderers[i].startWidth = thickness;
|
||||
lineRenderers[i].endWidth = thickness;
|
||||
}
|
||||
//onTargetEvent += ()=>labelCanvas.panel_objectdistancelabellist.SetActive(true);
|
||||
//onTargetMissing += ()=>labelCanvas.panel_objectdistancelabellist.SetActive(false);
|
||||
//onLineUpdate += labelCanvas.panel_objectdistancelabellist.DistanceLabelsSetting;
|
||||
}
|
||||
|
||||
public void SetTarget(TwinObject target)
|
||||
{
|
||||
if (target is Wall || target is WallGroup)
|
||||
return;
|
||||
this.target = target;
|
||||
targets.Add(target);
|
||||
gameObject.SetActive(true);
|
||||
onTargetEvent?.Invoke();
|
||||
}
|
||||
|
||||
private void EdgePoints()
|
||||
{
|
||||
var size = target.physics.areabox.bounds.size;
|
||||
edges[0] = centerPoint + EdgePointCalculate(-size.x, -size.z, centerPoint);
|
||||
edges[1] = centerPoint + EdgePointCalculate(size.x, -size.z, centerPoint);
|
||||
edges[2] = centerPoint + EdgePointCalculate(size.x, size.z, centerPoint);
|
||||
edges[3] = centerPoint + EdgePointCalculate(-size.x, size.z, centerPoint);
|
||||
}
|
||||
|
||||
private void CenterPoints()
|
||||
{
|
||||
var size = target.physics.areabox.bounds.size;
|
||||
edges[0] = centerPoint + EdgePointCalculate(-size.x, 0f, centerPoint);
|
||||
edges[1] = centerPoint + EdgePointCalculate(size.x, 0f, centerPoint);
|
||||
edges[2] = centerPoint + EdgePointCalculate(0f, -size.z, centerPoint);
|
||||
edges[3] = centerPoint + EdgePointCalculate(0f, size.z, centerPoint);
|
||||
}
|
||||
private Vector3 EdgePointCalculate(float xValue, float zValue, Vector3 center)
|
||||
{
|
||||
//대각선의 길이,
|
||||
//중점길이
|
||||
var point = center + (new Vector3(xValue, 0, zValue) * 0.5f);
|
||||
var length = Vector3.Distance(point, center);
|
||||
var dir = (point - center).normalized * length;
|
||||
//var pos = RotateVector3(dir, rot);
|
||||
var pos = Quaternion.AngleAxis(rot, Vector3.up) * dir;
|
||||
return pos;
|
||||
}
|
||||
|
||||
public void Off()
|
||||
{
|
||||
targets.Clear();
|
||||
onTargetMissing?.Invoke();
|
||||
}
|
||||
|
||||
void LineRenderSetActive(bool isActive)
|
||||
{
|
||||
foreach(var line in lineRenderers)
|
||||
{
|
||||
line.enabled = isActive;
|
||||
}
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
if (target == null || targets.Count >1)
|
||||
{
|
||||
Off();
|
||||
LineRenderSetActive(false);
|
||||
return;
|
||||
}
|
||||
|
||||
//if (areabox == null)
|
||||
// return;
|
||||
//Distance가 4개 모두 0이면 return?
|
||||
LineRenderSetActive(true);
|
||||
rot = Mathf.RoundToInt(target.physics.areabox.transform.localEulerAngles.y);
|
||||
centerPoint = new Vector3(target.physics.areabox.bounds.center.x, 0, target.physics.areabox.bounds.center.z);
|
||||
|
||||
var angle = rot % 90f;
|
||||
if (Mathf.Approximately(angle, 0f))
|
||||
CenterPoints();
|
||||
else
|
||||
EdgePoints();
|
||||
|
||||
var xOrder = edges.OrderBy(l => l.x);
|
||||
var zOrder = edges.OrderBy(l => l.z);
|
||||
dirTable.Clear();
|
||||
dirTable.TryAdd(xOrder.ElementAt(0), Vector3.left);
|
||||
dirTable.TryAdd(xOrder.ElementAt(3), Vector3.right);
|
||||
dirTable.TryAdd(zOrder.ElementAt(0), Vector3.back);
|
||||
dirTable.TryAdd(zOrder.ElementAt(3), Vector3.forward);
|
||||
|
||||
for (int i = 0; i < edges.Length; i++)
|
||||
{
|
||||
//var dir = Dir(dirTable[edges[i]]);
|
||||
var dir = dirTable[edges[i]];
|
||||
if (Physics.Raycast(edges[i], dir, out RaycastHit hit, Mathf.Infinity))
|
||||
{
|
||||
hits[i] = hit.point;
|
||||
}
|
||||
else
|
||||
{
|
||||
hits[i] = edges[i];
|
||||
}
|
||||
distances[i] = Mathf.RoundToInt(Vector3.Distance(hits[i], edges[i]) * 1000f);
|
||||
|
||||
lineRenderers[i].SetPosition(0, edges[i]);
|
||||
lineRenderers[i].SetPosition(1, hits[i]);
|
||||
//3방향중 점중 가장 짧은거
|
||||
|
||||
var pos = DistanceTextPos(edges[i], hits[i]);
|
||||
if (Mathf.Abs(pos.y) == Mathf.Infinity || float.IsNaN(pos.y))
|
||||
continue;
|
||||
onLineUpdate?.Invoke(pos, i, distances[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private Vector3 DistanceTextPos(Vector3 edge, Vector3 hit)
|
||||
{
|
||||
var x = Screen.width;
|
||||
var y = Screen.height;
|
||||
|
||||
var hitpoint = Camera.main.WorldToScreenPoint(hit);
|
||||
var edgePoint = Camera.main.WorldToScreenPoint(edge);
|
||||
|
||||
//카메라 끝점 edge와 hit 사이;
|
||||
|
||||
//기울기 가져온다
|
||||
var m = (hitpoint.y - edgePoint.y) / (hitpoint.x - edgePoint.x);
|
||||
if (hitpoint.y > y)
|
||||
{
|
||||
var yPos = y;
|
||||
var xPos = ((yPos - edgePoint.y) / m) + edgePoint.x;
|
||||
hitpoint = new Vector3(xPos, yPos);
|
||||
}
|
||||
else if (hitpoint.y < 0)
|
||||
{
|
||||
var yPos = 0;
|
||||
var xPos = ((yPos - edgePoint.y) / m) + edgePoint.x;
|
||||
hitpoint = new Vector3(xPos, yPos);
|
||||
}
|
||||
|
||||
if (hitpoint.x > x)
|
||||
{
|
||||
var xPos = x;
|
||||
var yPos = (m * (xPos - edgePoint.x)) + edgePoint.y;
|
||||
hitpoint = new Vector3(xPos, yPos);
|
||||
}
|
||||
else if (hitpoint.x < 0)
|
||||
{
|
||||
var xPos = 0;
|
||||
var yPos = (m * (xPos - edgePoint.x)) + edgePoint.y;
|
||||
hitpoint = new Vector3(xPos, yPos);
|
||||
}
|
||||
|
||||
var center = (hitpoint + edgePoint) * 0.5f;
|
||||
return center;
|
||||
}
|
||||
|
||||
void Gizmo()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
// for (int i = 0; i < edges.Length; ++i)
|
||||
// {
|
||||
// Gizmos.DrawSphere(edges[i].pos, 0.1f);
|
||||
// }
|
||||
|
||||
// for (int i = 0; i < hits.Length; ++i)
|
||||
// {
|
||||
// var dir = Dir(dirTable[edges[i]]);
|
||||
// Handles.color = Color.yellow;
|
||||
// Handles.DrawLine(edges[i].pos, hits[i], 1);
|
||||
// Gizmos.DrawRay(edges[i].pos, dir * 10f);
|
||||
// }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Animations/ObjectDistanceLine.cs.meta
Normal file
2
Assets/Animations/ObjectDistanceLine.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfac6b2ea97a0274787f0bf0d086a76d
|
||||
@@ -1,172 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6403074468239445253
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 13273118576283872}
|
||||
- component: {fileID: 538649878903734265}
|
||||
m_Layer: 0
|
||||
m_Name: CustomAssetConnector
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &13273118576283872
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6403074468239445253}
|
||||
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:
|
||||
- {fileID: 4978247003912376479}
|
||||
- {fileID: 1000793883570924469}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &538649878903734265
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6403074468239445253}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 33f84af3802526548befd3c6e68f67d8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1001 &3956852705411700500
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 13273118576283872}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2048176525751629727, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: RenderObjectHandler
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4254239384611290273, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4254239384611290273, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4254239384611290273, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4254239384611290273, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4254239384611290273, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4254239384611290273, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4254239384611290273, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4254239384611290273, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4254239384611290273, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4254239384611290273, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
--- !u!4 &1000793883570924469 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4254239384611290273, guid: 2d670e3279ac3324bba323ab3ed2bef9, type: 3}
|
||||
m_PrefabInstance: {fileID: 3956852705411700500}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &6247234762045722773
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 13273118576283872}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1415515309089783818, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1415515309089783818, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1415515309089783818, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1415515309089783818, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1415515309089783818, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1415515309089783818, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1415515309089783818, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1415515309089783818, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1415515309089783818, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1415515309089783818, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7695058519597474191, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: SaveLoadFBXData
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
--- !u!4 &4978247003912376479 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 1415515309089783818, guid: 20880f5e11bf5724b82b2b3ebd3de3db, type: 3}
|
||||
m_PrefabInstance: {fileID: 6247234762045722773}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
@@ -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
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2048176525751629727
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4254239384611290273}
|
||||
- component: {fileID: 6125667014742207553}
|
||||
m_Layer: 0
|
||||
m_Name: RenderObjectHandler
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4254239384611290273
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2048176525751629727}
|
||||
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: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6125667014742207553
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2048176525751629727}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 23bf878a8d76f9f4d9514e7c393cf926, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
@@ -195,7 +195,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
@@ -386,7 +386,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -825,7 +825,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
|
||||
1416
Assets/Prefabs/UI/Panel_ObjectDistance.prefab
Normal file
1416
Assets/Prefabs/UI/Panel_ObjectDistance.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c4ff86506de88747baaf66d9d637c5b
|
||||
guid: e34354bad51342e4ca9569fd37c9b8dd
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -570,7 +570,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Color: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
@@ -608,10 +608,10 @@ MonoBehaviour:
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
m_HighlightedColor: {r: 0.2980328, g: 0.27319673, b: 0.303, a: 1}
|
||||
m_PressedColor: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
m_SelectedColor: {r: 0.8235294, g: 0.039215688, b: 0.06666667, a: 1}
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
@@ -672,6 +672,9 @@ MonoBehaviour:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
openTime: 0.1
|
||||
closeColor: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
openColor: {r: 0.8235294, g: 0.039215688, b: 0.06666667, a: 1}
|
||||
isButtonImageToggle: 1
|
||||
--- !u!1 &1063646199281932845
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1121,7 +1124,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
@@ -1241,17 +1244,18 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: eeb29fdb1a9fc134aa57e1efd67b4848, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Button_NewProject: {fileID: 0}
|
||||
Button_SaveProject: {fileID: 0}
|
||||
Button_LoadProject: {fileID: 0}
|
||||
Button_DownloadLayout: {fileID: 0}
|
||||
Button_ExportAGVPath: {fileID: 0}
|
||||
Button_ImportAGVPath: {fileID: 0}
|
||||
Button_LoadAssets: {fileID: 0}
|
||||
Button_AssetWindow: {fileID: 0}
|
||||
Button_ComponentWindow: {fileID: 0}
|
||||
Button_Tools: {fileID: 0}
|
||||
button_Icon: {fileID: 0}
|
||||
Button_NewProject: {fileID: 8845531612634989544}
|
||||
Button_SaveProject: {fileID: 7896083598485264292}
|
||||
Button_LoadProject: {fileID: 198223961060221410}
|
||||
Button_DownloadLayout: {fileID: 6398619867125381537}
|
||||
Button_ExportAGVPath: {fileID: 5335094302430846695}
|
||||
Button_ImportAGVPath: {fileID: 4147750155540767454}
|
||||
Button_LoadAssets: {fileID: 1572705195072342980}
|
||||
Button_AssetWindow: {fileID: 9118390163350013474}
|
||||
Button_HierarchyWindow: {fileID: 0}
|
||||
Button_Tools: {fileID: 6255786153821147911}
|
||||
Button_ConflictedListWindow: {fileID: 0}
|
||||
button_Icon: {fileID: 3577280054402309687}
|
||||
--- !u!1 &3034319458232227286
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1465,7 +1469,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Color: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
@@ -1503,10 +1507,10 @@ MonoBehaviour:
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
m_HighlightedColor: {r: 0.2980328, g: 0.27319673, b: 0.303, a: 1}
|
||||
m_PressedColor: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
m_SelectedColor: {r: 0.8235294, g: 0.039215688, b: 0.06666667, a: 1}
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
@@ -1567,6 +1571,9 @@ MonoBehaviour:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
openTime: 0.1
|
||||
closeColor: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
openColor: {r: 0.8235294, g: 0.039215688, b: 0.06666667, a: 1}
|
||||
isButtonImageToggle: 1
|
||||
--- !u!1 &3183454003344235609
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1737,7 +1744,7 @@ RectTransform:
|
||||
m_GameObject: {fileID: 3375801220601729173}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 0, z: 1}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 8294441913557132553}
|
||||
@@ -1748,7 +1755,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: 108, y: -32}
|
||||
m_SizeDelta: {x: 307, y: 154}
|
||||
m_SizeDelta: {x: 307, y: 203}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &139751343822457032
|
||||
CanvasRenderer:
|
||||
@@ -1772,7 +1779,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.16862746, g: 0.1764706, b: 0.24705882, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
@@ -2231,7 +2238,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Color: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
@@ -2269,10 +2276,10 @@ MonoBehaviour:
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
m_HighlightedColor: {r: 0.2980328, g: 0.27319673, b: 0.303, a: 1}
|
||||
m_PressedColor: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
m_SelectedColor: {r: 0.8235294, g: 0.039215688, b: 0.06666667, a: 1}
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
@@ -2333,6 +2340,9 @@ MonoBehaviour:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
openTime: 0.1
|
||||
closeColor: {r: 0.23529412, g: 0.21568628, b: 0.23921569, a: 1}
|
||||
openColor: {r: 0.8235294, g: 0.039215688, b: 0.06666667, a: 1}
|
||||
isButtonImageToggle: 1
|
||||
--- !u!1 &4302929749455078697
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4308,6 +4318,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 8688116085078439031}
|
||||
- {fileID: 4147382167238274784}
|
||||
- {fileID: 5512206668012317612}
|
||||
- {fileID: 5821008458756972882}
|
||||
m_Father: {fileID: 8294441913557132553}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -4398,7 +4409,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -4406,11 +4417,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -4446,11 +4457,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -74
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -4528,7 +4539,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -4536,11 +4547,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -4576,11 +4587,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -121
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -4616,6 +4627,17 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 547219611680456040}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &6255786153821147911 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5857240323948162671, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 547219611680456040}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1001 &686077476744845262
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4694,7 +4716,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -4702,11 +4724,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -4742,11 +4764,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -168
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -4809,11 +4831,144 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
--- !u!114 &6398619867125381537 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5857240323948162671, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 686077476744845262}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!224 &6833388731803765748 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 686077476744845262}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1958845721738098582
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 6851815559567896889}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1009026706481275526, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Button_ConflictedListWindow
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2264174928851290062, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2264174928851290062, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2961650650638036762, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2961650650638036762, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 46
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8232947906609958833, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_text
|
||||
value: Conflicted List
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
--- !u!224 &5512206668012317612 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 1958845721738098582}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1964423804417470600
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4892,7 +5047,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -4900,11 +5055,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -4940,11 +5095,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -215
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -5007,6 +5162,17 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
--- !u!114 &5335094302430846695 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5857240323948162671, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 1964423804417470600}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!224 &5481852742840888498 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
@@ -5024,6 +5190,22 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Button_NewProject
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2264174928851290062, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2264174928851290062, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2961650650638036762, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2961650650638036762, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
@@ -5038,7 +5220,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -5046,11 +5228,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -5086,11 +5268,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -27
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -5109,6 +5291,17 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
--- !u!114 &8845531612634989544 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5857240323948162671, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 3136965122067459463}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!224 &8996151517581488573 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
@@ -5168,7 +5361,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -5176,11 +5369,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -5216,11 +5409,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -27
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -5256,6 +5449,17 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 3441346602397263949}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &9118390163350013474 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5857240323948162671, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 3441346602397263949}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1001 &4385836676027955659
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5334,7 +5538,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -5342,11 +5546,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -5382,11 +5586,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -74
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -5454,6 +5658,17 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 4385836676027955659}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &7896083598485264292 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5857240323948162671, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 4385836676027955659}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1001 &4943340508714165675
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5532,7 +5747,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -5540,11 +5755,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -5580,11 +5795,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -309
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -5652,6 +5867,17 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 4943340508714165675}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1572705195072342980 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5857240323948162671, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 4943340508714165675}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1001 &6019380511333486477
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5730,7 +5956,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -5738,11 +5964,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -5778,11 +6004,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -121
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -5845,6 +6071,17 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
--- !u!114 &198223961060221410 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5857240323948162671, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 6019380511333486477}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!224 &349415598094472119 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
@@ -5928,7 +6165,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -5936,11 +6173,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -5976,11 +6213,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -262
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -6043,6 +6280,17 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
--- !u!114 &4147750155540767454 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5857240323948162671, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
m_PrefabInstance: {fileID: 7549965645376523441}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!224 &4582026471169970315 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
@@ -6090,7 +6338,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -6098,11 +6346,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -6138,11 +6386,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -74
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -6220,7 +6468,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@@ -6228,11 +6476,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 295
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
@@ -6268,11 +6516,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 153.5
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -27
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6291666171046911034, guid: 1bc9e043f1497cd4fbb8e241c26966c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
|
||||
88
Assets/Resources/Prefabs/PRF_ObjectDistanceLine.prefab
Normal file
88
Assets/Resources/Prefabs/PRF_ObjectDistanceLine.prefab
Normal file
@@ -0,0 +1,88 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &5879261464688472025
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5472984000651998200}
|
||||
- component: {fileID: 9157913964040327910}
|
||||
- component: {fileID: 1305656563587261426}
|
||||
m_Layer: 0
|
||||
m_Name: PRF_ObjectDistanceLine
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5472984000651998200
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5879261464688472025}
|
||||
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: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &9157913964040327910
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5879261464688472025}
|
||||
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &1305656563587261426
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5879261464688472025}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 4f1ef37ae953c484bbc5d5e4049147e5, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d670e3279ac3324bba323ab3ed2bef9
|
||||
guid: 06e21ad3a6d17614a8d74d9cc974d7f9
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
using RTG;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XED.Command;
|
||||
using XED.Core;
|
||||
using XED.Manage;
|
||||
|
||||
@@ -107,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)
|
||||
{
|
||||
@@ -135,7 +138,7 @@ namespace XED.RuntimeGizmo
|
||||
RTUndoRedo.Get.Undo();
|
||||
onTransformChanged?.Invoke(transformObjects);
|
||||
});
|
||||
CommandManager.I.AddCommand(command);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace RTG
|
||||
{
|
||||
@@ -341,8 +342,19 @@ namespace RTG
|
||||
if (_transformSpace == GizmoSpace.Global) gizmoTransform.Rotation3D = Quaternion.identity;
|
||||
else
|
||||
{
|
||||
if (_targetPivotObject == null) gizmoTransform.Rotation3D = Quaternion.identity;
|
||||
else gizmoTransform.Rotation3D = _targetPivotObject.transform.rotation;
|
||||
if (_targetPivotObject != null)
|
||||
{
|
||||
gizmoTransform.Rotation3D = _targetPivotObject.transform.rotation;
|
||||
}
|
||||
else if (_targetObjects.Count() == 1)
|
||||
{
|
||||
GameObject pivotObject = _targetObjects.First();
|
||||
gizmoTransform.Rotation3D = pivotObject.transform.rotation;
|
||||
}
|
||||
else
|
||||
{
|
||||
gizmoTransform.Rotation3D = Quaternion.identity;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void RefreshPositionAndRotation()
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.UI.Extensions;
|
||||
using XED.Manage;
|
||||
using XRLib.UI;
|
||||
|
||||
namespace XED.UI
|
||||
@@ -27,6 +28,8 @@ namespace XED.UI
|
||||
|
||||
List<(ConnectionHandlePoint, ConnectionHandlePoint)> connections = new();
|
||||
List<ConnectionHandlePoint> connection = new();
|
||||
|
||||
|
||||
internal void Connect(ConnectionHandlePoint connectionHandlePoint)
|
||||
{
|
||||
connection.Add(connectionHandlePoint);
|
||||
|
||||
@@ -10,17 +10,17 @@ public class CustomMessagePackResolver : IFormatterResolver
|
||||
|
||||
private static readonly Dictionary<Type, object> formatters = new Dictionary<Type, object>
|
||||
{
|
||||
{ typeof(XED.Asset.MaterialPropertyData), new MessagePack.Formatters.XED.Asset.MaterialPropertyDataFormatter() },
|
||||
{ typeof(XED.Asset.ModelData), new MessagePack.Formatters.XED.Asset.ModelDataFormatter() },
|
||||
{ typeof(XED.Asset.SaveData), new MessagePack.Formatters.XED.Asset.SaveDataFormatter() },
|
||||
{ typeof(XED.Asset.SavedModelData), new MessagePack.Formatters.XED.Asset.SavedModelDataFormatter() },
|
||||
{ typeof(XED.Asset.SerializableMesh), new MessagePack.Formatters.XED.Asset.SerializableMeshFormatter() },
|
||||
{ typeof(XED.Asset.SerializableQuaternion), new MessagePack.Formatters.XED.Asset.SerializableQuaternionFormatter() },
|
||||
{ typeof(XED.Asset.SerializableVector2), new MessagePack.Formatters.XED.Asset.SerializableVector2Formatter() },
|
||||
{ typeof(XED.Asset.SerializableVector3), new MessagePack.Formatters.XED.Asset.SerializableVector3Formatter() },
|
||||
{ typeof(XED.Asset.SubmeshData), new MessagePack.Formatters.XED.Asset.SubmeshDataFormatter() },
|
||||
{ typeof(XED.Asset.TextureData), new MessagePack.Formatters.XED.Asset.TextureDataFormatter() },
|
||||
{ typeof(XED.Asset.TransformData), new MessagePack.Formatters.XED.Asset.TransformDataFormatter() },
|
||||
{ typeof(XED.Manage.MaterialPropertyData), new MessagePack.Formatters.XED.Manage.MaterialPropertyDataFormatter() },
|
||||
{ typeof(XED.Manage.ModelData), new MessagePack.Formatters.XED.Manage.ModelDataFormatter() },
|
||||
{ typeof(XED.Manage.SaveData), new MessagePack.Formatters.XED.Manage.SaveDataFormatter() },
|
||||
{ typeof(XED.Manage.SavedModelData), new MessagePack.Formatters.XED.Manage.SavedModelDataFormatter() },
|
||||
{ typeof(XED.Manage.SerializableMesh), new MessagePack.Formatters.XED.Manage.SerializableMeshFormatter() },
|
||||
{ typeof(XED.Manage.SerializableQuaternion), new MessagePack.Formatters.XED.Manage.SerializableQuaternionFormatter() },
|
||||
{ typeof(XED.Manage.SerializableVector2), new MessagePack.Formatters.XED.Manage.SerializableVector2Formatter() },
|
||||
{ typeof(XED.Manage.SerializableVector3), new MessagePack.Formatters.XED.Manage.SerializableVector3Formatter() },
|
||||
{ typeof(XED.Manage.SubmeshData), new MessagePack.Formatters.XED.Manage.SubmeshDataFormatter() },
|
||||
{ typeof(XED.Manage.TextureData), new MessagePack.Formatters.XED.Manage.TextureDataFormatter() },
|
||||
{ typeof(XED.Manage.TransformData), new MessagePack.Formatters.XED.Manage.TransformDataFormatter() },
|
||||
};
|
||||
|
||||
public IMessagePackFormatter<T> GetFormatter<T>()
|
||||
|
||||
@@ -49,29 +49,29 @@ namespace MessagePack.Resolvers
|
||||
{
|
||||
lookup = new global::System.Collections.Generic.Dictionary<global::System.Type, int>(23)
|
||||
{
|
||||
{ typeof(global::XED.Asset.MaterialPropertyData[]), 0 },
|
||||
{ typeof(global::XED.Asset.ModelData[]), 1 },
|
||||
{ typeof(global::XED.Asset.SavedModelData[]), 2 },
|
||||
{ typeof(global::XED.Asset.SerializableVector2[]), 3 },
|
||||
{ typeof(global::XED.Asset.SerializableVector3[]), 4 },
|
||||
{ typeof(global::XED.Asset.SerializableVector4[]), 5 },
|
||||
{ typeof(global::XED.Asset.SubmeshData[]), 6 },
|
||||
{ typeof(global::XED.Asset.TextureData[]), 7 },
|
||||
{ typeof(global::XED.Asset.ThumbnailData[]), 8 },
|
||||
{ typeof(global::XED.Manage.MaterialPropertyData[]), 0 },
|
||||
{ typeof(global::XED.Manage.ModelData[]), 1 },
|
||||
{ typeof(global::XED.Manage.SavedModelData[]), 2 },
|
||||
{ typeof(global::XED.Manage.SerializableVector2[]), 3 },
|
||||
{ typeof(global::XED.Manage.SerializableVector3[]), 4 },
|
||||
{ typeof(global::XED.Manage.SerializableVector4[]), 5 },
|
||||
{ typeof(global::XED.Manage.SubmeshData[]), 6 },
|
||||
{ typeof(global::XED.Manage.TextureData[]), 7 },
|
||||
{ typeof(global::XED.Manage.ThumbnailData[]), 8 },
|
||||
{ typeof(string[][]), 9 },
|
||||
{ typeof(global::XED.Asset.MaterialPropertyData), 10 },
|
||||
{ typeof(global::XED.Asset.ModelData), 11 },
|
||||
{ typeof(global::XED.Asset.SaveData), 12 },
|
||||
{ typeof(global::XED.Asset.SavedModelData), 13 },
|
||||
{ typeof(global::XED.Asset.SerializableMesh), 14 },
|
||||
{ typeof(global::XED.Asset.SerializableQuaternion), 15 },
|
||||
{ typeof(global::XED.Asset.SerializableVector2), 16 },
|
||||
{ typeof(global::XED.Asset.SerializableVector3), 17 },
|
||||
{ typeof(global::XED.Asset.SerializableVector4), 18 },
|
||||
{ typeof(global::XED.Asset.SubmeshData), 19 },
|
||||
{ typeof(global::XED.Asset.TextureData), 20 },
|
||||
{ typeof(global::XED.Asset.ThumbnailData), 21 },
|
||||
{ typeof(global::XED.Asset.TransformData), 22 },
|
||||
{ typeof(global::XED.Manage.MaterialPropertyData), 10 },
|
||||
{ typeof(global::XED.Manage.ModelData), 11 },
|
||||
{ typeof(global::XED.Manage.SaveData), 12 },
|
||||
{ typeof(global::XED.Manage.SavedModelData), 13 },
|
||||
{ typeof(global::XED.Manage.SerializableMesh), 14 },
|
||||
{ typeof(global::XED.Manage.SerializableQuaternion), 15 },
|
||||
{ typeof(global::XED.Manage.SerializableVector2), 16 },
|
||||
{ typeof(global::XED.Manage.SerializableVector3), 17 },
|
||||
{ typeof(global::XED.Manage.SerializableVector4), 18 },
|
||||
{ typeof(global::XED.Manage.SubmeshData), 19 },
|
||||
{ typeof(global::XED.Manage.TextureData), 20 },
|
||||
{ typeof(global::XED.Manage.ThumbnailData), 21 },
|
||||
{ typeof(global::XED.Manage.TransformData), 22 },
|
||||
};
|
||||
}
|
||||
|
||||
@@ -85,29 +85,29 @@ namespace MessagePack.Resolvers
|
||||
|
||||
switch (key)
|
||||
{
|
||||
case 0: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Asset.MaterialPropertyData>();
|
||||
case 1: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Asset.ModelData>();
|
||||
case 2: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Asset.SavedModelData>();
|
||||
case 3: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Asset.SerializableVector2>();
|
||||
case 4: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Asset.SerializableVector3>();
|
||||
case 5: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Asset.SerializableVector4>();
|
||||
case 6: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Asset.SubmeshData>();
|
||||
case 7: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Asset.TextureData>();
|
||||
case 8: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Asset.ThumbnailData>();
|
||||
case 0: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.MaterialPropertyData>();
|
||||
case 1: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.ModelData>();
|
||||
case 2: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.SavedModelData>();
|
||||
case 3: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.SerializableVector2>();
|
||||
case 4: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.SerializableVector3>();
|
||||
case 5: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.SerializableVector4>();
|
||||
case 6: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.SubmeshData>();
|
||||
case 7: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.TextureData>();
|
||||
case 8: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.ThumbnailData>();
|
||||
case 9: return new global::MessagePack.Formatters.ArrayFormatter<string[]>();
|
||||
case 10: return new MessagePack.Formatters.XED.Asset.MaterialPropertyDataFormatter();
|
||||
case 11: return new MessagePack.Formatters.XED.Asset.ModelDataFormatter();
|
||||
case 12: return new MessagePack.Formatters.XED.Asset.SaveDataFormatter();
|
||||
case 13: return new MessagePack.Formatters.XED.Asset.SavedModelDataFormatter();
|
||||
case 14: return new MessagePack.Formatters.XED.Asset.SerializableMeshFormatter();
|
||||
case 15: return new MessagePack.Formatters.XED.Asset.SerializableQuaternionFormatter();
|
||||
case 16: return new MessagePack.Formatters.XED.Asset.SerializableVector2Formatter();
|
||||
case 17: return new MessagePack.Formatters.XED.Asset.SerializableVector3Formatter();
|
||||
case 18: return new MessagePack.Formatters.XED.Asset.SerializableVector4Formatter();
|
||||
case 19: return new MessagePack.Formatters.XED.Asset.SubmeshDataFormatter();
|
||||
case 20: return new MessagePack.Formatters.XED.Asset.TextureDataFormatter();
|
||||
case 21: return new MessagePack.Formatters.XED.Asset.ThumbnailDataFormatter();
|
||||
case 22: return new MessagePack.Formatters.XED.Asset.TransformDataFormatter();
|
||||
case 10: return new MessagePack.Formatters.XED.Manage.MaterialPropertyDataFormatter();
|
||||
case 11: return new MessagePack.Formatters.XED.Manage.ModelDataFormatter();
|
||||
case 12: return new MessagePack.Formatters.XED.Manage.SaveDataFormatter();
|
||||
case 13: return new MessagePack.Formatters.XED.Manage.SavedModelDataFormatter();
|
||||
case 14: return new MessagePack.Formatters.XED.Manage.SerializableMeshFormatter();
|
||||
case 15: return new MessagePack.Formatters.XED.Manage.SerializableQuaternionFormatter();
|
||||
case 16: return new MessagePack.Formatters.XED.Manage.SerializableVector2Formatter();
|
||||
case 17: return new MessagePack.Formatters.XED.Manage.SerializableVector3Formatter();
|
||||
case 18: return new MessagePack.Formatters.XED.Manage.SerializableVector4Formatter();
|
||||
case 19: return new MessagePack.Formatters.XED.Manage.SubmeshDataFormatter();
|
||||
case 20: return new MessagePack.Formatters.XED.Manage.TextureDataFormatter();
|
||||
case 21: return new MessagePack.Formatters.XED.Manage.ThumbnailDataFormatter();
|
||||
case 22: return new MessagePack.Formatters.XED.Manage.TransformDataFormatter();
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
@@ -141,12 +141,12 @@ namespace MessagePack.Resolvers
|
||||
#pragma warning disable SA1403 // File may only contain a single namespace
|
||||
#pragma warning disable SA1649 // File name should match first type name
|
||||
|
||||
namespace MessagePack.Formatters.XED.Asset
|
||||
namespace MessagePack.Formatters.XED.Manage
|
||||
{
|
||||
public sealed class MaterialPropertyDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.MaterialPropertyData>
|
||||
public sealed class MaterialPropertyDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.MaterialPropertyData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.MaterialPropertyData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.MaterialPropertyData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -169,7 +169,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[]>(formatterResolver).Serialize(ref writer, value.texUIDs, options);
|
||||
}
|
||||
|
||||
public global::XED.Asset.MaterialPropertyData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.MaterialPropertyData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -179,7 +179,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
options.Security.DepthStep(ref reader);
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::XED.Asset.MaterialPropertyData();
|
||||
var ____result = new global::XED.Manage.MaterialPropertyData();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
@@ -229,10 +229,10 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.ModelData>
|
||||
public sealed class ModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.ModelData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.ModelData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.ModelData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -245,12 +245,12 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
writer.Write(value.id);
|
||||
writer.Write(value.parentId);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.modelComponentName, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.TransformData>(formatterResolver).Serialize(ref writer, value.transformData, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableMesh>(formatterResolver).Serialize(ref writer, value.mesh, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.MaterialPropertyData[]>(formatterResolver).Serialize(ref writer, value.materialProperties, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.TransformData>(formatterResolver).Serialize(ref writer, value.transformData, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableMesh>(formatterResolver).Serialize(ref writer, value.mesh, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.MaterialPropertyData[]>(formatterResolver).Serialize(ref writer, value.materialProperties, options);
|
||||
}
|
||||
|
||||
public global::XED.Asset.ModelData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.ModelData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -260,7 +260,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
options.Security.DepthStep(ref reader);
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::XED.Asset.ModelData();
|
||||
var ____result = new global::XED.Manage.ModelData();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
@@ -276,13 +276,13 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
____result.modelComponentName = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 3:
|
||||
____result.transformData = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.TransformData>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.transformData = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.TransformData>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 4:
|
||||
____result.mesh = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableMesh>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.mesh = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableMesh>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 5:
|
||||
____result.materialProperties = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.MaterialPropertyData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.materialProperties = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.MaterialPropertyData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
@@ -295,10 +295,10 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SaveDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.SaveData>
|
||||
public sealed class SaveDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SaveData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SaveData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SaveData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -308,12 +308,12 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
writer.WriteArrayHeader(3);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SavedModelData[]>(formatterResolver).Serialize(ref writer, value.modelDatas, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.TextureData[]>(formatterResolver).Serialize(ref writer, value.textureDatas, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.ThumbnailData[]>(formatterResolver).Serialize(ref writer, value.thumbnailDatas, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SavedModelData[]>(formatterResolver).Serialize(ref writer, value.modelDatas, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.TextureData[]>(formatterResolver).Serialize(ref writer, value.textureDatas, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.ThumbnailData[]>(formatterResolver).Serialize(ref writer, value.thumbnailDatas, options);
|
||||
}
|
||||
|
||||
public global::XED.Asset.SaveData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.SaveData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -323,20 +323,20 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
options.Security.DepthStep(ref reader);
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::XED.Asset.SaveData();
|
||||
var ____result = new global::XED.Manage.SaveData();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
____result.modelDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SavedModelData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.modelDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SavedModelData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 1:
|
||||
____result.textureDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.TextureData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.textureDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.TextureData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 2:
|
||||
____result.thumbnailDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.ThumbnailData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.thumbnailDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.ThumbnailData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
@@ -349,10 +349,10 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SavedModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.SavedModelData>
|
||||
public sealed class SavedModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SavedModelData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SavedModelData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SavedModelData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -363,10 +363,10 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
writer.WriteArrayHeader(2);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[][]>(formatterResolver).Serialize(ref writer, value.attributes, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.ModelData[]>(formatterResolver).Serialize(ref writer, value.models, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.ModelData[]>(formatterResolver).Serialize(ref writer, value.models, options);
|
||||
}
|
||||
|
||||
public global::XED.Asset.SavedModelData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.SavedModelData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -376,7 +376,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
options.Security.DepthStep(ref reader);
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::XED.Asset.SavedModelData();
|
||||
var ____result = new global::XED.Manage.SavedModelData();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
@@ -386,7 +386,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
____result.attributes = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[][]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 1:
|
||||
____result.models = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.ModelData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.models = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.ModelData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
@@ -399,10 +399,10 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SerializableMeshFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.SerializableMesh>
|
||||
public sealed class SerializableMeshFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SerializableMesh>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SerializableMesh value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SerializableMesh value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -412,14 +412,14 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
writer.WriteArrayHeader(5);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector3[]>(formatterResolver).Serialize(ref writer, value.vertices, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector3[]>(formatterResolver).Serialize(ref writer, value.normals, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector4[]>(formatterResolver).Serialize(ref writer, value.tangents, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector2[]>(formatterResolver).Serialize(ref writer, value.uv, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SubmeshData[]>(formatterResolver).Serialize(ref writer, value.submeshes, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3[]>(formatterResolver).Serialize(ref writer, value.vertices, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3[]>(formatterResolver).Serialize(ref writer, value.normals, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector4[]>(formatterResolver).Serialize(ref writer, value.tangents, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector2[]>(formatterResolver).Serialize(ref writer, value.uv, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SubmeshData[]>(formatterResolver).Serialize(ref writer, value.submeshes, options);
|
||||
}
|
||||
|
||||
public global::XED.Asset.SerializableMesh Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.SerializableMesh Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -429,26 +429,26 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
options.Security.DepthStep(ref reader);
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::XED.Asset.SerializableMesh();
|
||||
var ____result = new global::XED.Manage.SerializableMesh();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
____result.vertices = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector3[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.vertices = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 1:
|
||||
____result.normals = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector3[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.normals = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 2:
|
||||
____result.tangents = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector4[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.tangents = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector4[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 3:
|
||||
____result.uv = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector2[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.uv = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector2[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 4:
|
||||
____result.submeshes = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SubmeshData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.submeshes = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SubmeshData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
@@ -461,10 +461,10 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SerializableQuaternionFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.SerializableQuaternion>
|
||||
public sealed class SerializableQuaternionFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SerializableQuaternion>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SerializableQuaternion value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SerializableQuaternion value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
writer.WriteArrayHeader(4);
|
||||
writer.Write(value.x);
|
||||
@@ -473,7 +473,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
writer.Write(value.w);
|
||||
}
|
||||
|
||||
public global::XED.Asset.SerializableQuaternion Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.SerializableQuaternion Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -482,7 +482,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
|
||||
options.Security.DepthStep(ref reader);
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::XED.Asset.SerializableQuaternion();
|
||||
var ____result = new global::XED.Manage.SerializableQuaternion();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
@@ -511,17 +511,17 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SerializableVector2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.SerializableVector2>
|
||||
public sealed class SerializableVector2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SerializableVector2>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SerializableVector2 value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SerializableVector2 value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
writer.WriteArrayHeader(2);
|
||||
writer.Write(value.x);
|
||||
writer.Write(value.y);
|
||||
}
|
||||
|
||||
public global::XED.Asset.SerializableVector2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.SerializableVector2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -549,16 +549,16 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
var ____result = new global::XED.Asset.SerializableVector2(__x__, __y__);
|
||||
var ____result = new global::XED.Manage.SerializableVector2(__x__, __y__);
|
||||
reader.Depth--;
|
||||
return ____result;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SerializableVector3Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.SerializableVector3>
|
||||
public sealed class SerializableVector3Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SerializableVector3>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SerializableVector3 value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SerializableVector3 value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
writer.WriteArrayHeader(3);
|
||||
writer.Write(value.x);
|
||||
@@ -566,7 +566,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
writer.Write(value.z);
|
||||
}
|
||||
|
||||
public global::XED.Asset.SerializableVector3 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.SerializableVector3 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -598,16 +598,16 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
var ____result = new global::XED.Asset.SerializableVector3(__x__, __y__, __z__);
|
||||
var ____result = new global::XED.Manage.SerializableVector3(__x__, __y__, __z__);
|
||||
reader.Depth--;
|
||||
return ____result;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SerializableVector4Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.SerializableVector4>
|
||||
public sealed class SerializableVector4Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SerializableVector4>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SerializableVector4 value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SerializableVector4 value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
writer.WriteArrayHeader(4);
|
||||
writer.Write(value.x);
|
||||
@@ -616,7 +616,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
writer.Write(value.w);
|
||||
}
|
||||
|
||||
public global::XED.Asset.SerializableVector4 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.SerializableVector4 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -652,16 +652,16 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
var ____result = new global::XED.Asset.SerializableVector4(__x__, __y__, __z__, __w__);
|
||||
var ____result = new global::XED.Manage.SerializableVector4(__x__, __y__, __z__, __w__);
|
||||
reader.Depth--;
|
||||
return ____result;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SubmeshDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.SubmeshData>
|
||||
public sealed class SubmeshDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SubmeshData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SubmeshData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SubmeshData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -675,7 +675,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[]>(formatterResolver).Serialize(ref writer, value.triangles, options);
|
||||
}
|
||||
|
||||
public global::XED.Asset.SubmeshData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.SubmeshData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -685,7 +685,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
options.Security.DepthStep(ref reader);
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::XED.Asset.SubmeshData();
|
||||
var ____result = new global::XED.Manage.SubmeshData();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
@@ -708,10 +708,10 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class TextureDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.TextureData>
|
||||
public sealed class TextureDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.TextureData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.TextureData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.TextureData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -726,7 +726,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
writer.Write(value.data);
|
||||
}
|
||||
|
||||
public global::XED.Asset.TextureData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.TextureData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -759,16 +759,16 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
var ____result = new global::XED.Asset.TextureData(__name__, __uid__, __data__);
|
||||
var ____result = new global::XED.Manage.TextureData(__name__, __uid__, __data__);
|
||||
reader.Depth--;
|
||||
return ____result;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ThumbnailDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.ThumbnailData>
|
||||
public sealed class ThumbnailDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.ThumbnailData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.ThumbnailData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.ThumbnailData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -780,7 +780,7 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
writer.Write(value.data);
|
||||
}
|
||||
|
||||
public global::XED.Asset.ThumbnailData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.ThumbnailData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -804,16 +804,16 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
}
|
||||
}
|
||||
|
||||
var ____result = new global::XED.Asset.ThumbnailData(__data__);
|
||||
var ____result = new global::XED.Manage.ThumbnailData(__data__);
|
||||
reader.Depth--;
|
||||
return ____result;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class TransformDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Asset.TransformData>
|
||||
public sealed class TransformDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.TransformData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.TransformData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.TransformData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -823,12 +823,12 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
writer.WriteArrayHeader(3);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector3>(formatterResolver).Serialize(ref writer, value.position, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableQuaternion>(formatterResolver).Serialize(ref writer, value.rotation, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector3>(formatterResolver).Serialize(ref writer, value.scale, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3>(formatterResolver).Serialize(ref writer, value.position, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableQuaternion>(formatterResolver).Serialize(ref writer, value.rotation, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3>(formatterResolver).Serialize(ref writer, value.scale, options);
|
||||
}
|
||||
|
||||
public global::XED.Asset.TransformData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::XED.Manage.TransformData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -838,20 +838,20 @@ namespace MessagePack.Formatters.XED.Asset
|
||||
options.Security.DepthStep(ref reader);
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::XED.Asset.TransformData();
|
||||
var ____result = new global::XED.Manage.TransformData();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
____result.position = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector3>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.position = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 1:
|
||||
____result.rotation = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableQuaternion>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.rotation = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableQuaternion>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 2:
|
||||
____result.scale = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Asset.SerializableVector3>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.scale = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
using XED.Asset;
|
||||
using XED.Command;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class CreateInterferedObjectButtonCommand : IReversibleCommand
|
||||
{
|
||||
public CreateInterferedObjectButtonCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
}
|
||||
|
||||
public void Undo()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57aaa2e5b1c74a74b955b7cdc045e483
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3e04d3969bc8524db95f7a57e8357f8
|
||||
@@ -5,83 +5,88 @@ using XRLib;
|
||||
using XED.Manage;
|
||||
using XED.Command;
|
||||
using XED.Util;
|
||||
using XED.Hierarchy;
|
||||
using XED.HierarchyTree;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using System;
|
||||
using XED.Core;
|
||||
using System.Collections;
|
||||
|
||||
namespace XED.Asset
|
||||
{
|
||||
public class CustomAssetConnector : MonoBehaviour, ISingle
|
||||
public class CustomAssetConnector : Manager
|
||||
{
|
||||
public PooledScrollView assetScrollView;
|
||||
public CustomScrollRect assetScrollRect;
|
||||
public PooledScrollView componentScrollView;
|
||||
public PooledScrollView InterworkingDataScrollView;
|
||||
public Panel_ObjectDistance panel_ObjectDistance;
|
||||
public GameObject renderObjectPrefab;
|
||||
public float objectShowDistance = 1000.0f;
|
||||
|
||||
public InterferedObjectManager interferedObjectManager;
|
||||
public List<ConnectedAsset> connectedAssets = new List<ConnectedAsset>();
|
||||
public List<CustomAssetData> selectedAssetDatas = new List<CustomAssetData>();
|
||||
public CustomAssetData selectedAssetData;
|
||||
public GameObject selectedItem;
|
||||
public CustomAssetRenderObject selectRenderObject;
|
||||
|
||||
public SaveLoadFBXData saveLoadFBXData;
|
||||
public RenderObjectHandler renderObjectHandler;
|
||||
public System.Action<string, List<GameObject>> onSelectObjects;
|
||||
public System.Action onDeselectObjects;
|
||||
public System.Action onRemoveObjects;
|
||||
public System.Action onAssetDropped;
|
||||
|
||||
public CustomAssetDataHandler assetDataHandler;
|
||||
public CustomAssetEventHandler assetEventHandler;
|
||||
public CustomAssetCommandHandler assetCommandHandler;
|
||||
|
||||
ProjectManager projectManager;
|
||||
void Awake()
|
||||
public CustomAssetConnector()
|
||||
{
|
||||
saveLoadFBXData = FindFirstObjectByType<SaveLoadFBXData>();
|
||||
renderObjectHandler = FindFirstObjectByType<RenderObjectHandler>();
|
||||
assetDataHandler = new CustomAssetDataHandler(this);
|
||||
assetEventHandler = new CustomAssetEventHandler(this);
|
||||
assetCommandHandler = new CustomAssetCommandHandler(this);
|
||||
projectManager = FindSingle<ProjectManager>();
|
||||
|
||||
assetDataHandler = new CustomAssetDataHandler();
|
||||
assetEventHandler = new CustomAssetEventHandler();
|
||||
}
|
||||
void Start()
|
||||
public override void Init()
|
||||
{
|
||||
assetScrollRect = FindSingle<Canvas_Popup>().panel_assetlibrary.scrollRect;
|
||||
assetScrollView = FindSingle<Canvas_Popup>().panel_assetlibrary.scrollView;
|
||||
componentScrollView = FindSingle<Canvas_Popup>().panel_hierarchy.scrollView;
|
||||
InterworkingDataScrollView = FindSingle<Canvas_Popup>().panel_interworkingdatalist.scrollView;
|
||||
renderObjectPrefab = Resources.Load<GameObject>("Prefabs/PRF_RenderObject");
|
||||
|
||||
interferedObjectManager = ManagerHub.instance.Get<InterferedObjectManager>();
|
||||
assetScrollRect = EventConnector.instance.GetCanvas<Canvas_Popup>().panel_assetlibrary.scrollRect;
|
||||
assetScrollRect.onDragBegin.AddListener(OnAssetSelected);
|
||||
assetScrollRect.onDragAndDrop.AddListener(OnAssetDropped);
|
||||
assetScrollView.onSelect.AddListener(assetEventHandler.OnSelectAssetFromHierarchy);
|
||||
|
||||
InterworkingDataScrollView = EventConnector.instance.GetCanvas<Canvas_Popup>().panel_interworkingdatalist.scrollView;
|
||||
InterworkingDataScrollView.onSelect.AddListener(assetEventHandler.OnSelectDataFromHierarchy);
|
||||
|
||||
assetScrollView = EventConnector.instance.GetCanvas<Canvas_Popup>().panel_assetlibrary.scrollView;
|
||||
assetScrollView.onSelect.AddListener(assetEventHandler.OnSelectAssetFromHierarchy);
|
||||
|
||||
componentScrollView = EventConnector.instance.GetCanvas<Canvas_Popup>().panel_hierarchy.scrollView;
|
||||
componentScrollView.onSelect.AddListener(assetEventHandler.OnSelectObjectFromHierarchy);
|
||||
componentScrollView.onParentChanged.AddListener(OnParentChanged);
|
||||
saveLoadFBXData.onLoadFbxFile.AddListener(assetDataHandler.OnLoadFbxFile);
|
||||
|
||||
saveLoadFBXData.onRemoveFbxFile.AddListener(assetDataHandler.OnRemoveFbxFile);
|
||||
renderObjectHandler.onSelectObject.AddListener(assetEventHandler.OnSelectObjectFromObjectHandler);
|
||||
renderObjectHandler.onCopyObject.AddListener(assetCommandHandler.OnCopyObject);
|
||||
renderObjectHandler.onRemoveObject.AddListener(assetCommandHandler.OnRemoveObject);
|
||||
renderObjectHandler.onOrderByHierachy.AddListener(OrderByHierarchy);
|
||||
renderObjectHandler.onDeselectAll += OnDeselectAll;
|
||||
|
||||
projectManager.onRemoveAsset += assetCommandHandler.OnRemoveObject;
|
||||
panel_ObjectDistance = EventConnector.instance.GetCanvas<Canvas_Popup>().panel_objectdistance;
|
||||
|
||||
renderObjectPrefab = Resources.Load<GameObject>("Prefabs/PRF_RenderObject");
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
public void OnCopyObject(List<CustomAssetRenderObject> objects)
|
||||
{
|
||||
//for (int i = 0; i < connectedAssets.Count; i++)
|
||||
//{
|
||||
// Debug.Log(connectedAssets[i].hierarchyItem.name + " "+ connectedAssets[i].hierarchyItem.GetSiblingIndex());
|
||||
//}
|
||||
if (selectedAssetData != null)
|
||||
if (objects.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
List<ConnectedAsset> copySources = new List<ConnectedAsset>();
|
||||
List<ConnectedAsset> copyList = new List<ConnectedAsset>();
|
||||
for (int i = 0; i < objects.Count; i++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connectedAssets.Find((x) => x.renderObject == objects[i]);
|
||||
copySources.Add(searchAsset);
|
||||
ConnectedAsset copyAsset = new ConnectedAsset();
|
||||
copyList.Add(copyAsset);
|
||||
connectedAssets.Add(copyAsset);
|
||||
}
|
||||
var command = new CopyObjectCommand();
|
||||
|
||||
}
|
||||
|
||||
IEnumerator ChangeSelectedAssetTransform()
|
||||
{
|
||||
while (selectedAssetData != null)
|
||||
{
|
||||
Vector3? pos = GetMousePointOnYPlane(objectShowDistance);
|
||||
if (pos.HasValue)
|
||||
@@ -89,16 +94,10 @@ namespace XED.Asset
|
||||
selectedItem.transform.position = pos.Value;
|
||||
selectedAssetData.OnTransformDataChanged();
|
||||
}
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
void OnLoadInterworkingData()
|
||||
{
|
||||
HierarchyItem item = InterworkingDataScrollView.AddItem("IdName", HierarchyItemType.data);
|
||||
}
|
||||
|
||||
public void OnAssetSelected(HierarchyItem item)
|
||||
{
|
||||
if (item == null || item.linkedObject == null)
|
||||
@@ -112,13 +111,17 @@ namespace XED.Asset
|
||||
selectedAssetData = null;
|
||||
return;
|
||||
}
|
||||
selectedItem = Instantiate(renderObjectPrefab);
|
||||
selectedItem = UnityEngine.GameObject.Instantiate(renderObjectPrefab);
|
||||
selectRenderObject = selectedItem.GetComponent<CustomAssetRenderObject>();
|
||||
selectRenderObject.OnOverlabBegin += interferedObjectManager.AddInterferedPair;
|
||||
selectRenderObject.OnOverlabEnd += interferedObjectManager.RemoveInterferedPair;
|
||||
selectRenderObject.OnSelected += panel_ObjectDistance.SelectObjectFromCreate;
|
||||
selectRenderObject.instantiateObject = selectedAssetData.InstantiateLoadedObject;
|
||||
selectRenderObject.getBounds = selectedAssetData.GetCombinedBoundary;
|
||||
selectRenderObject.CreateRenderObject();
|
||||
selectRenderObject.Select();
|
||||
selectedAssetData.AddTransformToRender(selectedItem.transform);
|
||||
CoroutineRunner.instance.StartCoroutine(ChangeSelectedAssetTransform());
|
||||
}
|
||||
public void OnAssetDropped(HierarchyItem item)
|
||||
{
|
||||
@@ -127,17 +130,30 @@ namespace XED.Asset
|
||||
bool isPointerOutScrollRect = !assetScrollRect.IsPointerOverScrollRect();
|
||||
if (item != null && isPointerOutScrollRect)
|
||||
{
|
||||
assetCommandHandler.CreateConnectedAsset();
|
||||
CreateConnectedAsset();
|
||||
}
|
||||
else
|
||||
{
|
||||
selectedAssetData.RemoveTransform(selectedItem.transform);
|
||||
Destroy(selectedItem);
|
||||
UnityEngine.GameObject.Destroy(selectedItem);
|
||||
}
|
||||
selectRenderObject.Deselect();
|
||||
selectedAssetData = null;
|
||||
onAssetDropped?.Invoke();
|
||||
}
|
||||
|
||||
void CreateConnectedAsset()
|
||||
{
|
||||
ConnectedAsset connectedAsset = new ConnectedAsset
|
||||
{
|
||||
assetData = selectedAssetData,
|
||||
hierarchyItem = componentScrollView.AddItem(selectedAssetData.assetName, selectedItem, HierarchyItemType.obj),
|
||||
renderObject = selectRenderObject
|
||||
};
|
||||
connectedAsset.renderObject.onTransformChanged = connectedAsset.assetData.OnTransformDataChanged;
|
||||
var command = new CreateConnectedAssetCommand(connectedAsset, this);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
public void OnParentChanged(HierarchyItem parentItem, HierarchyItem childItem)
|
||||
{
|
||||
ConnectedAsset parentAsset = connectedAssets.Find((x) => x.hierarchyItem == parentItem);
|
||||
@@ -162,17 +178,21 @@ namespace XED.Asset
|
||||
selectRenderObject.transform.localScale = new Vector3(asset.scale.x, asset.scale.y, asset.scale.z);
|
||||
OnAssetDropped(item);
|
||||
}
|
||||
|
||||
public void OnRestoreHierarchy(HierarchyItem parentItem, HierarchyItem childItem)
|
||||
{
|
||||
componentScrollView.selectedItems.Add(childItem);
|
||||
componentScrollView.SetToChildItem(childItem, parentItem);
|
||||
componentScrollView.DeselectAll();
|
||||
}
|
||||
|
||||
public void OnDeselectAll()
|
||||
{
|
||||
onDeselectObjects?.Invoke();
|
||||
var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>();
|
||||
canvas_Popup.panel_objectinfo.gameObject.SetActive(false);
|
||||
componentScrollView.DeselectAll();
|
||||
}
|
||||
|
||||
public void OrderByHierarchy(List<CustomAssetRenderObject> objectsToOrder)
|
||||
{
|
||||
SortedDictionary<int, CustomAssetRenderObject> itemToObject = new SortedDictionary<int, CustomAssetRenderObject>();
|
||||
@@ -184,6 +204,7 @@ namespace XED.Asset
|
||||
}
|
||||
objectsToOrder = itemToObject.Values.ToList();
|
||||
}
|
||||
|
||||
Vector3? GetMousePointOnYPlane(float maxDistance)
|
||||
{
|
||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
@@ -197,6 +218,14 @@ namespace XED.Asset
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
internal void OnSelectObjects(string name, List<GameObject> selectedObjects)
|
||||
{
|
||||
var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>();
|
||||
canvas_Popup.panel_objectinfo.gameObject.SetActive(true);
|
||||
canvas_Popup.panel_objectinfo.SetObjectInfo(name, selectedObjects);
|
||||
canvas_Popup.panel_objectdistance.SelectObjectFromClick(name, selectedObjects);
|
||||
}
|
||||
}
|
||||
public class ConnectedAsset
|
||||
{
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
using XED.Asset;
|
||||
using XED.Hierarchy;
|
||||
using XED.HierarchyTree;
|
||||
using XED.Manage;
|
||||
using XED.Util;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
public class CustomAssetDataHandler
|
||||
{
|
||||
private CustomAssetConnector connector;
|
||||
|
||||
public CustomAssetDataHandler(CustomAssetConnector connector)
|
||||
{
|
||||
this.connector = connector;
|
||||
}
|
||||
|
||||
public void OnLoadFbxFile(string objectName, string folderName, CustomAssetData assetData)
|
||||
{
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
HierarchyItem parent = connector.assetScrollView.FindItem(folderName, HierarchyItemType.folder) ?? connector.assetScrollView.AddItem(folderName, null, HierarchyItemType.folder);
|
||||
HierarchyItem item = connector.assetScrollView.AddItem(objectName, assetData.gameObject, HierarchyItemType.file, parent);
|
||||
assetData.onLoadProgress.RemoveAllListeners();
|
||||
@@ -23,17 +18,21 @@ namespace XED
|
||||
|
||||
public void OnRemoveFbxFile(string objectName)
|
||||
{
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
connector.assetScrollView.RemoveItem(objectName, HierarchyItemType.file);
|
||||
}
|
||||
|
||||
public void SaveSelectedAssetDatasToLocal()
|
||||
{
|
||||
connector.saveLoadFBXData.SaveToLocalData(connector.selectedAssetDatas);
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
var fbxFileManager = ManagerHub.instance.Get<FBXFileManager>();
|
||||
fbxFileManager.SaveToLocalData(connector.selectedAssetDatas);
|
||||
}
|
||||
|
||||
public void LoadLocalAssetDatas()
|
||||
{
|
||||
connector.saveLoadFBXData.LoadLocalData();
|
||||
var fbxFileManager = ManagerHub.instance.Get<FBXFileManager>();
|
||||
// fbxFileManager.LoadLocalData();
|
||||
}
|
||||
}
|
||||
}
|
||||
54
Assets/Scripts/Studio/AssetTool/CustomAssetDataRepository.cs
Normal file
54
Assets/Scripts/Studio/AssetTool/CustomAssetDataRepository.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using XED.Util;
|
||||
|
||||
namespace XED.Repositories
|
||||
{
|
||||
public class CustomAssetDataRepository
|
||||
{
|
||||
List<CustomAssetData> assetDatas = new List<CustomAssetData>();
|
||||
|
||||
public bool isEmpty => assetDatas.Count == 0;
|
||||
|
||||
public void Add(CustomAssetData data)
|
||||
{
|
||||
assetDatas.Add(data);
|
||||
}
|
||||
|
||||
public bool TryGetDataFromPath(string path, out CustomAssetData data)
|
||||
{
|
||||
data = FindFromPath(path);
|
||||
return data != null;
|
||||
}
|
||||
|
||||
public CustomAssetData FindFromPath(string path)
|
||||
{
|
||||
if(path==null)
|
||||
return null;
|
||||
|
||||
return assetDatas.Find(data => data.localFBXPath == path);
|
||||
}
|
||||
|
||||
internal void Remove(CustomAssetData assetData)
|
||||
{
|
||||
assetDatas.Remove(assetData);
|
||||
}
|
||||
|
||||
internal bool TryGetDataFromName(string name, out CustomAssetData p)
|
||||
{
|
||||
p = FindFromName(name);
|
||||
return p != null;
|
||||
}
|
||||
|
||||
public CustomAssetData FindFromName(string name)
|
||||
{
|
||||
return assetDatas.Find(data => data.assetName == name);
|
||||
}
|
||||
|
||||
internal void AddRange(List<CustomAssetData> assetDatas)
|
||||
{
|
||||
this.assetDatas.AddRange(assetDatas);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ccbf3d7b9e0ec8449cdc0c122d7a050
|
||||
@@ -2,20 +2,14 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using XED.Hierarchy;
|
||||
using XED.HierarchyTree;
|
||||
using XED.Manage;
|
||||
using XED.Util;
|
||||
|
||||
namespace XED.Asset
|
||||
{
|
||||
public class CustomAssetEventHandler
|
||||
{
|
||||
private CustomAssetConnector connector;
|
||||
|
||||
public CustomAssetEventHandler(CustomAssetConnector connector)
|
||||
{
|
||||
this.connector = connector;
|
||||
}
|
||||
|
||||
public void OnSelectObjectFromHierarchy(List<HierarchyItem> selectedItems)
|
||||
{
|
||||
if (selectedItems.Count == 0)
|
||||
@@ -23,25 +17,28 @@ namespace XED.Asset
|
||||
return;
|
||||
}
|
||||
string name = "";
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
var renderObjectHandler = ManagerHub.instance.Get<RenderObjectHandler>();
|
||||
List<GameObject> selectedObjects = new List<GameObject>();
|
||||
foreach (ConnectedAsset connectedAsset in connector.connectedAssets)
|
||||
{
|
||||
connectedAsset.renderObject.Deselect();
|
||||
}
|
||||
connector.renderObjectHandler.RemoveAllSelections();
|
||||
renderObjectHandler.RemoveAllSelections();
|
||||
for (int i = 0; i < selectedItems.Count; i++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.hierarchyItem == selectedItems[i]);
|
||||
name = i == 0 ? searchAsset.hierarchyItem.name : name.Equals(searchAsset.hierarchyItem.name) ? searchAsset.hierarchyItem.name : "-";
|
||||
selectedObjects.Add(searchAsset.renderObject.gameObject);
|
||||
connector.renderObjectHandler.AddSelection(searchAsset.renderObject);
|
||||
renderObjectHandler.AddSelection(searchAsset.renderObject);
|
||||
}
|
||||
connector.renderObjectHandler.ResetGizmoTargetObjects();
|
||||
connector.onSelectObjects?.Invoke(name, selectedObjects);
|
||||
renderObjectHandler.ResetGizmoTargetObjects();
|
||||
connector.OnSelectObjects(name, selectedObjects);
|
||||
}
|
||||
|
||||
public void OnSelectAssetFromHierarchy(List<HierarchyItem> selectedItems)
|
||||
{
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
connector.selectedAssetDatas.Clear();
|
||||
if (selectedItems.Count == 0)
|
||||
{
|
||||
@@ -76,6 +73,8 @@ namespace XED.Asset
|
||||
string name = "";
|
||||
List<GameObject> selectedObjects = new List<GameObject>();
|
||||
List<HierarchyItem> selectedItems = new List<HierarchyItem>();
|
||||
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
for (int i = 0; i < objects.Count; i++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.renderObject == objects[i]);
|
||||
@@ -84,20 +83,24 @@ namespace XED.Asset
|
||||
selectedObjects.Add(searchAsset.renderObject.gameObject);
|
||||
}
|
||||
connector.componentScrollView.OnSelect(selectedItems);
|
||||
connector.onSelectObjects?.Invoke(name, selectedObjects);
|
||||
|
||||
connector.OnSelectObjects(name, selectedObjects);
|
||||
}
|
||||
|
||||
public void OnDragBoxSelect(Rect selectionBoxRect)
|
||||
{
|
||||
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
List<ConnectedAsset> activeAssets = connector.connectedAssets.FindAll(x => x.renderObject != null && x.renderObject.gameObject.activeSelf);
|
||||
if (activeAssets.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
string name = "";
|
||||
var renderObjectHandler = ManagerHub.instance.Get<RenderObjectHandler>();
|
||||
List<HierarchyItem> selectedItems = new List<HierarchyItem>();
|
||||
List<CustomAssetRenderObject> selectedRenderObjects = new List<CustomAssetRenderObject>();
|
||||
connector.renderObjectHandler.RemoveAllSelections();
|
||||
renderObjectHandler.RemoveAllSelections();
|
||||
for (int i = 0; i < activeAssets.Count; i++)
|
||||
{
|
||||
ConnectedAsset activeAsset = activeAssets[i];
|
||||
@@ -108,9 +111,9 @@ namespace XED.Asset
|
||||
selectedRenderObjects.Add(activeAsset.renderObject);
|
||||
}
|
||||
}
|
||||
connector.renderObjectHandler.AddSelection(selectedRenderObjects);
|
||||
renderObjectHandler.AddSelection(selectedRenderObjects);
|
||||
connector.componentScrollView.OnSelect(selectedItems);
|
||||
connector.onSelectObjects?.Invoke(name, selectedRenderObjects.Select(x => x.gameObject).ToList());
|
||||
connector.OnSelectObjects(name, selectedRenderObjects.Select(x => x.gameObject).ToList());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using XED.DataStructures;
|
||||
using XED.UI;
|
||||
|
||||
namespace XED.Util
|
||||
{
|
||||
public class CustomAssetRenderObject : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
||||
{
|
||||
private GameObject renderObject;
|
||||
private MeshRenderer objectRenderer;
|
||||
private MeshRenderer objectRenderer;
|
||||
private List<Transform> snapPoints = new List<Transform>();
|
||||
private BoxCollider boxCollider;
|
||||
private Material matCubeShow;
|
||||
@@ -17,26 +20,35 @@ namespace XED.Util
|
||||
private Material matCubeCollided;
|
||||
private HashSet<GameObject> objectsInTrigger = new HashSet<GameObject>();
|
||||
|
||||
public System.Action onTransformChanged;
|
||||
public System.Action onTransformChanged;
|
||||
public Func<Bounds> getBounds;
|
||||
public Func<Transform, GameObject> instantiateObject;
|
||||
public bool isSelected = false;
|
||||
public bool isCollided = false;
|
||||
private float zFightingOffset = 1.0001f;
|
||||
|
||||
LayerMask twinObjectMask;
|
||||
|
||||
public event Action<TwinObject, TwinObject> OnOverlabBegin;
|
||||
public event Action<TwinObject, TwinObject> OnOverlabEnd;
|
||||
public event Action<CustomAssetRenderObject> OnSelected;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
objectRenderer = GetComponentInChildren<MeshRenderer>();
|
||||
objectRenderer = GetComponentInChildren<MeshRenderer>();
|
||||
snapPoints = GetComponentsInChildren<ObjectSnap>().Select(x => x.transform).ToList();
|
||||
boxCollider = GetComponent<BoxCollider>();
|
||||
matCubeShow = Resources.Load<Material>("Materials/Mat_CubeShow");
|
||||
matCubeSelected = Resources.Load<Material>("Materials/Mat_CubeSelected");
|
||||
matCubeCollided = Resources.Load<Material>("Materials/Mat_CubeCollided");
|
||||
|
||||
boxCollider.gameObject.layer = LayerMask.NameToLayer("TwinObject");
|
||||
twinObjectMask = LayerMask.GetMask("TwinObject");
|
||||
}
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
ResetBoundary();
|
||||
ResetBoundary();
|
||||
}
|
||||
private void OnEnable()
|
||||
{
|
||||
@@ -48,8 +60,8 @@ namespace XED.Util
|
||||
ClearTriggerObjects();
|
||||
}
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
CustomAssetRenderObject otherRenderObject = other.gameObject.GetComponent<CustomAssetRenderObject>();
|
||||
{
|
||||
CustomAssetRenderObject otherRenderObject = other.gameObject.GetComponent<CustomAssetRenderObject>();
|
||||
if (otherRenderObject != null)
|
||||
{
|
||||
isCollided = true;
|
||||
@@ -59,14 +71,16 @@ namespace XED.Util
|
||||
objectRenderer.material = matCubeCollided;
|
||||
}
|
||||
Show();
|
||||
}
|
||||
}
|
||||
|
||||
OnOverlabBegin?.Invoke(GetComponent<TwinObject>(), other.gameObject.GetComponent<TwinObject>());
|
||||
}
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
CustomAssetRenderObject otherRenderObject = other.gameObject.GetComponent<CustomAssetRenderObject>();
|
||||
CustomAssetRenderObject otherRenderObject = other.gameObject.GetComponent<CustomAssetRenderObject>();
|
||||
if (otherRenderObject != null)
|
||||
{
|
||||
objectsInTrigger.Remove(other.gameObject);
|
||||
{
|
||||
objectsInTrigger.Remove(other.gameObject);
|
||||
}
|
||||
if (objectsInTrigger.Count == 0)
|
||||
{
|
||||
@@ -75,7 +89,9 @@ namespace XED.Util
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OnOverlabEnd?.Invoke(GetComponent<TwinObject>(), other.gameObject.GetComponent<TwinObject>());
|
||||
}
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
@@ -97,14 +113,14 @@ namespace XED.Util
|
||||
}
|
||||
void ResetBoundary()
|
||||
{
|
||||
Bounds meshBounds = objectRenderer.bounds;
|
||||
Bounds meshBounds = objectRenderer.bounds;
|
||||
Vector3 localCenter = transform.InverseTransformPoint(meshBounds.center);
|
||||
Vector3 localSize = transform.InverseTransformVector(meshBounds.size);
|
||||
Vector3 localSize = transform.InverseTransformVector(meshBounds.size);
|
||||
boxCollider.center = localCenter;
|
||||
boxCollider.size = localSize;
|
||||
}
|
||||
void ClearTriggerObjects()
|
||||
{
|
||||
{
|
||||
foreach (GameObject obj in new List<GameObject>(objectsInTrigger))
|
||||
{
|
||||
if (obj != null)
|
||||
@@ -120,7 +136,7 @@ namespace XED.Util
|
||||
if (boundary.HasValue)
|
||||
{
|
||||
ResizeBoundary(boundary.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void ResizeBoundary(Bounds meshBounds)
|
||||
{
|
||||
@@ -140,7 +156,7 @@ namespace XED.Util
|
||||
snapPoints[5].localPosition = new Vector3(boundPointMin.x, boundPointMax.y, boundPointMax.z);
|
||||
snapPoints[6].localPosition = new Vector3(boundPointMax.x, boundPointMin.y, boundPointMax.z);
|
||||
snapPoints[7].localPosition = new Vector3(boundPointMax.x, boundPointMax.y, boundPointMin.z);
|
||||
}
|
||||
}
|
||||
ResetBoundary();
|
||||
}
|
||||
public void Show()
|
||||
@@ -174,7 +190,8 @@ namespace XED.Util
|
||||
public void Select()
|
||||
{
|
||||
//ResizeBoundary();
|
||||
isSelected = true;
|
||||
OnSelected?.Invoke(this);
|
||||
isSelected = true;
|
||||
objectRenderer.material = matCubeSelected;
|
||||
Show();
|
||||
}
|
||||
@@ -191,7 +208,7 @@ namespace XED.Util
|
||||
Hide();
|
||||
}
|
||||
public void CreateRenderObject()
|
||||
{
|
||||
{
|
||||
if (renderObject == null)
|
||||
{
|
||||
renderObject = instantiateObject?.Invoke(transform);
|
||||
@@ -199,7 +216,7 @@ namespace XED.Util
|
||||
ResizeBoundary();
|
||||
}
|
||||
public void DestroyRenderObject()
|
||||
{
|
||||
{
|
||||
if (renderObject)
|
||||
{
|
||||
Destroy(renderObject);
|
||||
@@ -230,5 +247,14 @@ namespace XED.Util
|
||||
if (renderObject == null) return null;
|
||||
return new KDTree(renderObject);
|
||||
}
|
||||
|
||||
public RaycastHit GetObjectHit(Vector3 direction)
|
||||
{
|
||||
RaycastHit hitInfo;
|
||||
Vector3 changedScale = Vector3.Scale(boxCollider.size, transform.lossyScale);
|
||||
Physics.BoxCast(boxCollider.bounds.center, changedScale / 2.0f, direction, out hitInfo, transform.rotation, Mathf.Infinity, twinObjectMask);
|
||||
|
||||
return hitInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
162
Assets/Scripts/Studio/AssetTool/FBXFileManager.cs
Normal file
162
Assets/Scripts/Studio/AssetTool/FBXFileManager.cs
Normal file
@@ -0,0 +1,162 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System.IO;
|
||||
using UnityEngine.Events;
|
||||
using System.Collections;
|
||||
using TriLibCore.SFB;
|
||||
using XED.Util;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using XED.Repositories;
|
||||
using XED.Asset;
|
||||
using Ookii.Dialogs;
|
||||
using XED.Command;
|
||||
|
||||
namespace XED.Manage
|
||||
{
|
||||
public class FBXFileManager : Manager
|
||||
{
|
||||
CustomAssetDataRepository dataRepo;
|
||||
|
||||
public string identifier;
|
||||
public string password;
|
||||
public UnityEvent<string> onRemoveFbxFile;
|
||||
private SaveData saveData;
|
||||
|
||||
private Queue<string> loadFilePath = new Queue<string>();
|
||||
private SharedMaterial sharedMaterial;
|
||||
private MessagePackFileManager<SaveData> messagePacker;
|
||||
private bool isSaveTaskComplete = true;
|
||||
public bool isLoadTaskComplete = true;
|
||||
private Transform fbxAnchor;
|
||||
|
||||
public FBXFileManager()
|
||||
{
|
||||
dataRepo = new CustomAssetDataRepository();
|
||||
saveData = new SaveData();
|
||||
sharedMaterial = new SharedMaterial();
|
||||
messagePacker = new MessagePackFileManager<SaveData>();
|
||||
messagePacker.Initialize();
|
||||
|
||||
identifier = string.IsNullOrEmpty(identifier) ? "defaultAssetData" : identifier;
|
||||
fbxAnchor = new GameObject("LocalAssetDataAnchor").transform;
|
||||
}
|
||||
public override void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void LoadLocalFBXDirectory()
|
||||
{
|
||||
TriLibCore.SFB.StandaloneFileBrowser.OpenFolderPanelAsync("Load Local (Directory)", "C:\\Users", false, OnLoadLocalFBXDirectory);
|
||||
}
|
||||
|
||||
private void OnLoadLocalFBXDirectory(IList<ItemWithStream> list)
|
||||
{
|
||||
//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);
|
||||
|
||||
// if (dataRepo.TryGetDataFromPath(path, out var p))
|
||||
// return;
|
||||
|
||||
// foreach (var file in files)
|
||||
// {
|
||||
// loadFilePath.Enqueue(file);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
public void SaveToLocalData(List<CustomAssetData> assetDatas, string path = "")
|
||||
{
|
||||
if (isSaveTaskComplete == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//StartCoroutine(CoroutineSaveToLocalData(assetDatas, path));
|
||||
}
|
||||
public void LoadLocalData()
|
||||
{
|
||||
if (isLoadTaskComplete == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string path = Application.streamingAssetsPath + "/baseAssetData";
|
||||
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.FindFromName(name);
|
||||
//return listAssets.FirstOrDefault(x => x.name == name);
|
||||
}
|
||||
|
||||
string GetLocalPath(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
return Path.Combine(Application.persistentDataPath, identifier);
|
||||
}
|
||||
else
|
||||
{
|
||||
return path;
|
||||
}
|
||||
}
|
||||
bool CheckFilePathExists(string filePath)
|
||||
{
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
{
|
||||
Debug.Log("No File Found At : " + filePath);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
IEnumerator CoroutineLoadFromLocalData(string filePath)
|
||||
{
|
||||
isLoadTaskComplete = false;
|
||||
|
||||
Task<SaveData> task = Task<SaveData>.Run(() => messagePacker.LoadAsync(filePath));
|
||||
yield return new WaitUntil(() => task.IsCompleted);
|
||||
|
||||
if (task.Result == null)
|
||||
{
|
||||
Debug.LogError("Error on loading local data.");
|
||||
Debug.LogError("Error file location : " + filePath);
|
||||
isLoadTaskComplete = true;
|
||||
yield break;
|
||||
}
|
||||
|
||||
saveData = task.Result;
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Studio/AssetTool/FBXFileManager.cs.meta
Normal file
2
Assets/Scripts/Studio/AssetTool/FBXFileManager.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d1f9c7add0ac3345ac4cc9e8c59084a
|
||||
142
Assets/Scripts/Studio/AssetTool/MaterialPropertyData.cs
Normal file
142
Assets/Scripts/Studio/AssetTool/MaterialPropertyData.cs
Normal file
@@ -0,0 +1,142 @@
|
||||
using MessagePack;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XED.Manage
|
||||
{
|
||||
[MessagePackObject]
|
||||
public class MaterialPropertyData
|
||||
{
|
||||
[Key(0)]
|
||||
public float[] baseColor;
|
||||
[Key(1)]
|
||||
public float metallic;
|
||||
[Key(2)]
|
||||
public float smoothness;
|
||||
[Key(3)]
|
||||
public float[] emissionColor;
|
||||
[Key(4)]
|
||||
public int renderMode;
|
||||
[Key(5)]
|
||||
public int surfaceType;
|
||||
[Key(6)]
|
||||
public int blendMode;
|
||||
[Key(7)]
|
||||
public float occlusionStrength;
|
||||
[Key(8)]
|
||||
public float normalScale;
|
||||
[Key(9)]
|
||||
public string[] texTypes;
|
||||
[Key(10)]
|
||||
public string[] texUIDs;
|
||||
|
||||
public void SetData(Material material)
|
||||
{
|
||||
Color bc = material.HasProperty("_BaseColor") ? material.GetColor("_BaseColor") :
|
||||
material.HasProperty("_Color") ? material.GetColor("_Color") :
|
||||
Color.white;
|
||||
baseColor = new float[4] { bc.r, bc.g, bc.b, bc.a };
|
||||
metallic = material.HasProperty("_Metallic") ? material.GetFloat("_Metallic") : 0;
|
||||
smoothness = material.HasProperty("_Smoothness") ? material.GetFloat("_Smoothness") :
|
||||
material.HasProperty("_Glossiness") ? material.GetFloat("_Glossiness") : 0;
|
||||
Color ec = material.HasProperty("_EmissionColor") ? material.GetColor("_EmissionColor") : Color.white;
|
||||
emissionColor = new float[4] { ec.r, ec.g, ec.b, ec.a };
|
||||
renderMode = material.HasProperty("_Mode") ? (int)material.GetFloat("_Mode") : -1;
|
||||
surfaceType = material.HasProperty("_Surface") ? (int)material.GetFloat("_Surface") : -1;
|
||||
blendMode = material.HasProperty("_Blend") ? (int)material.GetFloat("_Blend") : -1;
|
||||
occlusionStrength = material.HasProperty("_OcclusionStrength") ? material.GetFloat("_OcclusionStrength") : 0;
|
||||
normalScale = material.HasProperty("_NormalScale") ? material.GetFloat("_NormalScale") :
|
||||
material.HasProperty("_BumpScale") ? material.GetFloat("_BumpScale") : 0;
|
||||
}
|
||||
|
||||
public void ApplyToMaterial(Material material)
|
||||
{
|
||||
bool isURP = material.shader.name.Contains("Universal Render Pipeline");
|
||||
|
||||
if (material.HasProperty("_BaseColor"))
|
||||
{
|
||||
material.SetColor("_BaseColor", new Color(baseColor[0], baseColor[1], baseColor[2], baseColor[3]));
|
||||
}
|
||||
else if (material.HasProperty("_Color"))
|
||||
{
|
||||
material.SetColor("_Color", new Color(baseColor[0], baseColor[1], baseColor[2], baseColor[3]));
|
||||
}
|
||||
if (material.HasProperty("_Metallic"))
|
||||
{
|
||||
material.SetFloat("_Metallic", metallic);
|
||||
}
|
||||
if (material.HasProperty("_Smoothness"))
|
||||
{
|
||||
material.SetFloat("_Smoothness", smoothness);
|
||||
}
|
||||
else if (material.HasProperty("_Glossiness"))
|
||||
{
|
||||
material.SetFloat("_Glossiness", smoothness);
|
||||
}
|
||||
if (material.HasProperty("_EmissionColor"))
|
||||
{
|
||||
material.SetColor("_EmissionColor", new Color(emissionColor[0], emissionColor[1], emissionColor[2], emissionColor[3]));
|
||||
}
|
||||
if (material.HasProperty("_Mode") && renderMode >= 0)
|
||||
{
|
||||
material.SetFloat("_Mode", renderMode);
|
||||
}
|
||||
if (material.HasProperty("_Surface") && surfaceType >= 0)
|
||||
{
|
||||
material.SetFloat("_Surface", surfaceType);
|
||||
}
|
||||
if (material.HasProperty("_Blend") && blendMode >= 0)
|
||||
{
|
||||
material.SetFloat("_Blend", blendMode);
|
||||
}
|
||||
|
||||
if (isURP)
|
||||
{
|
||||
if (renderMode == 3)
|
||||
{
|
||||
material.SetFloat("_Surface", 1);
|
||||
}
|
||||
if (surfaceType == 1 || renderMode == 3)
|
||||
{
|
||||
material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Transparent;
|
||||
material.SetFloat("_ZWrite", 0);
|
||||
material.SetFloat("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
|
||||
material.SetFloat("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Transparent
|
||||
if (renderMode == 3 || surfaceType == 1)
|
||||
{
|
||||
material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Transparent;
|
||||
material.SetFloat("_ZWrite", 0);
|
||||
material.SetFloat("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
|
||||
material.SetFloat("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
|
||||
material.EnableKeyword("_ALPHABLEND_ON");
|
||||
material.DisableKeyword("_ALPHATEST_ON");
|
||||
material.DisableKeyword("_ALPHAPREMULTIPLY_ON");
|
||||
}
|
||||
//CutOut
|
||||
else if (renderMode == 1)
|
||||
{
|
||||
material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.AlphaTest;
|
||||
material.EnableKeyword("_ALPHATEST_ON");
|
||||
material.DisableKeyword("_ALPHABLEND_ON");
|
||||
material.DisableKeyword("_ALPHAPREMULTIPLY_ON");
|
||||
}
|
||||
//Opaque
|
||||
else
|
||||
{
|
||||
material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Geometry;
|
||||
material.SetFloat("_ZWrite", 1);
|
||||
material.SetFloat("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
|
||||
material.SetFloat("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero);
|
||||
material.DisableKeyword("_ALPHATEST_ON");
|
||||
material.DisableKeyword("_ALPHABLEND_ON");
|
||||
material.DisableKeyword("_ALPHAPREMULTIPLY_ON");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 445645d0b2652284a9db946e4d23b563
|
||||
64
Assets/Scripts/Studio/AssetTool/MessagePackFileManager.cs
Normal file
64
Assets/Scripts/Studio/AssetTool/MessagePackFileManager.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using MessagePack.Resolvers;
|
||||
using MessagePack;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XED.Manage
|
||||
{
|
||||
|
||||
public class MessagePackFileManager<T>
|
||||
{
|
||||
public void Initialize()
|
||||
{
|
||||
StaticCompositeResolver.Instance.Register(
|
||||
GeneratedResolver.Instance,
|
||||
StandardResolver.Instance
|
||||
);
|
||||
MessagePackSerializer.DefaultOptions = MessagePackSerializerOptions.Standard.WithResolver(
|
||||
StaticCompositeResolver.Instance
|
||||
);
|
||||
}
|
||||
public async Task<T> LoadAsync(string filePath)
|
||||
{
|
||||
var lz4Option = MessagePackSerializerOptions.Standard.
|
||||
WithCompression(MessagePackCompression.Lz4Block).
|
||||
WithResolver(StaticCompositeResolver.Instance);
|
||||
byte[] readByte = null;
|
||||
T deserailze = default(T);
|
||||
try
|
||||
{
|
||||
readByte = await File.ReadAllBytesAsync(filePath);
|
||||
deserailze = MessagePackSerializer.Deserialize<T>(readByte, lz4Option);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"Task Error: {ex.Message}\n{ex.StackTrace}");
|
||||
int byteLength = 0;
|
||||
if (readByte != null)
|
||||
{
|
||||
byteLength = (int)readByte.Length;
|
||||
}
|
||||
Debug.LogError("Read Byte Size : " + byteLength.ToString());
|
||||
}
|
||||
return deserailze;
|
||||
}
|
||||
|
||||
public async Task SaveAsync(string filePath, T data)
|
||||
{
|
||||
var lz4Option = MessagePackSerializerOptions.Standard.
|
||||
WithCompression(MessagePackCompression.Lz4Block).
|
||||
WithResolver(StaticCompositeResolver.Instance);
|
||||
try
|
||||
{
|
||||
byte[] bytes = MessagePackSerializer.Serialize<T>(data, lz4Option);
|
||||
await File.WriteAllBytesAsync(filePath, bytes);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"Task Error: {ex.Message}\n{ex.StackTrace}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 592137e8c153e864caf3162a9433b79f
|
||||
22
Assets/Scripts/Studio/AssetTool/ModelData.cs
Normal file
22
Assets/Scripts/Studio/AssetTool/ModelData.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace XED.Manage
|
||||
{
|
||||
[MessagePackObject]
|
||||
public class ModelData
|
||||
{
|
||||
[Key(0)]
|
||||
public int id;
|
||||
[Key(1)]
|
||||
public int parentId;
|
||||
[Key(2)]
|
||||
public string modelComponentName;
|
||||
[Key(3)]
|
||||
public TransformData transformData;
|
||||
[Key(4)]
|
||||
public SerializableMesh mesh;
|
||||
[Key(5)]
|
||||
public MaterialPropertyData[] materialProperties;
|
||||
}
|
||||
|
||||
}
|
||||
2
Assets/Scripts/Studio/AssetTool/ModelData.cs.meta
Normal file
2
Assets/Scripts/Studio/AssetTool/ModelData.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 30c9e0ef867870442b7eeea25b03452e
|
||||
@@ -3,51 +3,42 @@ 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.DataStructures;
|
||||
using XED.Interfaces;
|
||||
using XED.Manage;
|
||||
using XED.RuntimeGizmo;
|
||||
using XED.RuntimeGizmo;
|
||||
|
||||
namespace XED.Util
|
||||
{
|
||||
public class RenderObjectHandler : MonoBehaviour, IModeController, IInputHandler
|
||||
public class RenderObjectHandler : Manager, IModeController, IInputHandler
|
||||
{
|
||||
public ModePanel.ProgramMode mode => ModePanel.ProgramMode.ObjectLayout;
|
||||
|
||||
List<CustomAssetRenderObject> selectedRenderObjects = new List<CustomAssetRenderObject>();
|
||||
public List<CustomAssetRenderObject> selectedRenderObjects = new List<CustomAssetRenderObject>();
|
||||
List<CustomAssetRenderObject> copyRenderObjects = new List<CustomAssetRenderObject>();
|
||||
List<GameObject> selectedGameObjects = new List<GameObject>();
|
||||
CustomAssetRenderObject prevSelectedObject;
|
||||
RTGController rtgController;
|
||||
ConvexHullCalculator convexHullCalculator = new ConvexHullCalculator();
|
||||
UserInputManager userInputManager;
|
||||
Vector3 clickBeginPos;
|
||||
float clickLengthThreshold = 5.0f;
|
||||
int uiLayer;
|
||||
int selectIndex;
|
||||
bool lockHandler = false;
|
||||
public event System.Action<Vector3> onDragBegin;
|
||||
public event System.Action<Vector3> onDragEnd;
|
||||
public event System.Action onDragForceEnd;
|
||||
public UnityEvent<List<CustomAssetRenderObject>> onSelectObject;
|
||||
public UnityEvent<List<CustomAssetRenderObject>> onRemoveObject;
|
||||
public UnityEvent<List<CustomAssetRenderObject>> onCopyObject;
|
||||
public UnityEvent<List<CustomAssetRenderObject>> onOrderByHierachy;
|
||||
public event System.Action onDeselectAll;
|
||||
public event System.Action<List<GameObject>> onTransformChanged;
|
||||
|
||||
void Awake()
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
myHandler = GetInputHandler();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
rtgController = new RTGController();
|
||||
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;
|
||||
}
|
||||
@@ -66,7 +57,7 @@ namespace XED.Util
|
||||
{
|
||||
return;
|
||||
}
|
||||
onDragBegin?.Invoke(clickBeginPos);
|
||||
EventConnector.instance.GetCanvas<Canvas_DragArea>().panel_draghandler.OnBeginDrag(clickBeginPos);
|
||||
}
|
||||
private void OnMousePointerUp()
|
||||
{
|
||||
@@ -86,14 +77,14 @@ namespace XED.Util
|
||||
EventSystem.current.RaycastAll(pointerData, raycastResults);
|
||||
if (raycastResults.Any(x => x.gameObject.layer == uiLayer))
|
||||
{
|
||||
onDragForceEnd?.Invoke();
|
||||
EventConnector.instance.GetCanvas<Canvas_DragArea>().panel_draghandler.ForceEndDrag();
|
||||
return;
|
||||
}
|
||||
//포인터 업 위치가 포인터 다운 위치에서 크게 벗어났을 경우는 클릭을 무시한다.
|
||||
if ((clickBeginPos - Input.mousePosition).magnitude > clickLengthThreshold)
|
||||
{
|
||||
DeselectAll();
|
||||
onDragEnd?.Invoke(Input.mousePosition);
|
||||
EventConnector.instance.GetCanvas<Canvas_DragArea>().panel_draghandler.OnEndDrag(Input.mousePosition);
|
||||
return;
|
||||
}
|
||||
List<CustomAssetRenderObject> raycastedTarget = new List<CustomAssetRenderObject>();
|
||||
@@ -146,10 +137,11 @@ namespace XED.Util
|
||||
}
|
||||
else
|
||||
{
|
||||
ResetRTG();
|
||||
CommandInvoker.instance.Invoke(new ResetGizmoCommand());
|
||||
DeselectAll();
|
||||
}
|
||||
onDragForceEnd?.Invoke();
|
||||
|
||||
EventConnector.instance.GetCanvas<Canvas_DragArea>().panel_draghandler.ForceEndDrag();
|
||||
}
|
||||
public void DeselectAll()
|
||||
{
|
||||
@@ -158,8 +150,13 @@ namespace XED.Util
|
||||
return;
|
||||
}
|
||||
RemoveAllSelections();
|
||||
onDeselectAll?.Invoke();
|
||||
|
||||
var canvas_Popup = EventConnector.instance.GetCanvas<Canvas_Popup>();
|
||||
canvas_Popup.panel_objectinfo.ResetObjectInfo();
|
||||
|
||||
ManagerHub.instance.Get<CustomAssetConnector>().OnDeselectAll();
|
||||
}
|
||||
|
||||
public void AddSelection(CustomAssetRenderObject item)
|
||||
{
|
||||
if (selectedRenderObjects.Any(x => x == item))
|
||||
@@ -196,6 +193,16 @@ namespace XED.Util
|
||||
selectedGameObjects.Clear();
|
||||
rtgController.SetGizmoTargetObjects(selectedGameObjects);
|
||||
}
|
||||
public void CompletelyRemoveAllSelections(List<ConnectedAsset> removeList)
|
||||
{
|
||||
for (int i = 0; i < removeList.Count; i++)
|
||||
{
|
||||
UnityEngine.GameObject.Destroy(removeList[i].renderObject.gameObject);
|
||||
}
|
||||
selectedRenderObjects.Clear();
|
||||
selectedGameObjects.Clear();
|
||||
rtgController.SetGizmoTargetObjects(selectedGameObjects);
|
||||
}
|
||||
public void RemoveSelection(CustomAssetRenderObject item)
|
||||
{
|
||||
selectedRenderObjects.Remove(item);
|
||||
@@ -204,25 +211,9 @@ namespace XED.Util
|
||||
}
|
||||
private void OnSelect()
|
||||
{
|
||||
onSelectObject?.Invoke(selectedRenderObjects);
|
||||
ManagerHub.instance.Get<CustomAssetConnector>().assetEventHandler.OnSelectObjectFromObjectHandler(selectedRenderObjects);
|
||||
rtgController.SetGizmoTargetObjects(selectedGameObjects);
|
||||
}
|
||||
public void ResetRTG()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.None);
|
||||
}
|
||||
public void SetRTGMove()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Move);
|
||||
}
|
||||
public void SetRTGScale()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Scale);
|
||||
}
|
||||
public void SetRTGRotate()
|
||||
{
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Rotate);
|
||||
}
|
||||
public void OnTransformBegin()
|
||||
{
|
||||
lockHandler = true;
|
||||
@@ -230,8 +221,8 @@ namespace XED.Util
|
||||
public void OnTransformChangedFromRTG(List<GameObject> transformObjects)
|
||||
{
|
||||
OnTransformChanged(transformObjects);
|
||||
onTransformChanged?.Invoke(selectedGameObjects);
|
||||
onDragForceEnd?.Invoke();
|
||||
EventConnector.instance.GetCanvas<Canvas_Popup>().panel_objectinfo.OnTransformChanged(transformObjects);
|
||||
EventConnector.instance.GetCanvas<Canvas_DragArea>().panel_draghandler.ForceEndDrag();
|
||||
}
|
||||
public void OnTransformChanged(List<GameObject> transformObjects)
|
||||
{
|
||||
@@ -244,28 +235,11 @@ namespace XED.Util
|
||||
}
|
||||
}
|
||||
}
|
||||
public void RemoveItem()
|
||||
{
|
||||
if (selectedRenderObjects.Count == 0) return;
|
||||
onRemoveObject?.Invoke(selectedRenderObjects);
|
||||
}
|
||||
public void CopyItem()
|
||||
{
|
||||
if (selectedRenderObjects.Count == 0)
|
||||
return;
|
||||
|
||||
onCopyObject?.Invoke(selectedRenderObjects);
|
||||
}
|
||||
public void SaveItemsToCopy()
|
||||
{
|
||||
copyRenderObjects.Clear();
|
||||
copyRenderObjects.AddRange(selectedRenderObjects);
|
||||
}
|
||||
public void CopySavedItems()
|
||||
{
|
||||
if (copyRenderObjects.Count == 0) return;
|
||||
onCopyObject?.Invoke(copyRenderObjects);
|
||||
}
|
||||
public void ResetGizmoTargetObjects()
|
||||
{
|
||||
rtgController.SetGizmoTargetObjects(selectedGameObjects);
|
||||
@@ -276,7 +250,7 @@ namespace XED.Util
|
||||
{
|
||||
return;
|
||||
}
|
||||
onOrderByHierachy?.Invoke(selectedRenderObjects);
|
||||
ManagerHub.instance.Get<CustomAssetConnector>().OrderByHierarchy(selectedRenderObjects);
|
||||
List<CustomAssetRenderObject> objectsToAlign = new List<CustomAssetRenderObject>(selectedRenderObjects);
|
||||
List<Vector3> originalPos = objectsToAlign.Select(x => x.transform.position).ToList();
|
||||
|
||||
@@ -294,7 +268,7 @@ namespace XED.Util
|
||||
ActionCommand command = new ActionCommand(
|
||||
() => Align(objectsToAlign, primary, primaryDir, secondaryDir),
|
||||
() => UndoAlign(objectsToAlign, originalPos));
|
||||
CommandManager.I.ExecuteCommand(command);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
|
||||
|
||||
@@ -318,7 +292,8 @@ namespace XED.Util
|
||||
renderObject.transform.position = referencePoint + primaryDir * countP + secondaryDir * countS;
|
||||
renderObject.onTransformChanged?.Invoke();
|
||||
}
|
||||
onTransformChanged?.Invoke(objectsToAlign.Select(renderObject => renderObject.gameObject).ToList());
|
||||
|
||||
EventConnector.instance.GetCanvas<Canvas_Popup>().panel_objectinfo.OnTransformChanged(objectsToAlign.Select(renderObject => renderObject.gameObject).ToList());
|
||||
}
|
||||
|
||||
private void UndoAlign(List<CustomAssetRenderObject> objectsToAlign, List<Vector3> originalPos)
|
||||
@@ -329,7 +304,7 @@ namespace XED.Util
|
||||
renderObject.transform.position = originalPos[i];
|
||||
renderObject.onTransformChanged?.Invoke();
|
||||
}
|
||||
onTransformChanged?.Invoke(objectsToAlign.Select(renderObject => renderObject.gameObject).ToList());
|
||||
EventConnector.instance.GetCanvas<Canvas_Popup>().panel_objectinfo.OnTransformChanged(objectsToAlign.Select(renderObject => renderObject.gameObject).ToList());
|
||||
}
|
||||
public void VertexSnap()
|
||||
{
|
||||
@@ -402,7 +377,7 @@ namespace XED.Util
|
||||
{
|
||||
fromObject.transform.position -= dir[0];
|
||||
});
|
||||
CommandManager.I.ExecuteCommand(command);
|
||||
CommandInvoker.instance.Invoke(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -411,12 +386,12 @@ namespace XED.Util
|
||||
|
||||
public void StatusEnterEvent()
|
||||
{
|
||||
FindSingle<UserInputManager>().SetHandler(myHandler);
|
||||
userInputManager.SetHandler(myHandler);
|
||||
}
|
||||
|
||||
public void StatusExitEvent()
|
||||
{
|
||||
FindSingle<UserInputManager>().RemoveHandler(myHandler);
|
||||
userInputManager .RemoveHandler(myHandler);
|
||||
}
|
||||
|
||||
public InputHandler GetInputHandler()
|
||||
@@ -427,17 +402,17 @@ namespace XED.Util
|
||||
|
||||
downKeyActions.Add(KeyCode.Mouse0, OnMousePointerDown);
|
||||
upKeyActions.Add(KeyCode.Mouse0, OnMousePointerUp);
|
||||
getKeyActions.Add(KeyCode.Q, SetRTGMove);
|
||||
getKeyActions.Add(KeyCode.W, SetRTGRotate);
|
||||
getKeyActions.Add(KeyCode.E, SetRTGScale);
|
||||
getKeyActions.Add(KeyCode.R, ResetRTG);
|
||||
getKeyActions.Add(KeyCode.Q, () => CommandInvoker.instance.Invoke(new ActivateMoveGizmoCommand()));
|
||||
getKeyActions.Add(KeyCode.W, () => CommandInvoker.instance.Invoke(new ActivateRotateGizmoCommand()));
|
||||
getKeyActions.Add(KeyCode.E, () => CommandInvoker.instance.Invoke(new ActivateScaleGizmoCommand()));
|
||||
getKeyActions.Add(KeyCode.R, () => CommandInvoker.instance.Invoke(new ResetGizmoCommand()));
|
||||
getKeyActions.Add(KeyCode.V, VertexSnap);
|
||||
|
||||
var shortcutTable = new Dictionary<KeyCode, Dictionary<KeyCode, Action>>();
|
||||
#if UNITY_EDITOR
|
||||
shortcutTable.Add(KeyCode.LeftShift, new Dictionary<KeyCode, Action>());
|
||||
shortcutTable[KeyCode.LeftShift].Add(KeyCode.C, SaveItemsToCopy);
|
||||
shortcutTable[KeyCode.LeftShift].Add(KeyCode.V, CopySavedItems);
|
||||
shortcutTable[KeyCode.LeftShift].Add(KeyCode.V, () => CommandInvoker.instance.Invoke(new CopyObjectCommand()));
|
||||
#else
|
||||
shortcutTable.Add(KeyCode.LeftControl, new Dictionary<KeyCode, Action>());
|
||||
shortcutTable[KeyCode.LeftControl].Add(KeyCode.C, SaveItemsToCopy);
|
||||
|
||||
16
Assets/Scripts/Studio/AssetTool/SaveData.cs
Normal file
16
Assets/Scripts/Studio/AssetTool/SaveData.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace XED.Manage
|
||||
{
|
||||
[MessagePackObject]
|
||||
public class SaveData
|
||||
{
|
||||
[Key(0)]
|
||||
public SavedModelData[] modelDatas;
|
||||
[Key(1)]
|
||||
public TextureData[] textureDatas;
|
||||
[Key(2)]
|
||||
public ThumbnailData[] thumbnailDatas;
|
||||
}
|
||||
|
||||
}
|
||||
2
Assets/Scripts/Studio/AssetTool/SaveData.cs.meta
Normal file
2
Assets/Scripts/Studio/AssetTool/SaveData.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1000ecb010007449b09ed9906763743
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 427e19b97938787438145787dd188128
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
86
Assets/Scripts/Studio/AssetTool/SavedModelData.cs
Normal file
86
Assets/Scripts/Studio/AssetTool/SavedModelData.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
using MessagePack;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XED.Manage
|
||||
{
|
||||
[MessagePackObject]
|
||||
public class SavedModelData
|
||||
{
|
||||
[Key(0)]
|
||||
public string[][] attributes;
|
||||
//public string assetName;
|
||||
//[Key(1)]
|
||||
//public string folderName;
|
||||
//[Key(2)]
|
||||
[Key(1)]
|
||||
public ModelData[] models;
|
||||
public void SaveData(GameObject modelObject, SharedMaterial sharedMaterial)
|
||||
{
|
||||
MeshRenderer[] meshRenderers = modelObject.transform.GetComponentsInChildren<MeshRenderer>(true);
|
||||
models = new ModelData[meshRenderers.Length];
|
||||
for (int i = 0; i < meshRenderers.Length; i++)
|
||||
{
|
||||
MeshFilter meshFilter = meshRenderers[i].GetComponent<MeshFilter>();
|
||||
models[i] = new ModelData();
|
||||
models[i].transformData = new TransformData();
|
||||
models[i].modelComponentName = meshFilter.gameObject.name;
|
||||
models[i].transformData.SetData(meshRenderers[i].transform);
|
||||
models[i].mesh = new SerializableMesh();
|
||||
models[i].mesh.SetData(meshFilter.mesh);
|
||||
List<MaterialPropertyData> listMaterialPropertyDatas = new List<MaterialPropertyData>();
|
||||
for (int j = 0; j < meshRenderers[i].materials.Length; j++)
|
||||
{
|
||||
MaterialPropertyData materialPropertyData = new MaterialPropertyData();
|
||||
materialPropertyData.SetData(meshRenderers[i].materials[j]);
|
||||
sharedMaterial.SaveTexture(meshRenderers[i].materials[j], materialPropertyData);
|
||||
listMaterialPropertyDatas.Add(materialPropertyData);
|
||||
}
|
||||
models[i].materialProperties = listMaterialPropertyDatas.ToArray();
|
||||
}
|
||||
}
|
||||
public GameObject LoadModelData(SharedMaterial sharedMaterial)
|
||||
{
|
||||
string assetName = attributes.FirstOrDefault(x => x[0].Equals("assetName"))?[1];
|
||||
GameObject modelObject = null;
|
||||
Dictionary<int, GameObject> partList = new Dictionary<int, GameObject>();
|
||||
|
||||
foreach (ModelData model in models)
|
||||
{
|
||||
GameObject part = new GameObject(model.modelComponentName);
|
||||
model.transformData.ApplyToTransform(part.transform);
|
||||
if (model.mesh != null)
|
||||
{
|
||||
MeshFilter meshFilter = part.AddComponent<MeshFilter>();
|
||||
MeshRenderer meshRenderer = part.AddComponent<MeshRenderer>();
|
||||
meshFilter.mesh = model.mesh.ToMesh();
|
||||
Material[] materials = new Material[model.materialProperties.Length];
|
||||
for (int j = 0; j < materials.Length; j++)
|
||||
{
|
||||
materials[j] = new Material(sharedMaterial.Get(model.materialProperties[j]));
|
||||
model.materialProperties[j].ApplyToMaterial(materials[j]);
|
||||
}
|
||||
meshRenderer.materials = materials;
|
||||
}
|
||||
|
||||
partList[model.id] = part;
|
||||
|
||||
if (modelObject == null)
|
||||
{
|
||||
modelObject = part;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (ModelData model in models)
|
||||
{
|
||||
if (model.parentId != -1 && partList.ContainsKey(model.parentId))
|
||||
{
|
||||
partList[model.id].transform.SetParent(partList[model.parentId].transform, false);
|
||||
}
|
||||
}
|
||||
return modelObject;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
2
Assets/Scripts/Studio/AssetTool/SavedModelData.cs.meta
Normal file
2
Assets/Scripts/Studio/AssetTool/SavedModelData.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a97b221d85863b4ea0aa15c48d4cfd4
|
||||
297
Assets/Scripts/Studio/AssetTool/SharedMaterial.cs
Normal file
297
Assets/Scripts/Studio/AssetTool/SharedMaterial.cs
Normal file
@@ -0,0 +1,297 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XED.Manage
|
||||
{
|
||||
public class SharedMaterial
|
||||
{
|
||||
private enum RenderPipelineType
|
||||
{
|
||||
builtIn, URP, HDRP,
|
||||
}
|
||||
private Material sharedMaterial;
|
||||
private Dictionary<MaterialPropertyData, Material> dicMaterials = new Dictionary<MaterialPropertyData, Material>();
|
||||
private Dictionary<string, Texture2D> dicTextures = new Dictionary<string, Texture2D>();
|
||||
private Dictionary<Texture2D, string> dicTextureIDs = new Dictionary<Texture2D, string>();
|
||||
private RenderPipelineType renderPipelineType = RenderPipelineType.builtIn;
|
||||
public List<TextureData> textureDatas = new List<TextureData>();
|
||||
public SharedMaterial()
|
||||
{
|
||||
sharedMaterial = Resources.Load<Material>("Materials/Mat_TrilibBase");
|
||||
if (UnityEngine.Rendering.GraphicsSettings.currentRenderPipeline == null)
|
||||
{
|
||||
renderPipelineType = RenderPipelineType.builtIn;
|
||||
}
|
||||
else if (UnityEngine.Rendering.GraphicsSettings.currentRenderPipeline.GetType().Name.Contains("UniversalRenderPipeline"))
|
||||
{
|
||||
renderPipelineType = RenderPipelineType.URP;
|
||||
}
|
||||
}
|
||||
public Material Get(MaterialPropertyData mpd)
|
||||
{
|
||||
foreach (var kvp in dicMaterials)
|
||||
{
|
||||
if (AreMaterialSimilar(kvp.Key, mpd)) return kvp.Value;
|
||||
}
|
||||
Material mat = new Material(sharedMaterial);
|
||||
mpd.ApplyToMaterial(mat);
|
||||
ApplyTexture(mat, mpd);
|
||||
dicMaterials.Add(mpd, mat);
|
||||
return mat;
|
||||
}
|
||||
bool AreMaterialSimilar(MaterialPropertyData mpdA, MaterialPropertyData mpdB)
|
||||
{
|
||||
if (AreColorsSimilar(mpdA.baseColor, mpdB.baseColor) == false) return false;
|
||||
if (AreColorsSimilar(mpdA.emissionColor, mpdB.emissionColor) == false) return false;
|
||||
if (AreFloatsSimilar(mpdA.metallic, mpdB.metallic) == false) return false;
|
||||
if (AreFloatsSimilar(mpdA.smoothness, mpdB.smoothness) == false) return false;
|
||||
if (AreTexturesEqual(mpdA.texUIDs, mpdB.texUIDs) == false) return false;
|
||||
return true;
|
||||
}
|
||||
bool AreFloatsSimilar(float a, float b, float tolerance = 0.001f)
|
||||
{
|
||||
return Mathf.Abs(a - b) < tolerance;
|
||||
}
|
||||
bool AreColorsSimilar(Color a, Color b, float tolerance = 0.01f)
|
||||
{
|
||||
return Mathf.Abs(a.r - b.r) < tolerance &&
|
||||
Mathf.Abs(a.g - b.g) < tolerance &&
|
||||
Mathf.Abs(a.b - b.b) < tolerance &&
|
||||
Mathf.Abs(a.a - b.a) < tolerance;
|
||||
}
|
||||
bool AreColorsSimilar(float[] a, float[] b, float tolerance = 0.01f)
|
||||
{
|
||||
return Mathf.Abs(a[0] - b[0]) < tolerance &&
|
||||
Mathf.Abs(a[1] - b[1]) < tolerance &&
|
||||
Mathf.Abs(a[2] - b[2]) < tolerance &&
|
||||
Mathf.Abs(a[3] - b[3]) < tolerance;
|
||||
}
|
||||
bool AreTexturesEqual(string[] savedData, string[] compareData)
|
||||
{
|
||||
if (savedData.Length != compareData.Length) return false;
|
||||
for (int i = 0; i < compareData.Length; i++)
|
||||
{
|
||||
if (!savedData[i].Equals(compareData[i]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public void SaveTexture(Material material, MaterialPropertyData mpd)
|
||||
{
|
||||
List<string> listTextureTypes = new List<string>();
|
||||
List<string> listTextureUIDs = new List<string>();
|
||||
Texture2D albedo = null;
|
||||
if (renderPipelineType == RenderPipelineType.builtIn && material.HasProperty("_MainTex"))
|
||||
{
|
||||
albedo = material.GetTexture("_MainTex") as Texture2D;
|
||||
}
|
||||
if (renderPipelineType == RenderPipelineType.URP && material.HasProperty("_BaseMap"))
|
||||
{
|
||||
albedo = material.GetTexture("_BaseMap") as Texture2D;
|
||||
}
|
||||
if (albedo != null)
|
||||
{
|
||||
listTextureTypes.Add("Albedo");
|
||||
listTextureUIDs.Add(GetTexUID(albedo));
|
||||
}
|
||||
Texture2D specular = null;
|
||||
if (material.HasProperty("_SpecGlossMap"))
|
||||
{
|
||||
specular = material.GetTexture("_SpecGlossMap") as Texture2D;
|
||||
}
|
||||
if (specular != null)
|
||||
{
|
||||
listTextureTypes.Add("Specular");
|
||||
listTextureUIDs.Add(GetTexUID(specular));
|
||||
}
|
||||
Texture2D metallicMap = null;
|
||||
if (material.HasProperty("_MetallicGlossMap"))
|
||||
{
|
||||
metallicMap = material.GetTexture("_MetallicGlossMap") as Texture2D;
|
||||
}
|
||||
if (metallicMap != null)
|
||||
{
|
||||
listTextureTypes.Add("Metallic");
|
||||
listTextureUIDs.Add(GetTexUID(metallicMap));
|
||||
}
|
||||
Texture2D normalMap = null;
|
||||
if (renderPipelineType == RenderPipelineType.builtIn && material.HasProperty("_BumpMap"))
|
||||
{
|
||||
normalMap = material.GetTexture("_BumpMap") as Texture2D;
|
||||
}
|
||||
if (renderPipelineType == RenderPipelineType.URP && material.HasProperty("_NormalMap"))
|
||||
{
|
||||
normalMap = material.GetTexture("_NormalMap") as Texture2D;
|
||||
}
|
||||
if (normalMap != null)
|
||||
{
|
||||
listTextureTypes.Add("Normal");
|
||||
listTextureUIDs.Add(GetTexUID(normalMap));
|
||||
}
|
||||
Texture2D occlusionMap = null;
|
||||
if (material.HasProperty("_OcclusionMap"))
|
||||
{
|
||||
occlusionMap = material.GetTexture("_OcclusionMap") as Texture2D;
|
||||
}
|
||||
if (occlusionMap != null)
|
||||
{
|
||||
listTextureTypes.Add("Occlusion");
|
||||
listTextureUIDs.Add(GetTexUID(occlusionMap));
|
||||
}
|
||||
Texture2D emissionMap = null;
|
||||
if (material.HasProperty("_EmissionMap"))
|
||||
{
|
||||
emissionMap = material.GetTexture("_EmissionMap") as Texture2D;
|
||||
}
|
||||
if (emissionMap != null)
|
||||
{
|
||||
listTextureTypes.Add("Emission");
|
||||
listTextureUIDs.Add(GetTexUID(emissionMap));
|
||||
}
|
||||
mpd.texTypes = listTextureTypes.ToArray();
|
||||
mpd.texUIDs = listTextureUIDs.ToArray();
|
||||
}
|
||||
void ApplyTexture(Material material, MaterialPropertyData mpd)
|
||||
{
|
||||
bool hasSpecular = false;
|
||||
for (int i = 0; i < mpd.texTypes.Length; i++)
|
||||
{
|
||||
string type = mpd.texTypes[i];
|
||||
string uid = mpd.texUIDs[i];
|
||||
Texture2D tex = dicTextures[uid];
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case "Albedo":
|
||||
{
|
||||
if (material.HasProperty("_BaseMap") && tex != null)
|
||||
{
|
||||
material.SetTexture("_BaseMap", tex);
|
||||
}
|
||||
else if (material.HasProperty("_MainTex") && tex != null)
|
||||
{
|
||||
material.SetTexture("_MainTex", tex);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "Specular":
|
||||
{
|
||||
if (material.HasProperty("_SpecGlossMap") && tex != null)
|
||||
{
|
||||
material.SetTexture("_SpecGlossMap", tex);
|
||||
hasSpecular = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "Metallic":
|
||||
{
|
||||
if (material.HasProperty("_MetallicGlossMap") && tex != null)
|
||||
{
|
||||
material.SetTexture("_MetallicGlossMap", tex);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "Normal":
|
||||
{
|
||||
if (material.HasProperty("_NormalMap") && tex != null)
|
||||
{
|
||||
material.SetTexture("_NormalMap", tex);
|
||||
}
|
||||
else if (material.HasProperty("_BumpMap") && tex != null)
|
||||
{
|
||||
material.SetTexture("_BumpMap", tex);
|
||||
}
|
||||
if (material.HasProperty("_NormalScale"))
|
||||
{
|
||||
material.SetFloat("_NormalScale", mpd.normalScale);
|
||||
}
|
||||
else if (material.HasProperty("_BumpScale"))
|
||||
{
|
||||
material.SetFloat("_BumpScale", mpd.normalScale);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "Occlusion":
|
||||
{
|
||||
if (material.HasProperty("_OcclusionMap") && tex != null)
|
||||
{
|
||||
material.SetTexture("_OcclusionMap", tex);
|
||||
}
|
||||
if (material.HasProperty("_OcclusionStrength"))
|
||||
{
|
||||
material.SetFloat("_OcclusionStrength", mpd.occlusionStrength);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "Emission":
|
||||
{
|
||||
if (material.HasProperty("_EmissionMap") && tex != null)
|
||||
{
|
||||
material.SetTexture("_EmissionMap", tex);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (material.HasProperty("_WorkflowMode"))
|
||||
{
|
||||
material.SetFloat("_WorkflowMode", hasSpecular ? 1f : 0f);
|
||||
}
|
||||
}
|
||||
public Texture2D GetReadableTexture(Texture texture)
|
||||
{
|
||||
RenderTexture renderTex = new RenderTexture(texture.width, texture.height, 0);
|
||||
Graphics.Blit(texture, renderTex);
|
||||
|
||||
Texture2D readableTexture = new Texture2D(texture.width, texture.height, TextureFormat.RGBA32, false);
|
||||
RenderTexture.active = renderTex;
|
||||
readableTexture.ReadPixels(new Rect(0, 0, texture.width, texture.height), 0, 0);
|
||||
readableTexture.Apply();
|
||||
RenderTexture.active = null;
|
||||
|
||||
renderTex.Release();
|
||||
return readableTexture;
|
||||
}
|
||||
public string GetTexUID(Texture2D tex)
|
||||
{
|
||||
string texUID = Guid.NewGuid().ToString();
|
||||
if (dicTextureIDs.ContainsKey(tex))
|
||||
{
|
||||
texUID = dicTextureIDs[tex];
|
||||
}
|
||||
else
|
||||
{
|
||||
dicTextureIDs[tex] = texUID;
|
||||
Texture2D readableTex = GetReadableTexture(tex);
|
||||
//TextureData textureData = new TextureData()
|
||||
//{
|
||||
// name = tex.name,
|
||||
// uid = texUID,
|
||||
// data = readableTex.EncodeToPNG()
|
||||
//};
|
||||
//textureDatas.Add(textureData);
|
||||
textureDatas.Add(new TextureData(tex.name, texUID, readableTex.EncodeToPNG()));
|
||||
}
|
||||
return texUID;
|
||||
}
|
||||
public void AddTextureData(TextureData texData)
|
||||
{
|
||||
if (dicTextures.ContainsKey(texData.uid))
|
||||
{
|
||||
//The odds are almost zero.
|
||||
//It means save logic is wrong.
|
||||
Debug.LogError("Duplicate Texture : " + texData.name + ", GUID : " + texData.uid);
|
||||
}
|
||||
else
|
||||
{
|
||||
Texture2D tex = new Texture2D(2, 2);
|
||||
ImageConversion.LoadImage(tex, texData.data);
|
||||
dicTextures[texData.uid] = tex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
2
Assets/Scripts/Studio/AssetTool/SharedMaterial.cs.meta
Normal file
2
Assets/Scripts/Studio/AssetTool/SharedMaterial.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 991ddfb0a039da5498d4e3facf267ede
|
||||
@@ -1,99 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
//ConvexHull이란 컨벡스 헐 알고리즘은 2차원 평면상에 여러개의 점이 있을 때
|
||||
//그 점 중에서 일부를 이용하여 볼록 다각형을 만들되 볼록 다각형 내부에 모든 점을 포함시키는 것을 의미한다.
|
||||
//https://www.crocus.co.kr/1288 설명 참고
|
||||
//https://bloodstrawberry.tistory.com/1060 참고
|
||||
public class ConvexHull
|
||||
{
|
||||
private LinePoint firstLinePoint;
|
||||
|
||||
private float CCWBy2D(Vector3 a, Vector3 b, Vector3 c)
|
||||
{
|
||||
var p = b - a;
|
||||
var q = c - b;
|
||||
|
||||
return Vector3.Cross(p, q).y;
|
||||
}
|
||||
|
||||
private int Compare(LinePoint a, LinePoint b)
|
||||
{
|
||||
var tmp = CCWBy2D(firstLinePoint.position, a.position, b.position);
|
||||
if (tmp > 0) return -1;
|
||||
else if(tmp == 0 && Vector3.Distance(firstLinePoint.position, a.position)<Vector3.Distance(firstLinePoint.position, b.position)) return -1;
|
||||
return 1;
|
||||
}
|
||||
List<LinePoint> GetConvexHullVertices(List<LinePoint> point)
|
||||
{
|
||||
List<LinePoint> convexHull = new();
|
||||
|
||||
int index, sp;
|
||||
LinePoint[] stack = new LinePoint[point.Count];
|
||||
|
||||
index = sp = 0;
|
||||
|
||||
stack[sp++] = point[index++];
|
||||
stack[sp++] = point[index++];
|
||||
|
||||
|
||||
while (sp < 3)
|
||||
{
|
||||
float tmp = CCWBy2D(stack[sp - 2].position, stack[sp - 1].position, point[index].position);
|
||||
|
||||
if (tmp > 0) stack[sp++] = point[index++];
|
||||
else if (tmp == 0) // 직선인 경우는 점을 교체
|
||||
{
|
||||
sp--;
|
||||
stack[sp++] = point[index++];
|
||||
}
|
||||
else index++;
|
||||
}
|
||||
|
||||
while (index < point.Count)
|
||||
{
|
||||
float tmp = CCWBy2D(stack[sp - 2].position, stack[sp - 1].position, point[index].position);
|
||||
if (tmp > 0) stack[sp++] = point[index++];
|
||||
else sp--;
|
||||
}
|
||||
|
||||
for (int i = 0; i < sp; i++) convexHull.Add(stack[i]);
|
||||
|
||||
return convexHull;
|
||||
}
|
||||
|
||||
public void RoomLinePoint(Room room)
|
||||
{
|
||||
List<LinePoint> points = new();
|
||||
points = room.points;
|
||||
firstLinePoint = room.firstPoints;
|
||||
points.Sort(Compare);
|
||||
|
||||
var sortPoint = GetConvexHullVertices(points);
|
||||
room.points = points;
|
||||
room.positions.Clear();
|
||||
foreach (var pos in points)
|
||||
{
|
||||
room.positions.Add(pos.position);
|
||||
}
|
||||
|
||||
// SetLineRenderer(lr, position, true);
|
||||
}
|
||||
|
||||
void SetLineRenderer(LineRenderer lr, List<LinePoint> vertices, bool check)
|
||||
{
|
||||
lr.loop = check;
|
||||
lr.positionCount = vertices.Count;
|
||||
List<Vector3> position = new();
|
||||
foreach (LinePoint p in vertices)
|
||||
{
|
||||
position.Add(p.position);
|
||||
}
|
||||
lr.SetPositions(position.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 67033d32a11ebd44e9706e0449ea9fa9
|
||||
@@ -1,61 +0,0 @@
|
||||
using AmazingAssets.WireframeShader;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
[RequireComponent(typeof(MeshRenderer)), RequireComponent(typeof(MeshFilter))]
|
||||
public class CreateWireFrame : MonoBehaviour
|
||||
{
|
||||
//MeshFilter meshFilter;
|
||||
private bool tryQuad;
|
||||
private Mesh wireframeMesh;
|
||||
private Material mat;
|
||||
private MeshFilter targetMeshFilter;
|
||||
private MeshRenderer mr;
|
||||
|
||||
public override void AfterAwake()
|
||||
{
|
||||
var matrial = Resources.Load<Material>("Materials/Mat_Cutout");
|
||||
mat = matrial;
|
||||
targetMeshFilter = GetComponent<MeshFilter>();
|
||||
mr = GetComponent<MeshRenderer>();
|
||||
mr.material = mat;
|
||||
}
|
||||
|
||||
public void CombineMeshes(List<MeshFilter> meshFilters)
|
||||
{
|
||||
if (meshFilters.Count == 0)
|
||||
return;
|
||||
var combine = new CombineInstance[meshFilters.Count];
|
||||
|
||||
for (var i = 0; i < meshFilters.Count; i++)
|
||||
{
|
||||
combine[i].mesh = meshFilters[i].sharedMesh;
|
||||
combine[i].transform = meshFilters[i].transform.localToWorldMatrix;
|
||||
}
|
||||
|
||||
var mesh = new Mesh();
|
||||
mesh.CombineMeshes(combine);
|
||||
targetMeshFilter.mesh = mesh;
|
||||
WireFrameCreate(targetMeshFilter);
|
||||
}
|
||||
public void WireFrameCreate(MeshFilter meshFilter)
|
||||
{
|
||||
targetMeshFilter.mesh = meshFilter.mesh;
|
||||
if (wireframeMesh != null)
|
||||
UnityEngine.GameObject.DestroyImmediate(wireframeMesh);
|
||||
|
||||
wireframeMesh = targetMeshFilter.sharedMesh.GenerateWireframeMesh(false, tryQuad);
|
||||
targetMeshFilter.sharedMesh = wireframeMesh;
|
||||
}
|
||||
|
||||
public void Displayable(bool value)
|
||||
{
|
||||
if (mr == null)
|
||||
return;
|
||||
mr.enabled = value;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ba8c050aa2df094996232819d8cd149
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,176 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using XRLib;
|
||||
using XED.Manage;
|
||||
using static UnityEngine.Rendering.DebugUI;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
[Serializable]
|
||||
public class FloorCreateManager:MonoBehaviour,ISingle
|
||||
{
|
||||
[SerializeField]
|
||||
private List<Room> allRoomsCase = new();
|
||||
[SerializeField]
|
||||
private List<Room> rooms = new();
|
||||
private ConvexHull convexHull = new();
|
||||
public Action<Floor> onCreateFloor;
|
||||
public List<Floor> floors = new();
|
||||
private Dictionary<Floor, List<LinePoint>> floorTable = new();
|
||||
private Dictionary<LinePoint, List<Floor>> floorsMap = new();
|
||||
|
||||
//Wall 생성될때
|
||||
//Point 움직임, 제거 이벤트 발생 할때
|
||||
|
||||
//메쉬는 유지해야함.
|
||||
//계산은
|
||||
public override void AfterAwake()
|
||||
{
|
||||
}
|
||||
|
||||
public void FindCycles(HashSet<LinePoint> linePoints)
|
||||
{
|
||||
allRoomsCase.Clear();
|
||||
foreach (var point in linePoints)
|
||||
{
|
||||
FindOnePointCycle(point);
|
||||
}
|
||||
|
||||
FindSmallRoom();
|
||||
//Floor 생성 해야함
|
||||
|
||||
}
|
||||
|
||||
public void FindOnePointCycle(LinePoint point)
|
||||
{
|
||||
if (point.connectPoints.Count < 2)
|
||||
return;
|
||||
//Add할 타이밍
|
||||
//분할될 타이밍
|
||||
var connectPoints = point.connectPoints;
|
||||
foreach (var connectPoint in connectPoints)
|
||||
{
|
||||
var room = new Room();
|
||||
room.AddLinePoint(point);
|
||||
AddConnectPoint(connectPoint, room);
|
||||
}
|
||||
}
|
||||
private void AddConnectPoint(LinePoint point, Room room)
|
||||
{
|
||||
if (point.visited)
|
||||
return;
|
||||
if (room.IsContains(point))
|
||||
{
|
||||
if (room.points.Count < 3)
|
||||
return;
|
||||
room.firstPoints = room.points.First();
|
||||
allRoomsCase.Add(room);
|
||||
return;
|
||||
}
|
||||
|
||||
point.visited = true;
|
||||
room.AddLinePoint(point);
|
||||
var connectPoints = point.connectPoints;
|
||||
foreach (var connectPoint in connectPoints)
|
||||
{
|
||||
var temp = new Room();
|
||||
temp.points = room.points.ToList();
|
||||
AddConnectPoint(connectPoint, temp);
|
||||
}
|
||||
point.visited = false; ;
|
||||
}
|
||||
|
||||
private void FindSmallRoom()
|
||||
{
|
||||
var roomFistPoint = new HashSet<LinePoint>();
|
||||
|
||||
foreach (var room in allRoomsCase)
|
||||
{
|
||||
roomFistPoint.Add(room.firstPoints);
|
||||
}
|
||||
|
||||
foreach (var tt in roomFistPoint)
|
||||
{
|
||||
var re = allRoomsCase.Where(f => f.firstPoints.Equals(tt))
|
||||
.OrderBy(f => f.points.Count).ToList();
|
||||
//최소 points의 개수
|
||||
var minCount = re.Select(f => f.points.Count).First();
|
||||
foreach (var aa in re)
|
||||
{
|
||||
if (aa.points.Count != minCount)
|
||||
continue;
|
||||
if (CheckDuplicationRoom(aa))
|
||||
continue;
|
||||
|
||||
convexHull.RoomLinePoint(aa);
|
||||
rooms.Add(aa);
|
||||
// CreateFloor(aa);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CreateFloor(Room room)
|
||||
{
|
||||
bool isequal = false;
|
||||
foreach (var fl in floorTable)
|
||||
{
|
||||
isequal = Enumerable.SequenceEqual(room.points.OrderBy(x => x.name), fl.Value.OrderBy(z => z.name));
|
||||
if (isequal)
|
||||
break;
|
||||
}
|
||||
|
||||
if(!isequal)
|
||||
{
|
||||
var poolManager = FindSingle<ObjectPoolManager>();
|
||||
var floor = poolManager.Get<Floor>();
|
||||
|
||||
foreach (var value in room.points)
|
||||
{
|
||||
FloorTableAdd(floor, value);
|
||||
FloorMap(value, floor);
|
||||
}
|
||||
floor.Set(room);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void FloorTableAdd(Floor floor,LinePoint point)
|
||||
{
|
||||
if (!floorTable.ContainsKey(floor))
|
||||
floorTable.Add(floor, new());
|
||||
floorTable[floor].Add(point);
|
||||
}
|
||||
|
||||
private void FloorMap(LinePoint point, Floor floor)
|
||||
{
|
||||
if (!floorsMap.ContainsKey(point))
|
||||
floorsMap.Add(point, new());
|
||||
floorsMap[point].Add(floor);
|
||||
}
|
||||
|
||||
public void RemoveRoom(Room room)
|
||||
{
|
||||
|
||||
}
|
||||
private bool CheckDuplicationRoom(Room checkRoom)
|
||||
{
|
||||
foreach (var room in rooms)
|
||||
{
|
||||
if (checkRoom.points.Count != room.points.Count)
|
||||
continue;
|
||||
bool isequal = Enumerable.SequenceEqual(room.points.OrderBy(x => x.name), checkRoom.points.OrderBy(z => z.name));
|
||||
if (isequal)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//Floor 지워지는 시점..
|
||||
//재계산 하는 시점
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e59bc0ea8ba19ad458898c86f08aecd8
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a82b8cc88b7c5504baf7945c65a835d9
|
||||
guid: 553a24c445d45734e93db3694688a065
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using XED.Asset;
|
||||
using XED.Command;
|
||||
using XED.Manage;
|
||||
|
||||
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()
|
||||
{
|
||||
var cameraManager = ManagerHub.instance.Get<CameraManager>();
|
||||
|
||||
Vector3 viewAngle = new Vector3(45, 145, 0);
|
||||
|
||||
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
|
||||
43
Assets/Scripts/Studio/Command/CreateConnectedAssetCommand.cs
Normal file
43
Assets/Scripts/Studio/Command/CreateConnectedAssetCommand.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using XED.Asset;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class CreateConnectedAssetCommand : IReversibleCommand
|
||||
{
|
||||
private ConnectedAsset connectedAsset;
|
||||
private CustomAssetConnector connector;
|
||||
|
||||
public CreateConnectedAssetCommand(ConnectedAsset connectedAsset, CustomAssetConnector connector)
|
||||
{
|
||||
this.connectedAsset = connectedAsset;
|
||||
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()
|
||||
{
|
||||
if (!connectedAsset.renderObject.gameObject.activeSelf)
|
||||
{
|
||||
connectedAsset.assetData.AddTransformToRender(connectedAsset.renderObject.transform);
|
||||
connectedAsset.renderObject.gameObject.SetActive(true);
|
||||
connector.componentScrollView.AddItem(connectedAsset.hierarchyItem);
|
||||
}
|
||||
connectedAsset.renderObject.Hide();
|
||||
connector.connectedAssets.Add(connectedAsset);
|
||||
}
|
||||
|
||||
public void Undo()
|
||||
{
|
||||
connector.connectedAssets.Remove(connectedAsset);
|
||||
connectedAsset.assetData.RemoveTransform(connectedAsset.renderObject.transform);
|
||||
connectedAsset.renderObject.gameObject.SetActive(false);
|
||||
connector.componentScrollView.RemoveItem(connectedAsset.hierarchyItem);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89b52b67b0ae9d9419a78ef6838eca3d
|
||||
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.Manage;
|
||||
using XED.RuntimeGizmo;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class ActivateMoveGizmoCommand : IIrreversibleCommand
|
||||
{
|
||||
public ActivateMoveGizmoCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
var rtgController = new RTGController();
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Move);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96806282dbad1954fb33e13354823e92
|
||||
@@ -0,0 +1,25 @@
|
||||
using XED.RuntimeGizmo;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class ActivateRotateGizmoCommand : IIrreversibleCommand
|
||||
{
|
||||
public ActivateRotateGizmoCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
var rtgController = new RTGController();
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Rotate);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b70e099d374f64847834ff12c191bd91
|
||||
@@ -0,0 +1,25 @@
|
||||
using XED.RuntimeGizmo;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class ActivateScaleGizmoCommand : IIrreversibleCommand
|
||||
{
|
||||
public ActivateScaleGizmoCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
var rtgController = new RTGController();
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.Scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8959657a6330abd448297620191164d5
|
||||
@@ -0,0 +1,25 @@
|
||||
using XED.RuntimeGizmo;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class ResetGizmoCommand : IIrreversibleCommand
|
||||
{
|
||||
public ResetGizmoCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
var rtgController = new RTGController();
|
||||
rtgController.SetWorkGizmoId(RTGController.GizmoId.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d2c3f6f335592d4e888a96dbd9903d3
|
||||
@@ -3,6 +3,5 @@ namespace XED.Command
|
||||
public interface IReversibleCommand : ICommand
|
||||
{
|
||||
public abstract void Undo();
|
||||
public abstract void Redo();
|
||||
}
|
||||
}
|
||||
8
Assets/Scripts/Studio/Command/ObjectCommand.meta
Normal file
8
Assets/Scripts/Studio/Command/ObjectCommand.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0191b75d8fd469042a9f5920e1c54738
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,146 +1,48 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using XED.Asset;
|
||||
using XED.Hierarchy;
|
||||
using XED.HierarchyTree;
|
||||
using XED.Manage;
|
||||
using XED.Util;
|
||||
|
||||
namespace XED
|
||||
namespace XED.Command
|
||||
{
|
||||
public class CustomAssetCommandHandler
|
||||
public class CopyObjectCommand : IReversibleCommand
|
||||
{
|
||||
private List<ConnectedAsset> copyList;
|
||||
private CustomAssetConnector connector;
|
||||
|
||||
public CustomAssetCommandHandler(CustomAssetConnector connector)
|
||||
public CopyObjectCommand()
|
||||
{
|
||||
this.connector = connector;
|
||||
|
||||
}
|
||||
|
||||
public void CreateConnectedAsset()
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
ConnectedAsset connectedAsset = new ConnectedAsset
|
||||
{
|
||||
assetData = connector.selectedAssetData,
|
||||
hierarchyItem = connector.componentScrollView.AddItem(connector.selectedAssetData.assetName, connector.selectedItem, HierarchyItemType.obj),
|
||||
renderObject = connector.selectRenderObject
|
||||
};
|
||||
connectedAsset.renderObject.onTransformChanged = connectedAsset.assetData.OnTransformDataChanged;
|
||||
var command = new ActionCommand(
|
||||
() => ExecuteCreateConnectedAsset(connectedAsset),
|
||||
() => UndoCreateConnectedAsset(connectedAsset)
|
||||
);
|
||||
CommandManager.I.ExecuteCommand(command);
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
private void ExecuteCreateConnectedAsset(ConnectedAsset connectedAsset)
|
||||
public void Execute()
|
||||
{
|
||||
if (!connectedAsset.renderObject.gameObject.activeSelf)
|
||||
{
|
||||
connectedAsset.assetData.AddTransformToRender(connectedAsset.renderObject.transform);
|
||||
connectedAsset.renderObject.gameObject.SetActive(true);
|
||||
connector.componentScrollView.AddItem(connectedAsset.hierarchyItem);
|
||||
}
|
||||
connectedAsset.renderObject.Hide();
|
||||
connector.connectedAssets.Add(connectedAsset);
|
||||
}
|
||||
var renderObjectHandler = ManagerHub.instance.Get<RenderObjectHandler>();
|
||||
connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
|
||||
private void UndoCreateConnectedAsset(ConnectedAsset connectedAsset)
|
||||
{
|
||||
connector.connectedAssets.Remove(connectedAsset);
|
||||
connectedAsset.assetData.RemoveTransform(connectedAsset.renderObject.transform);
|
||||
connectedAsset.renderObject.gameObject.SetActive(false);
|
||||
connector.componentScrollView.RemoveItem(connectedAsset.hierarchyItem);
|
||||
}
|
||||
|
||||
public void OnRemoveObject(List<CustomAssetRenderObject> objects)
|
||||
{
|
||||
if (objects.Count == 0)
|
||||
{
|
||||
if (renderObjectHandler.selectedRenderObjects.Count == 0)
|
||||
return;
|
||||
}
|
||||
List<ConnectedAsset> removeList = new List<ConnectedAsset>();
|
||||
List<int> siblingIndex = new List<int>();
|
||||
for (int i = 0; i < objects.Count; i++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.renderObject == objects[i]);
|
||||
removeList.Add(searchAsset);
|
||||
siblingIndex.Add(searchAsset.hierarchyItem.GetSiblingIndex());
|
||||
}
|
||||
var command = new ActionCommand(
|
||||
() => ExecuteRemoveObject(removeList),
|
||||
() => UndoRemoveObject(removeList, siblingIndex)
|
||||
);
|
||||
CommandManager.I.ExecuteCommand(command);
|
||||
}
|
||||
|
||||
private void ExecuteRemoveObject(List<ConnectedAsset> removeList)
|
||||
{
|
||||
for (int i = 0; i < removeList.Count; i++)
|
||||
{
|
||||
ConnectedAsset connectedAsset = removeList[i];
|
||||
connector.componentScrollView.RemoveItem(connectedAsset.hierarchyItem);
|
||||
connectedAsset.assetData.RemoveTransform(connectedAsset.renderObject.transform);
|
||||
connectedAsset.renderObject.gameObject.SetActive(false);
|
||||
|
||||
List<HierarchyItem> childItems = connectedAsset.hierarchyItem.GetAll(true);
|
||||
for (int k = 0; k < childItems.Count; k++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.hierarchyItem == childItems[k]);
|
||||
searchAsset.assetData.RemoveTransform(searchAsset.renderObject.transform);
|
||||
searchAsset.renderObject.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
connector.onRemoveObjects?.Invoke();
|
||||
connector.componentScrollView.DeselectAll();
|
||||
}
|
||||
|
||||
private void UndoRemoveObject(List<ConnectedAsset> removeList, List<int> siblingIndex)
|
||||
{
|
||||
for (int i = 0; i < removeList.Count; i++)
|
||||
{
|
||||
ConnectedAsset connectedAsset = removeList[i];
|
||||
connector.componentScrollView.AttachItem(connectedAsset.hierarchyItem.parent, connectedAsset.hierarchyItem, siblingIndex[i]);
|
||||
connectedAsset.assetData.AddTransformToRender(connectedAsset.renderObject.transform);
|
||||
connectedAsset.renderObject.gameObject.SetActive(true);
|
||||
}
|
||||
for (int i = 0; i < removeList.Count; i++)
|
||||
{
|
||||
ConnectedAsset connectedAsset = removeList[i];
|
||||
List<HierarchyItem> childItems = connectedAsset.hierarchyItem.GetAll(true);
|
||||
for (int k = 0; k < childItems.Count; k++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.hierarchyItem == childItems[k]);
|
||||
searchAsset.assetData.AddTransformToRender(searchAsset.renderObject.transform);
|
||||
searchAsset.renderObject.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnCopyObject(List<CustomAssetRenderObject> objects)
|
||||
{
|
||||
if (objects.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
List<ConnectedAsset> copySources = new List<ConnectedAsset>();
|
||||
List<ConnectedAsset> copyList = new List<ConnectedAsset>();
|
||||
for (int i = 0; i < objects.Count; i++)
|
||||
copyList = new List<ConnectedAsset>();
|
||||
for (int i = 0; i < renderObjectHandler.selectedRenderObjects.Count; i++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.renderObject == objects[i]);
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.renderObject == renderObjectHandler.selectedRenderObjects[i]);
|
||||
copySources.Add(searchAsset);
|
||||
ConnectedAsset copyAsset = new ConnectedAsset();
|
||||
copyList.Add(copyAsset);
|
||||
connector.connectedAssets.Add(copyAsset);
|
||||
}
|
||||
var command = new ActionCommand(
|
||||
() => ExecuteCopyObject(copySources, copyList),
|
||||
() => UndoCopyObject(copyList)
|
||||
);
|
||||
CommandManager.I.ExecuteCommand(command);
|
||||
}
|
||||
|
||||
private void ExecuteCopyObject(List<ConnectedAsset> copySources, List<ConnectedAsset> copyList)
|
||||
{
|
||||
for (int i = 0; i < copyList.Count; i++)
|
||||
{
|
||||
ConnectedAsset copySource = copySources[i];
|
||||
@@ -158,8 +60,10 @@ namespace XED
|
||||
copyAsset.renderObject.transform.position = copySource.renderObject.transform.position;
|
||||
copyAsset.renderObject.transform.rotation = copySource.renderObject.transform.rotation;
|
||||
copyAsset.renderObject.transform.localScale = copySource.renderObject.transform.localScale;
|
||||
copyAsset.renderObject.OnOverlabBegin += connector.interferedObjectManager.AddInterferedPair;
|
||||
copyAsset.renderObject.OnOverlabEnd += connector.interferedObjectManager.RemoveInterferedPair;
|
||||
|
||||
List<Transform> lastParent = new List<Transform>();
|
||||
List <Transform> lastParent = new List<Transform>();
|
||||
for (int j = 0; j < copyAsset.hierarchyItem.layerNum + 1; j++)
|
||||
{
|
||||
lastParent.Add(copyAsset.renderObject.transform);
|
||||
@@ -177,12 +81,15 @@ namespace XED
|
||||
childAsset.renderObject = copyChildObject.GetComponent<CustomAssetRenderObject>();
|
||||
childAsset.renderObject.getBounds = childAsset.assetData.GetCombinedBoundary;
|
||||
childAsset.renderObject.onTransformChanged = childAsset.assetData.OnTransformDataChanged;
|
||||
childAsset.renderObject.instantiateObject = copySource.assetData.InstantiateLoadedObject;
|
||||
childAsset.renderObject.instantiateObject = childSource.assetData.InstantiateLoadedObject;
|
||||
childAsset.renderObject.CreateRenderObject();
|
||||
childAsset.renderObject.transform.position = childSource.renderObject.transform.position;
|
||||
childAsset.renderObject.transform.rotation = childSource.renderObject.transform.rotation;
|
||||
childAsset.renderObject.transform.localScale = childSource.renderObject.transform.localScale;
|
||||
childAsset.renderObject.transform.parent = lastParent[childAsset.hierarchyItem.layerNum - 1];
|
||||
childAsset.renderObject.OnOverlabBegin += connector.interferedObjectManager.AddInterferedPair;
|
||||
childAsset.renderObject.OnOverlabEnd += connector.interferedObjectManager.RemoveInterferedPair;
|
||||
|
||||
if (lastParent.Count <= childAsset.hierarchyItem.layerNum)
|
||||
{
|
||||
lastParent.Add(childAsset.renderObject.transform);
|
||||
@@ -212,7 +119,7 @@ namespace XED
|
||||
}
|
||||
}
|
||||
|
||||
private void UndoCopyObject(List<ConnectedAsset> copyList)
|
||||
public void Undo()
|
||||
{
|
||||
for (int i = 0; i < copyList.Count; i++)
|
||||
{
|
||||
@@ -229,8 +136,12 @@ namespace XED
|
||||
searchAsset.renderObject.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
connector.onRemoveObjects?.Invoke();
|
||||
ManagerHub.instance.Get<RenderObjectHandler>().DeselectAll();
|
||||
var canvas = EventConnector.instance.GetCanvas<Canvas_Popup>();
|
||||
canvas.panel_objectinfo.ResetObjectInfo();
|
||||
//connector.onRemoveObjects?.Invoke();
|
||||
connector.componentScrollView.DeselectAll();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 578e32b3992591548ba59a300b73ec97
|
||||
@@ -0,0 +1,68 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using XED.Asset;
|
||||
using XED.Command;
|
||||
using XED.HierarchyTree;
|
||||
using XED.Manage;
|
||||
using XED.Util;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
public class RemoveAllObjectCommand : IIrreversibleCommand
|
||||
{
|
||||
public RemoveAllObjectCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
|
||||
List<CustomAssetRenderObject> objects = connector.connectedAssets.Select(x => x.renderObject).ToList();
|
||||
|
||||
if (objects.Count == 0)
|
||||
return;
|
||||
|
||||
List<ConnectedAsset> removeList = new List<ConnectedAsset>();
|
||||
List<int> siblingIndex = new List<int>();
|
||||
|
||||
for (int i = 0; i < objects.Count; i++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.renderObject == objects[i]);
|
||||
removeList.Add(searchAsset);
|
||||
siblingIndex.Add(searchAsset.hierarchyItem.GetSiblingIndex());
|
||||
}
|
||||
|
||||
for (int i = 0; i < removeList.Count; i++)
|
||||
{
|
||||
ConnectedAsset connectedAsset = removeList[i];
|
||||
connector.componentScrollView.RemoveItem(connectedAsset.hierarchyItem);
|
||||
connectedAsset.assetData.RemoveTransform(connectedAsset.renderObject.transform);
|
||||
connectedAsset.renderObject.gameObject.SetActive(false);
|
||||
|
||||
List<HierarchyItem> childItems = connectedAsset.hierarchyItem.GetAll(true);
|
||||
for (int k = 0; k < childItems.Count; k++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.hierarchyItem == childItems[k]);
|
||||
searchAsset.assetData.RemoveTransform(searchAsset.renderObject.transform);
|
||||
searchAsset.renderObject.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
//connector.onRemoveObjects?.Invoke();
|
||||
ManagerHub.instance.Get<RenderObjectHandler>().DeselectAll();
|
||||
var canvas = EventConnector.instance.GetCanvas<Canvas_Popup>();
|
||||
canvas.panel_objectinfo.ResetObjectInfo();
|
||||
connector.componentScrollView.DeselectAll();
|
||||
EventConnector.instance.GetCanvas<Canvas_Popup>().panel_objectinfo.ResetObjectInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ff4d72d4e977c44881f0d235b93f816
|
||||
@@ -0,0 +1,88 @@
|
||||
using System.Collections.Generic;
|
||||
using XED.Asset;
|
||||
using XED.HierarchyTree;
|
||||
using XED.Manage;
|
||||
using XED.Util;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class RemoveSelectObjectCommand : IReversibleCommand
|
||||
{
|
||||
private List<ConnectedAsset> removeList = new List<ConnectedAsset>();
|
||||
private List<int> siblingIndex = new List<int>();
|
||||
private CustomAssetConnector connector;
|
||||
|
||||
public RemoveSelectObjectCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
var renderObjectHandler = ManagerHub.instance.Get<RenderObjectHandler>();
|
||||
connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
|
||||
if (renderObjectHandler.selectedRenderObjects.Count == 0)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < renderObjectHandler.selectedRenderObjects.Count; i++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.renderObject == renderObjectHandler.selectedRenderObjects[i]);
|
||||
removeList.Add(searchAsset);
|
||||
siblingIndex.Add(searchAsset.hierarchyItem.GetSiblingIndex());
|
||||
}
|
||||
|
||||
for (int i = 0; i < removeList.Count; i++)
|
||||
{
|
||||
ConnectedAsset connectedAsset = removeList[i];
|
||||
connector.componentScrollView.RemoveItem(connectedAsset.hierarchyItem);
|
||||
connectedAsset.assetData.RemoveTransform(connectedAsset.renderObject.transform);
|
||||
connectedAsset.renderObject.gameObject.SetActive(false);
|
||||
|
||||
List<HierarchyItem> childItems = connectedAsset.hierarchyItem.GetAll(true);
|
||||
for (int k = 0; k < childItems.Count; k++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.hierarchyItem == childItems[k]);
|
||||
searchAsset.assetData.RemoveTransform(searchAsset.renderObject.transform);
|
||||
searchAsset.renderObject.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
//connector.onRemoveObjects?.Invoke();
|
||||
ManagerHub.instance.Get<RenderObjectHandler>().DeselectAll();
|
||||
var canvas = EventConnector.instance.GetCanvas<Canvas_Popup>();
|
||||
canvas.panel_objectinfo.ResetObjectInfo();
|
||||
connector.componentScrollView.DeselectAll();
|
||||
EventConnector.instance.GetCanvas<Canvas_Popup>().panel_objectinfo.ResetObjectInfo();
|
||||
}
|
||||
|
||||
public void Undo()
|
||||
{
|
||||
for (int i = 0; i < removeList.Count; i++)
|
||||
{
|
||||
ConnectedAsset connectedAsset = removeList[i];
|
||||
connector.componentScrollView.AttachItem(connectedAsset.hierarchyItem.parent, connectedAsset.hierarchyItem, siblingIndex[i]);
|
||||
connectedAsset.assetData.AddTransformToRender(connectedAsset.renderObject.transform);
|
||||
connectedAsset.renderObject.gameObject.SetActive(true);
|
||||
}
|
||||
for (int i = 0; i < removeList.Count; i++)
|
||||
{
|
||||
ConnectedAsset connectedAsset = removeList[i];
|
||||
List<HierarchyItem> childItems = connectedAsset.hierarchyItem.GetAll(true);
|
||||
for (int k = 0; k < childItems.Count; k++)
|
||||
{
|
||||
ConnectedAsset searchAsset = connector.connectedAssets.Find((x) => x.hierarchyItem == childItems[k]);
|
||||
searchAsset.assetData.AddTransformToRender(searchAsset.renderObject.transform);
|
||||
searchAsset.renderObject.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 712363d28f807c946a7689ecb0137ea3
|
||||
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,95 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using TriLibCore.SFB;
|
||||
using XED.Asset;
|
||||
using XED.HierarchyTree;
|
||||
using XED.Manage;
|
||||
using XED.Util;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class LoadProjectCommand : IIrreversibleCommand
|
||||
{
|
||||
private CustomAssetConnector connector;
|
||||
private Dictionary<int, HierarchyItem> itemDict = new Dictionary<int, HierarchyItem>();
|
||||
|
||||
public LoadProjectCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
var projectManager = ManagerHub.instance.Get<ProjectManager>();
|
||||
|
||||
List<AssetData> assets = projectManager.curProjectData.assetDatas;
|
||||
|
||||
string path = GetOpenFilePath();
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
return;
|
||||
|
||||
ProjectData projectData = GetFileData(path);
|
||||
|
||||
if (projectData == null)
|
||||
return;
|
||||
|
||||
CommandInvoker.instance.Invoke(new RemoveAllObjectCommand());
|
||||
|
||||
foreach (AssetData asset in assets)
|
||||
{
|
||||
LoadAsset(asset);
|
||||
}
|
||||
|
||||
foreach (AssetData asset in assets)
|
||||
{
|
||||
RestoreHierarchy(asset);
|
||||
}
|
||||
|
||||
projectManager.curProjectPath = path;
|
||||
projectManager.curProjectData = projectData;
|
||||
}
|
||||
|
||||
private string GetOpenFilePath()
|
||||
{
|
||||
var data = StandaloneFileBrowser.OpenFilePanel("OpenProject", "", "json", false);
|
||||
return data.Count >= 1 ? data[0].Name : "";
|
||||
}
|
||||
|
||||
private ProjectData GetFileData(string path)
|
||||
{
|
||||
string json = File.ReadAllText(path);
|
||||
return JsonConvert.DeserializeObject<ProjectData>(json);
|
||||
}
|
||||
|
||||
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,31 @@
|
||||
using XED.Asset;
|
||||
using XED.Manage;
|
||||
|
||||
namespace XED.Command
|
||||
{
|
||||
public class NewProjectCommand : IIrreversibleCommand
|
||||
{
|
||||
public NewProjectCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
var projectManager = ManagerHub.instance.Get<ProjectManager>();
|
||||
|
||||
projectManager.curProjectPath = string.Empty;
|
||||
projectManager.curProjectData = null;
|
||||
|
||||
CommandInvoker.instance.Invoke(new RemoveAllObjectCommand());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16f7564790f59584283a83911585ada8
|
||||
@@ -0,0 +1,69 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using TriLibCore.SFB;
|
||||
using XED.Asset;
|
||||
using XED.Command;
|
||||
using XED.Manage;
|
||||
using XED.Service;
|
||||
using XED.Util;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
public class SaveProjectCommand : IIrreversibleCommand
|
||||
{
|
||||
public SaveProjectCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string id { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
|
||||
public bool CanExecute()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
var connector = ManagerHub.instance.Get<CustomAssetConnector>();
|
||||
var projectManager = ManagerHub.instance.Get<ProjectManager>();
|
||||
var assetDataService = new AssetDataService();
|
||||
|
||||
bool isNewProject = string.IsNullOrEmpty(projectManager.curProjectPath);
|
||||
string path = isNewProject ? GetSaveFilePath() : projectManager.curProjectData.filePath;
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
return;
|
||||
|
||||
List<AssetData> assetDatas = assetDataService.SortAssetDatas(connector.connectedAssets);
|
||||
ProjectData projectData = CreateProjectData(path, assetDatas);
|
||||
|
||||
string json = JsonConvert.SerializeObject(projectData);
|
||||
FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write);
|
||||
StreamWriter writer = new StreamWriter(fs, System.Text.Encoding.Unicode);
|
||||
writer.Write(json);
|
||||
writer.Close();
|
||||
|
||||
projectManager.curProjectPath = path;
|
||||
projectManager.curProjectData = projectData;
|
||||
}
|
||||
|
||||
private ProjectData CreateProjectData(string path, List<AssetData> assetDatas)
|
||||
{
|
||||
return new ProjectData
|
||||
{
|
||||
filePath = path,
|
||||
updateDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
assetDatas = assetDatas
|
||||
};
|
||||
}
|
||||
|
||||
private string GetSaveFilePath()
|
||||
{
|
||||
var data = StandaloneFileBrowser.SaveFilePanel("SaveProject", "", "", "json");
|
||||
return data.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91703b89f5f43354d9d896c2f4b8dcde
|
||||
@@ -1,40 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public class OpenFileName
|
||||
{
|
||||
public int structSize = 0;
|
||||
public IntPtr dlgOwner = IntPtr.Zero;
|
||||
public IntPtr instance = IntPtr.Zero;
|
||||
public String filter = null;
|
||||
public String customFilter = null;
|
||||
public int maxCustFilter = 0;
|
||||
public int filterIndex = 0;
|
||||
public String file = null;
|
||||
public int maxFile = 0;
|
||||
public String fileTitle = null;
|
||||
public int maxFileTitle = 0;
|
||||
public String initialDir = null;
|
||||
public String title = null;
|
||||
public int flags = 0;
|
||||
public short fileOffset = 0;
|
||||
public short fileExtension = 0;
|
||||
public String defExt = null;
|
||||
public IntPtr custData = IntPtr.Zero;
|
||||
public IntPtr hook = IntPtr.Zero;
|
||||
public String templateName = null;
|
||||
public IntPtr reservedPtr = IntPtr.Zero;
|
||||
public int reservedInt = 0;
|
||||
public int flagsEx = 0;
|
||||
}
|
||||
|
||||
public class ofnDll
|
||||
{
|
||||
[DllImport("Comdlg32.dll", SetLastError = true, ThrowOnUnmappableChar = true, CharSet = CharSet.Auto)]
|
||||
public static extern bool GetOpenFileName([In, Out] OpenFileName ofn);
|
||||
public static bool OpenFileName([In, Out] OpenFileName ofn)
|
||||
{
|
||||
return GetOpenFileName(ofn);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3bbd69400cf49ce40b31141de01817d2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
46
Assets/Scripts/Studio/Common/ProejctData.cs
Normal file
46
Assets/Scripts/Studio/Common/ProejctData.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XED.Util
|
||||
{
|
||||
public class ProjectData
|
||||
{
|
||||
public string filePath;
|
||||
public string updateDate;
|
||||
public List<AssetData> assetDatas;
|
||||
}
|
||||
|
||||
public class AssetData
|
||||
{
|
||||
public int id;
|
||||
public string name;
|
||||
public SaveVector3 position;
|
||||
public SaveVector3 rotation;
|
||||
public SaveVector3 scale;
|
||||
public List<int> children;
|
||||
|
||||
public AssetData(int id, string name, SaveVector3 position, SaveVector3 rotation, SaveVector3 scale, List<int> children)
|
||||
{
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.position = position;
|
||||
this.rotation = rotation;
|
||||
this.scale = scale;
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
|
||||
public class SaveVector3
|
||||
{
|
||||
public float x;
|
||||
public float y;
|
||||
public float z;
|
||||
|
||||
public SaveVector3(Vector3 vector3)
|
||||
{
|
||||
x = vector3.x;
|
||||
y = vector3.y;
|
||||
z = vector3.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Studio/Common/ProejctData.cs.meta
Normal file
2
Assets/Scripts/Studio/Common/ProejctData.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5105f98311fa764aaeb8dccca24e342
|
||||
@@ -1,21 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace XED.Util
|
||||
{
|
||||
public static class UtilityFunction
|
||||
{
|
||||
public static Transform FindDeepChild(Transform parent, string name)
|
||||
{
|
||||
foreach (Transform child in parent)
|
||||
{
|
||||
if (child.name == name)
|
||||
return child;
|
||||
|
||||
Transform result = FindDeepChild(child, name);
|
||||
if (result != null)
|
||||
return result;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8ef75561e2eef84db1fdad226542515
|
||||
@@ -1,53 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XED.ComponentSystem
|
||||
{
|
||||
public abstract class ActionComponent
|
||||
{
|
||||
public enum EventType
|
||||
{
|
||||
Start,
|
||||
Complete,
|
||||
}
|
||||
|
||||
public bool isStarted;
|
||||
|
||||
public Action<ActionComponent> onStart;
|
||||
public Action<ActionComponent> onComplete;
|
||||
|
||||
public Dictionary<EventType, List<ActionComponent>> subscribers = new();
|
||||
public abstract void Start();
|
||||
public abstract void Run();
|
||||
|
||||
public void Subscribe(EventType et, ActionComponent ac)
|
||||
{
|
||||
if (!subscribers.ContainsKey(et))
|
||||
{
|
||||
subscribers.Add(et, new List<ActionComponent>());
|
||||
}
|
||||
|
||||
subscribers[et].Add(ac);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class Timer : ActionComponent
|
||||
{
|
||||
public float timer;
|
||||
public float duration;
|
||||
|
||||
public override void Run()
|
||||
{
|
||||
timer += Time.deltaTime;
|
||||
}
|
||||
|
||||
public override void Start()
|
||||
{
|
||||
timer = 0f;
|
||||
onStart?.Invoke(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8e1cd05849bbd143b88ed45db8e6ea1
|
||||
@@ -1,25 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using XRLib;
|
||||
|
||||
namespace XED.ComponentSystem
|
||||
{
|
||||
public class ActionComponentRunner : MonoBehaviour, ISingle
|
||||
{
|
||||
public List<ActionComponent> components =new();
|
||||
public void Add(ActionComponent ac)
|
||||
{
|
||||
components.Add(ac);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
foreach (var c in components)
|
||||
{
|
||||
if (!c.isStarted)
|
||||
c.Start();
|
||||
|
||||
c.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33290f25a5450894d8bb61de724f0e8b
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user