added drag and drop script in test scene, needs to be implemented in main scene when building, for now we can do that it builds in a place but you can move it after

This commit is contained in:
Lorenzo
2022-04-16 17:02:46 +02:00
parent d90919474b
commit 04ee196e6b
17 changed files with 1661 additions and 1083 deletions

View File

@@ -85483,7 +85483,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 828023760}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 53edd1304ce7ec14fa61e457a4745d7a, type: 3}
m_Name:
@@ -85505,7 +85505,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 9
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &829621800
PrefabInstance:
@@ -136773,6 +136773,10 @@ PrefabInstance:
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1411078841024720, guid: f6a0a51a14e8206458a737d5b7566823, type: 3}
propertyPath: m_TagString
value: Untagged
objectReference: {fileID: 0}
- target: {fileID: 1411078841024720, guid: f6a0a51a14e8206458a737d5b7566823, type: 3}
propertyPath: m_StaticEditorFlags
value: 0
@@ -191280,7 +191284,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 10
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1901855292
PrefabInstance:
@@ -198739,7 +198743,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1972483755}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cf95a4372862ef3d7b3076cf3530ac7c, type: 3}
m_Name:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 38ff6978651d28947aa3f52ad686a700
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -123,6 +123,51 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &244030807
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 244030809}
- component: {fileID: 244030808}
m_Layer: 0
m_Name: Grabber
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &244030808
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 244030807}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a68a2fd4e7e3d3f4bab9e38d25966c16, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &244030809
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 244030807}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 40.06746, y: 16.381016, z: 23.279755}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1680322273}
- {fileID: 1792387368}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1133188547
GameObject:
m_ObjectHideFlags: 0
@@ -216,6 +261,474 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1001 &1680322268
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 244030809}
m_Modifications:
- target: {fileID: 1030222519521610, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1085150954895212, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1190247210720578, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1190247210720578, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1192677261927446, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1228547764139184, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1236346480462938, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1387387311931884, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1417734501511586, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1522762644076048, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1525672195942320, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1555888778316190, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1630775346035012, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1686546796970542, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1921197407026916, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1921197407026916, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_TagString
value: Drag
objectReference: {fileID: 0}
- target: {fileID: 1921197407026916, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1974840161955518, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 1989107666535598, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_StaticEditorFlags
value: 123
objectReference: {fileID: 0}
- target: {fileID: 4036159959284746, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4036159959284746, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4036159959284746, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4051269024694712, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4051269024694712, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalPosition.x
value: -40.06746
objectReference: {fileID: 0}
- target: {fileID: 4051269024694712, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalPosition.y
value: -16.381016
objectReference: {fileID: 0}
- target: {fileID: 4051269024694712, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalPosition.z
value: -23.279755
objectReference: {fileID: 0}
- target: {fileID: 4051269024694712, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4051269024694712, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4051269024694712, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4051269024694712, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4079677786129272, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 11
objectReference: {fileID: 0}
- target: {fileID: 4079677786129272, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.w
value: 0.96568245
objectReference: {fileID: 0}
- target: {fileID: 4079677786129272, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4079677786129272, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.z
value: 0.25972566
objectReference: {fileID: 0}
- target: {fileID: 4079677786129272, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 30.108002
objectReference: {fileID: 0}
- target: {fileID: 4179644692072336, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4179644692072336, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.w
value: 0.9554904
objectReference: {fileID: 0}
- target: {fileID: 4179644692072336, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4179644692072336, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.z
value: -0.29502222
objectReference: {fileID: 0}
- target: {fileID: 4179644692072336, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -34.318
objectReference: {fileID: 0}
- target: {fileID: 4266518402079082, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4266518402079082, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4266518402079082, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4291456910888494, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4291456910888494, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.w
value: 0.98837924
objectReference: {fileID: 0}
- target: {fileID: 4291456910888494, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.x
value: -0.15200816
objectReference: {fileID: 0}
- target: {fileID: 4291456910888494, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4291456910888494, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -17.487001
objectReference: {fileID: 0}
- target: {fileID: 4315921539254786, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 4315921539254786, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.w
value: 0.98845166
objectReference: {fileID: 0}
- target: {fileID: 4315921539254786, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.x
value: 0.15153652
objectReference: {fileID: 0}
- target: {fileID: 4315921539254786, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4315921539254786, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4315921539254786, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 17.432001
objectReference: {fileID: 0}
- target: {fileID: 4327022237357436, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4327022237357436, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalPosition.y
value: -2.11
objectReference: {fileID: 0}
- target: {fileID: 4358533199190104, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 8
objectReference: {fileID: 0}
- target: {fileID: 4358533199190104, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalPosition.y
value: -2.11
objectReference: {fileID: 0}
- target: {fileID: 4480137889570234, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4480137889570234, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4480137889570234, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4548759668367146, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4548759668367146, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalPosition.y
value: -2.11
objectReference: {fileID: 0}
- target: {fileID: 4585628656383942, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 12
objectReference: {fileID: 0}
- target: {fileID: 4585628656383942, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalPosition.y
value: -2.11
objectReference: {fileID: 0}
- target: {fileID: 4631890095669964, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: 4631890095669964, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalPosition.y
value: -2.11
objectReference: {fileID: 0}
- target: {fileID: 4686781548691278, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 10
objectReference: {fileID: 0}
- target: {fileID: 4686781548691278, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalPosition.y
value: -2.11
objectReference: {fileID: 0}
- target: {fileID: 4711833019027800, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 4711833019027800, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalPosition.y
value: -2.11
objectReference: {fileID: 0}
- target: {fileID: 4876929997971938, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_RootOrder
value: 9
objectReference: {fileID: 0}
- target: {fileID: 4876929997971938, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_LocalPosition.y
value: -2.11
objectReference: {fileID: 0}
- target: {fileID: 23799004123246502, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_CastShadows
value: 0
objectReference: {fileID: 0}
- target: {fileID: 23799004123246502, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: ae87c245450dab64d8d5f5c7181a4961, type: 2}
- target: {fileID: 23908794670529968, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_CastShadows
value: 0
objectReference: {fileID: 0}
- target: {fileID: 23908794670529968, guid: d81764106729b864190b07916583157e, type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: ae87c245450dab64d8d5f5c7181a4961, type: 2}
m_RemovedComponents:
- {fileID: 64779113362969818, guid: d81764106729b864190b07916583157e, type: 3}
- {fileID: 64335450781403628, guid: d81764106729b864190b07916583157e, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: d81764106729b864190b07916583157e, type: 3}
--- !u!1 &1680322269 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1921197407026916, guid: d81764106729b864190b07916583157e, type: 3}
m_PrefabInstance: {fileID: 1680322268}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1680322270
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1680322269}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
m_Name:
m_EditorClassIdentifier:
outlineMode: 0
outlineColor: {r: 1, g: 0.49108702, b: 0, a: 1}
outlineWidth: 10
precomputeOutline: 0
bakeKeys: []
bakeValues: []
--- !u!4 &1680322273 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4051269024694712, guid: d81764106729b864190b07916583157e, type: 3}
m_PrefabInstance: {fileID: 1680322268}
m_PrefabAsset: {fileID: 0}
--- !u!64 &1680322274
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1680322269}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 4
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 4300000, guid: 9619075e7d663914da3b48baf76216e7, type: 3}
--- !u!114 &1680322275
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1680322269}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e6da85d893d238744aa17c170581ebc7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1792387364
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1792387368}
- component: {fileID: 1792387367}
- component: {fileID: 1792387366}
- component: {fileID: 1792387365}
m_Layer: 0
m_Name: Cube
m_TagString: Drag
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!65 &1792387365
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1792387364}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1792387366
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1792387364}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, 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}
--- !u!33 &1792387367
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1792387364}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1792387368
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1792387364}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 20, y: 20, z: 30}
m_Children: []
m_Father: {fileID: 244030809}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2007935809
GameObject:
m_ObjectHideFlags: 0
@@ -5031,6 +5544,7 @@ GameObject:
- component: {fileID: 2114568320}
- component: {fileID: 2114568319}
- component: {fileID: 2114568318}
- component: {fileID: 2114568321}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
@@ -5096,10 +5610,43 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2114568317}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalRotation: {x: 0.5934189, y: 0, z: 0, w: 0.8048938}
m_LocalPosition: {x: 0, y: 156.03, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 72.8, y: 0, z: 0}
--- !u!114 &2114568321
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2114568317}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_Version: 2

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5772ac097180aaf4da1068ca3064579d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DragAndDrop : MonoBehaviour
{
private float zCoord;
private Vector3 mouseOffset;
private void onMouseDown()
{
zCoord = Camera.main.WorldToScreenPoint(transform.position).z;
mouseOffset = transform.position - mouseWorldPos();
}
private void onMouseDrag()
{
transform.position = mouseWorldPos() + mouseOffset;
}
private Vector3 mouseWorldPos()
{
Vector3 mPos = Input.mousePosition;
mPos.z = zCoord;
return Camera.main.ScreenToWorldPoint(mPos);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e6da85d893d238744aa17c170581ebc7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,60 @@
using UnityEngine;
public class Grabber : MonoBehaviour {
private GameObject selectedObject;
private void Update() {
if (Input.GetMouseButtonDown(0)) {
if(selectedObject == null) {
RaycastHit hit = CastRay();
if(hit.collider != null) {
if (!hit.collider.CompareTag("Drag")) {
return;
}
selectedObject = hit.collider.gameObject;
Cursor.visible = false;
}
} else {
Vector3 position = new Vector3(Input.mousePosition.x, Input.mousePosition.y, Camera.main.WorldToScreenPoint(selectedObject.transform.position).z);
Vector3 worldPosition = Camera.main.ScreenToWorldPoint(position);
selectedObject.transform.position = new Vector3(worldPosition.x, 0f, worldPosition.z);
selectedObject = null;
Cursor.visible = true;
}
}
if(selectedObject != null) {
Vector3 position = new Vector3(Input.mousePosition.x, Input.mousePosition.y, Camera.main.WorldToScreenPoint(selectedObject.transform.position).z);
Vector3 worldPosition = Camera.main.ScreenToWorldPoint(position);
selectedObject.transform.position = new Vector3(worldPosition.x, .25f, worldPosition.z);
if (Input.GetMouseButtonDown(1)) {
selectedObject.transform.rotation = Quaternion.Euler(new Vector3(
selectedObject.transform.rotation.eulerAngles.x,
selectedObject.transform.rotation.eulerAngles.y + 90f,
selectedObject.transform.rotation.eulerAngles.z));
}
}
}
private RaycastHit CastRay() {
Vector3 screenMousePosFar = new Vector3(
Input.mousePosition.x,
Input.mousePosition.y,
Camera.main.farClipPlane);
Vector3 screenMousePosNear = new Vector3(
Input.mousePosition.x,
Input.mousePosition.y,
Camera.main.nearClipPlane);
Vector3 worldMousePosFar = Camera.main.ScreenToWorldPoint(screenMousePosFar);
Vector3 worldMousePosNear = Camera.main.ScreenToWorldPoint(screenMousePosNear);
RaycastHit hit;
Physics.Raycast(worldMousePosNear, worldMousePosFar - worldMousePosNear, out hit);
return hit;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a68a2fd4e7e3d3f4bab9e38d25966c16
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: