提交VR的UIRoot

This commit is contained in:
shenjianxing 2025-01-03 17:00:55 +08:00
parent 5bae7022c2
commit fd9d770b71
4 changed files with 35 additions and 21 deletions

View File

@ -155,6 +155,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 1943472158707926008} - component: {fileID: 1943472158707926008}
- component: {fileID: 6717849271440217812} - component: {fileID: 6717849271440217812}
- component: {fileID: 2720570802681005941}
m_Layer: 0 m_Layer: 0
m_Name: ZFrame m_Name: ZFrame
m_TagString: Untagged m_TagString: Untagged
@ -191,6 +192,24 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
ViewerScale: 15 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 --- !u!1 &1270204780161445289
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -389,7 +408,6 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 6541928711621635503} - component: {fileID: 6541928711621635503}
- component: {fileID: 960705820696497904} - component: {fileID: 960705820696497904}
- component: {fileID: -4570605377163019503}
m_Layer: 0 m_Layer: 0
m_Name: VRUIRoot m_Name: VRUIRoot
m_TagString: Untagged m_TagString: Untagged
@ -439,24 +457,6 @@ MonoBehaviour:
PopUI: {fileID: 3224602739211204486} PopUI: {fileID: 3224602739211204486}
RightBottom: {fileID: 3091247338916860046} RightBottom: {fileID: 3091247338916860046}
CanvasPanel: {fileID: 4067008720307835646} 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 --- !u!1 &2972153487471867409
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {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 m_UseRadianceAmbientProbe: 0
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:

View File

@ -52,7 +52,15 @@ public class MoveAction : IAction
public void OnStart() 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) if (obj == null)
{ {
Debug.LogError($"没有找到路径{path}"); Debug.LogError($"没有找到路径{path}");

View File

@ -12,6 +12,12 @@ public class TimeScaleController : MonoBehaviour
private static extern void CopyToClipboard(string text); private static extern void CopyToClipboard(string text);
#endif #endif
private void Awake()
{
#if VR
gameObject.SetActive(false);
#endif
}
private void Update() private void Update()
{ {
Time.timeScale = animSpeed; Time.timeScale = animSpeed;