修改prefab

This commit is contained in:
YangHua 2024-08-21 15:35:11 +08:00
parent cd1bbc0b64
commit c4c3e7fc92
6 changed files with 55 additions and 48 deletions

View File

@ -47,8 +47,8 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 0.18160681, y: 0.021532074, z: 0.20436215}
m_Center: {x: 0.04080341, y: -0.00039234012, z: 0.100046635}
m_Size: {x: 0.075638294, y: 0.021532074, z: 0.20600748}
m_Center: {x: 0.000685215, y: -0.00039234012, z: -0.10260677}
--- !u!114 &2557768358979172441
MonoBehaviour:
m_ObjectHideFlags: 0
@ -253,6 +253,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ed5f63fb6d7e2264f9d874f16a129f33, type: 3}
m_Name:
m_EditorClassIdentifier:
triggerID: 0
triggerName:
_highlight: {fileID: 0}
toolType: 1
--- !u!1001 &2557768359515585564
PrefabInstance:
@ -275,27 +278,27 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
propertyPath: m_LocalPosition.z
value: 0.031499982
value: -0.0336
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
propertyPath: m_LocalRotation.x
value: -0.7071068
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
propertyPath: m_LocalRotation.y
value: -0
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
propertyPath: m_LocalRotation.z
value: -0
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
value: -90
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
@ -303,7 +306,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
value: 180
objectReference: {fileID: 0}
- target: {fileID: -3887185075125053422, guid: 81f7b3028e3d6dc41bbbfc890e800692, type: 3}
propertyPath: m_DirtyAABB

View File

@ -25,14 +25,14 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1106388378891068202}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6513467834766798071}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: -90, y: 0, z: -90}
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!33 &3728599406527870517
MeshFilter:
m_ObjectHideFlags: 0
@ -109,7 +109,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3700622895044939927}
m_LocalRotation: {x: -0.5, y: -0.5, z: -0.5, w: 0.5}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.183, y: -0.8180001, z: -4.548}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -117,7 +117,7 @@ Transform:
- {fileID: 293155032794954128}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: -90, y: 0, z: -90}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &720695148243342804
BoxCollider:
m_ObjectHideFlags: 0
@ -129,8 +129,8 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 0.10188018, y: 0.52480876, z: 0.047943614}
m_Center: {x: 0.00032048486, y: 0.13491571, z: -0.00199759}
m_Size: {x: 0.10188018, y: 0.06633282, z: 0.28382015}
m_Center: {x: 0.00032048672, y: 0.0010650158, z: -0.010372162}
--- !u!114 &5159517654972794728
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -68,7 +68,7 @@ BoxCollider:
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 0.02702525, y: 0.014929531, z: 0.21093392}
m_Center: {x: -0.000000084750354, y: 0.00021882821, z: 0.111839116}
m_Center: {x: -0.000000084750354, y: 0.00021882821, z: -0.105}
--- !u!114 &274832999635433080
MonoBehaviour:
m_ObjectHideFlags: 0
@ -253,6 +253,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 384c2a2ee9bfbb34291e9e46171e43c4, type: 3}
m_Name:
m_EditorClassIdentifier:
triggerID: 0
triggerName:
_highlight: {fileID: 0}
toolType: 3
screem: {fileID: 2465643204263011842}
--- !u!1 &6963989103699611485
@ -366,7 +369,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_LocalPosition.x
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_LocalPosition.y
@ -374,23 +377,23 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_LocalPosition.z
value: 0.111799955
value: -0.1056
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_LocalRotation.w
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_LocalRotation.x
value: -0
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_LocalRotation.y
value: -0
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_LocalRotation.z
value: -2.606266e-16
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -398,7 +401,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
value: 180
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 68467c2fd5fa82845950ebe0d0daf4eb, type: 3}
propertyPath: m_LocalEulerAnglesHint.z

View File

@ -1538,7 +1538,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_Color: {r: 0, g: 0, b: 0, a: 0.3137255}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1

View File

@ -811,7 +811,7 @@ Transform:
- {fileID: 665231068}
- {fileID: 77038122544807096}
- {fileID: 260020824035813045}
- {fileID: 4187440228736137475}
- {fileID: 4321194316212246351}
- {fileID: 3421347699316710321}
- {fileID: 75212183}
- {fileID: 2201113306574956246}
@ -1458,7 +1458,7 @@ MonoBehaviour:
- {fileID: 8642374616143441852}
- {fileID: 77038122544807097}
- {fileID: 260020824035813046}
- {fileID: 4187440228736137476}
- {fileID: 1472225585929885171}
- {fileID: 3421347699316710322}
- {fileID: 75212184}
- {fileID: 7719931384355802819}
@ -1699,7 +1699,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6513467834766798071, guid: 6e7d3b4f0774d834a8aaf8a9ad867596, type: 3}
propertyPath: m_LocalPosition.x
value: 0.183
value: 0.3284
objectReference: {fileID: 0}
- target: {fileID: 6513467834766798071, guid: 6e7d3b4f0774d834a8aaf8a9ad867596, type: 3}
propertyPath: m_LocalPosition.y
@ -1711,19 +1711,19 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6513467834766798071, guid: 6e7d3b4f0774d834a8aaf8a9ad867596, type: 3}
propertyPath: m_LocalRotation.w
value: 0.5
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6513467834766798071, guid: 6e7d3b4f0774d834a8aaf8a9ad867596, type: 3}
propertyPath: m_LocalRotation.x
value: -0.5
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6513467834766798071, guid: 6e7d3b4f0774d834a8aaf8a9ad867596, type: 3}
propertyPath: m_LocalRotation.y
value: -0.5
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6513467834766798071, guid: 6e7d3b4f0774d834a8aaf8a9ad867596, type: 3}
propertyPath: m_LocalRotation.z
value: -0.5
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6513467834766798071, guid: 6e7d3b4f0774d834a8aaf8a9ad867596, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -1887,6 +1887,17 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8273280625189519447}
m_Mesh: {fileID: 392202292576815664, guid: 156cca832bad49447b16a92685b1fa5b, type: 3}
--- !u!114 &1472225585929885171 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3346917713294978289, guid: 850d184585559a646851b3bf3220e64f, type: 3}
m_PrefabInstance: {fileID: 4187440228736137474}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1480631129144452773
GameObject:
m_ObjectHideFlags: 0
@ -2862,22 +2873,6 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 850d184585559a646851b3bf3220e64f, type: 3}
--- !u!4 &4187440228736137475 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 138259078697446989, guid: 850d184585559a646851b3bf3220e64f, type: 3}
m_PrefabInstance: {fileID: 4187440228736137474}
m_PrefabAsset: {fileID: 0}
--- !u!114 &4187440228736137476 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3346917713294978289, guid: 850d184585559a646851b3bf3220e64f, type: 3}
m_PrefabInstance: {fileID: 4187440228736137474}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a6f31a9609373b04faa317bc87afe550, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!23 &4198229849941995259
MeshRenderer:
m_ObjectHideFlags: 0
@ -2951,6 +2946,11 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7884939154751646451}
m_Mesh: {fileID: -4426076302045516145, guid: 156cca832bad49447b16a92685b1fa5b, type: 3}
--- !u!4 &4321194316212246351 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 138259078697446989, guid: 850d184585559a646851b3bf3220e64f, type: 3}
m_PrefabInstance: {fileID: 4187440228736137474}
m_PrefabAsset: {fileID: 0}
--- !u!33 &4348541273066611768
MeshFilter:
m_ObjectHideFlags: 0

View File

@ -52,7 +52,8 @@ public class UI_ToolOrMaterialsOrDeviceItem : BaseItem
GameManager.UIMgr.HidePanel<UI_ToolAndMaterialPanel>();
GameObject currentTool = Instantiate(currentItem.objPrefab);
currentTool.name = currentItem.toolName;
currentTool.transform.position = Camera.main.transform.position + Camera.main.transform.forward * 1f;
Vector3 pos = Camera.main.transform.position + Camera.main.transform.forward * 0.3f;
currentTool.transform.position = new Vector3(pos.x+0.2f, pos.y-0.14f, pos.z+0.1f);
break;
}
}