提交场景跳转,修复360视频播放,更新场景播放效果

This commit is contained in:
YXY
2026-03-04 16:43:41 +08:00
parent fa11027511
commit 11c7871553
88 changed files with 10632 additions and 4945 deletions

View File

@@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
using UnityEngine.XR.Interaction.Toolkit.Interactors;
public class HideHandOnGrab : MonoBehaviour
{
[SerializeField] XRBaseInteractor interactor;
[SerializeField] GameObject handModel;
void OnEnable()
{
interactor.selectEntered.AddListener(_ => handModel.SetActive(false));
interactor.selectExited.AddListener(_ => handModel.SetActive(true));
}
void OnDisable()
{
interactor.selectEntered.RemoveAllListeners();
interactor.selectExited.RemoveAllListeners();
}
}

View File

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

View File

@@ -19,6 +19,7 @@ namespace LevelUp.GrabInteractions
[Tooltip("指示物体是否应该被重置。子类可用于逻辑判断。")]
public bool shouldReturnHome { get; protected set; } = true;
public AudioSource downAudio;
protected void Awake()
{
@@ -60,6 +61,8 @@ namespace LevelUp.GrabInteractions
{
// 松手时延迟调用 ReturnHome
Invoke(nameof(ReturnHome), resetDelayTime);
if (downAudio != null)
downAudio.Play();
}
/// <summary>