Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
山
山西检定流水线数字孪生项目
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨泽宇
山西检定流水线数字孪生项目
Commits
e0b7540e
Commit
e0b7540e
authored
Aug 20, 2024
by
杨泽宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
0dc34913
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
113747 additions
and
13223 deletions
+113747
-13223
SensorDataManger.cs
Assets/Scripts/Components/UI/SensorDataManger.cs
+2
-9
1_Main.unity
Assets/_Scenes/1_Main.unity
+27
-2
2_Main.unity
Assets/_Scenes/2_Main.unity
+113716
-13210
标签-传感器数据-0810.prefab
Assets/_预设/UI/标签-传感器数据-0810.prefab
+2
-2
No files found.
Assets/Scripts/Components/UI/SensorDataManger.cs
View file @
e0b7540e
...
...
@@ -38,7 +38,7 @@ public class SensorDataManger : MonoBehaviour
//编辑模式下使用,创建UI
//foreach (GameObject item in model1)
//{
// Create3dUI(item,_parent1);
// Create3dUI(item,
_parent1);
//}
//foreach (GameObject item in model2)
...
...
@@ -68,20 +68,13 @@ public class SensorDataManger : MonoBehaviour
if
(
tagert_obj
!=
null
&&
_prefab
!=
null
)
{
// 在模型上方生成UI
uiInstance
=
Instantiate
(
_prefab
,
tagert_obj
.
transform
.
position
+
uiOffset
,
Quaternion
.
identity
);
// 设置UI为世界空间
Canvas
canvas
=
uiInstance
.
GetComponent
<
Canvas
>();
if
(
canvas
!=
null
)
{
canvas
.
renderMode
=
RenderMode
.
WorldSpace
;
}
uiInstance
=
Instantiate
(
_prefab
,
tagert_obj
.
transform
);
// 设置UI跟随模型移动
uiInstance
.
transform
.
SetParent
(
_parent
.
transform
);
uiInstance
.
transform
.
name
=
tagert_obj
.
name
;
uiInstance
.
transform
.
localScale
=
new
Vector3
(
0.01f
,
0.01f
,
0.01f
);
//uiInstance.transform.position = tagert_obj.transform.position;
//uiInstance.GetComponent<RectTransform>().position=new Vector3()
...
...
Assets/_Scenes/1_Main.unity
View file @
e0b7540e
...
...
@@ -4283,6 +4283,11 @@ PrefabInstance:
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1695550891907408804, guid: 1728ef96ff7b1b44f943e3c988d53d15,
type: 3}
propertyPath: m_Name
value: "\u62C6\u579B\u673A"
objectReference: {fileID: 0}
- target: {fileID: 1832681842958220310, guid: 1728ef96ff7b1b44f943e3c988d53d15,
type: 3}
propertyPath: m_LocalPosition.y
...
...
@@ -4313,6 +4318,16 @@ PrefabInstance:
propertyPath: m_LocalPosition.y
value: 20.26
objectReference: {fileID: 0}
- target: {fileID: 3688376195769160204, guid: 1728ef96ff7b1b44f943e3c988d53d15,
type: 3}
propertyPath: m_Name
value: "\u62C6\u579B\u673A"
objectReference: {fileID: 0}
- target: {fileID: 4030563618866899997, guid: 1728ef96ff7b1b44f943e3c988d53d15,
type: 3}
propertyPath: m_Name
value: "\u7801\u579B\u673A"
objectReference: {fileID: 0}
- target: {fileID: 4630781114975493123, guid: 1728ef96ff7b1b44f943e3c988d53d15,
type: 3}
propertyPath: m_LocalPosition.y
...
...
@@ -4323,6 +4338,11 @@ PrefabInstance:
propertyPath: m_LocalPosition.y
value: -0.45000076
objectReference: {fileID: 0}
- target: {fileID: 5122418677176823695, guid: 1728ef96ff7b1b44f943e3c988d53d15,
type: 3}
propertyPath: m_Name
value: "\u7801\u579B\u673A"
objectReference: {fileID: 0}
- target: {fileID: 5243275804557215515, guid: 1728ef96ff7b1b44f943e3c988d53d15,
type: 3}
propertyPath: m_LocalPosition.y
...
...
@@ -13400,6 +13420,11 @@ PrefabInstance:
propertyPath: m_Name
value: "\u535A\u4E16\u7EBF"
objectReference: {fileID: 0}
- target: {fileID: 5579652541004442452, guid: 6a1bc17fb471d834cae62b8b564a5c7b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6851022389288696422, guid: 6a1bc17fb471d834cae62b8b564a5c7b,
type: 3}
propertyPath: m_Pivot.x
...
...
@@ -43589,8 +43614,8 @@ MonoBehaviour:
_parent1: {fileID: 396184908}
_parent2: {fileID: 1692847786}
uiOffset: {x: 0, y: 2, z: 0}
lineId1:
EB6F0348492C181DE055000000000001
lineId2:
AD6E344FAEEB2EA9E053A3001E0A371D
lineId1:
lineId2:
post_url:
--- !u!1 &820565486
GameObject:
Assets/_Scenes/2_Main.unity
View file @
e0b7540e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Assets/_预设/UI/标签-传感器数据-0810.prefab
View file @
e0b7540e
...
...
@@ -3080,7 +3080,7 @@ RectTransform:
m_GameObject
:
{
fileID
:
5579652541004442452
}
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_LocalScale
:
{
x
:
0.01
,
y
:
0.01
,
z
:
0.0
1
}
m_ConstrainProportionsScale
:
1
m_Children
:
-
{
fileID
:
5484219903680019960
}
...
...
@@ -3098,7 +3098,7 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0
}
m_AnchorMax
:
{
x
:
0
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
-5.789978
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
2
}
m_SizeDelta
:
{
x
:
260
,
y
:
0
}
m_Pivot
:
{
x
:
0.5
,
y
:
0
}
---
!u!223
&3412406059346097615
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment