增加VR相关
This commit is contained in:
parent
d3ebee5728
commit
806bd0d404
@ -123,8 +123,8 @@ Transform:
|
|||||||
m_GameObject: {fileID: 598348144801550191}
|
m_GameObject: {fileID: 598348144801550191}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0.1465, z: 0}
|
m_LocalPosition: {x: 0, y: 2.1975, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 15, y: 15, z: 15}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 5974269590546671381}
|
- {fileID: 5974269590546671381}
|
||||||
@ -144,7 +144,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
Frame: {fileID: 6717849271440217812}
|
Frame: {fileID: 6717849271440217812}
|
||||||
ViewerScale: 1
|
ViewerScale: 15
|
||||||
--- !u!1 &765259898297824089
|
--- !u!1 &765259898297824089
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -174,7 +174,7 @@ Transform:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 15, y: 15, z: 15}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 964729101505013327}
|
- {fileID: 964729101505013327}
|
||||||
@ -192,7 +192,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: b20817e9db276aa4182f6e0885aa2ddf, type: 3}
|
m_Script: {fileID: 11500000, guid: b20817e9db276aa4182f6e0885aa2ddf, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
ViewerScale: 1
|
ViewerScale: 15
|
||||||
--- !u!114 &2720570802681005941
|
--- !u!114 &2720570802681005941
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -634,7 +634,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 3400309332038407868}
|
m_GameObject: {fileID: 3400309332038407868}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: -0.000000059604645}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
@ -1129,7 +1129,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 4951725383111470759}
|
m_GameObject: {fileID: 4951725383111470759}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: -0.000000059604645}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|||||||
24
Assets/Scripts/Extension/DeviceDraggable.cs
Normal file
24
Assets/Scripts/Extension/DeviceDraggable.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using GCSeries.Core.Samples;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.EventSystems;
|
||||||
|
|
||||||
|
public class DeviceDraggable : Draggable
|
||||||
|
{
|
||||||
|
Vector3 pos;
|
||||||
|
Vector3 rot;
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
pos = transform.position;
|
||||||
|
rot = transform.localEulerAngles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEndDrag(PointerEventData eventData)
|
||||||
|
{
|
||||||
|
base.OnEndDrag(eventData);
|
||||||
|
transform.position = pos;
|
||||||
|
transform.localEulerAngles = rot;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
11
Assets/Scripts/Extension/DeviceDraggable.cs.meta
Normal file
11
Assets/Scripts/Extension/DeviceDraggable.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c2b2028d0dec50841b6e5477b275f265
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -54,6 +54,8 @@ public class DeviceItem : MonoBehaviour
|
|||||||
UIRoot.Instance.transform.Find("ZStylus").GetComponent<ZPointer>().OnObjectExited.AddListener(OnObjExit);
|
UIRoot.Instance.transform.Find("ZStylus").GetComponent<ZPointer>().OnObjectExited.AddListener(OnObjExit);
|
||||||
UIRoot.Instance.transform.Find("ZMouse").GetComponent<ZPointer>().OnClick.AddListener(OnClick);
|
UIRoot.Instance.transform.Find("ZMouse").GetComponent<ZPointer>().OnClick.AddListener(OnClick);
|
||||||
UIRoot.Instance.transform.Find("ZStylus").GetComponent<ZPointer>().OnClick.AddListener(OnClick);
|
UIRoot.Instance.transform.Find("ZStylus").GetComponent<ZPointer>().OnClick.AddListener(OnClick);
|
||||||
|
|
||||||
|
gameObject.GetOrAddComponent<DeviceDraggable>();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
8
Assets/WebPlatform.meta
Normal file
8
Assets/WebPlatform.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8daec37f39bdca34e922be7644ef97c1
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Loading…
x
Reference in New Issue
Block a user