Merge branch 'LouDi_Quan' of http://git.dragonwxl.cn:8080/loudizhiye/virtualframework into LouDi_Quan
This commit is contained in:
commit
fb1f551916
@ -155,6 +155,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1943472158707926008}
|
||||
- component: {fileID: 6717849271440217812}
|
||||
- component: {fileID: 2720570802681005941}
|
||||
m_Layer: 0
|
||||
m_Name: ZFrame
|
||||
m_TagString: Untagged
|
||||
@ -191,6 +192,24 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ViewerScale: 15
|
||||
--- !u!114 &2720570802681005941
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 765259898297824089}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0a0782d2b4482d547ad00c06c17202a4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveSpeed: 5
|
||||
rotateSpeed: 1
|
||||
xRotationLimit: 60
|
||||
enableCollision: 1
|
||||
isMov: 1
|
||||
isRot: 1
|
||||
--- !u!1 &1270204780161445289
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -389,7 +408,6 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 6541928711621635503}
|
||||
- component: {fileID: 960705820696497904}
|
||||
- component: {fileID: -4570605377163019503}
|
||||
m_Layer: 0
|
||||
m_Name: VRUIRoot
|
||||
m_TagString: Untagged
|
||||
@ -439,24 +457,6 @@ MonoBehaviour:
|
||||
PopUI: {fileID: 3224602739211204486}
|
||||
RightBottom: {fileID: 3091247338916860046}
|
||||
CanvasPanel: {fileID: 4067008720307835646}
|
||||
--- !u!114 &-4570605377163019503
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2823787777299435728}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0a0782d2b4482d547ad00c06c17202a4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveSpeed: 5
|
||||
rotateSpeed: 1
|
||||
xRotationLimit: 60
|
||||
enableCollision: 1
|
||||
isMov: 1
|
||||
isRot: 1
|
||||
--- !u!1 &2972153487471867409
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -38,7 +38,7 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.2846214, g: 0.37120992, b: 0.498806, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.5649007, g: 0.6356403, b: 0.72393775, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
||||
@ -52,7 +52,15 @@ public class MoveAction : IAction
|
||||
|
||||
public void OnStart()
|
||||
{
|
||||
GameObject obj = Utility.FindObj(path);
|
||||
GameObject obj = null;
|
||||
#if VR
|
||||
if (path == "FlyCamera")
|
||||
{
|
||||
obj = UIRoot.Instance.transform.Find("ZFrame").gameObject;
|
||||
}
|
||||
#else
|
||||
obj = Utility.FindObj(path);
|
||||
#endif
|
||||
if (obj == null)
|
||||
{
|
||||
Debug.LogError($"没有找到路径{path}");
|
||||
|
||||
@ -12,6 +12,12 @@ public class TimeScaleController : MonoBehaviour
|
||||
private static extern void CopyToClipboard(string text);
|
||||
#endif
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
#if VR
|
||||
gameObject.SetActive(false);
|
||||
#endif
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
Time.timeScale = animSpeed;
|
||||
@ -31,20 +37,38 @@ public class TimeScaleController : MonoBehaviour
|
||||
{
|
||||
animSpeed = 0;
|
||||
}
|
||||
#if UNITY_WEBGL
|
||||
if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl))
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Q))
|
||||
{
|
||||
Debug.Log("Ctrl + Q 被按下!");
|
||||
string str = string.Empty;
|
||||
str = $"Posision:{gameObject.transform.position}\nRotate:{gameObject.transform.eulerAngles}";
|
||||
|
||||
str = $"{gameObject.transform.position}|{gameObject.transform.eulerAngles}";
|
||||
#if UNITY_WEBGL
|
||||
Debug.Log("Ctrl + Q 被按下!");
|
||||
CopyToClipboard(str);
|
||||
|
||||
}
|
||||
}
|
||||
#elif UNITY_STANDALONE_WIN && !UNITY_EDITOR
|
||||
// 示例数据
|
||||
// 拷贝数据到剪贴板
|
||||
GUIUtility.systemCopyBuffer = str;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if UNITY_STANDALONE_WIN &&!UNITY_EDITOR
|
||||
if (Input.GetKeyDown(KeyCode.E))
|
||||
{
|
||||
string tmp = GUIUtility.systemCopyBuffer;
|
||||
Debug.LogError("当前剪贴板:" + tmp);
|
||||
tmp = tmp.Replace("(", "");
|
||||
Debug.LogError(tmp);
|
||||
tmp = tmp.Replace(")", "");
|
||||
Debug.LogError(tmp);
|
||||
var datas = tmp.Split('|');
|
||||
|
||||
Debug.LogError(datas[0]);
|
||||
Debug.LogError(datas[1]);
|
||||
gameObject.transform.position = Utility.GetVector3FromStrArray(datas[0]);
|
||||
gameObject.transform.eulerAngles = Utility.GetVector3FromStrArray(datas[1]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user