fix: widen note lanes and clear warnings
This commit is contained in:
@@ -35,7 +35,7 @@ public static class VRBeatSaberSceneBuilder
|
|||||||
var scene = EditorSceneManager.OpenScene(gamePath, OpenSceneMode.Single);
|
var scene = EditorSceneManager.OpenScene(gamePath, OpenSceneMode.Single);
|
||||||
|
|
||||||
// PlayableManager 제거 (PlayableDirector는 유지)
|
// PlayableManager 제거 (PlayableDirector는 유지)
|
||||||
var pm = Object.FindObjectOfType<PlayableManager>();
|
var pm = Object.FindFirstObjectByType<PlayableManager>();
|
||||||
if (pm != null)
|
if (pm != null)
|
||||||
Object.DestroyImmediate(pm);
|
Object.DestroyImmediate(pm);
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class DesktopUIMode : MonoBehaviour
|
|||||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
|
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
|
||||||
private static void AutoCreate()
|
private static void AutoCreate()
|
||||||
{
|
{
|
||||||
if (FindObjectOfType<DesktopUIMode>() != null) return;
|
if (FindFirstObjectByType<DesktopUIMode>() != null) return;
|
||||||
new GameObject("[DesktopUIMode]").AddComponent<DesktopUIMode>();
|
new GameObject("[DesktopUIMode]").AddComponent<DesktopUIMode>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ public class DesktopUIMode : MonoBehaviour
|
|||||||
if (cam == null)
|
if (cam == null)
|
||||||
foreach (var c in FindObjectsByType<Camera>(FindObjectsSortMode.None))
|
foreach (var c in FindObjectsByType<Camera>(FindObjectsSortMode.None))
|
||||||
if (c.enabled && c.gameObject.scene.name != "DontDestroyOnLoad") { cam = c; break; }
|
if (c.enabled && c.gameObject.scene.name != "DontDestroyOnLoad") { cam = c; break; }
|
||||||
cam ??= FindObjectOfType<Camera>();
|
cam ??= FindFirstObjectByType<Camera>();
|
||||||
if (cam == null) return;
|
if (cam == null) return;
|
||||||
|
|
||||||
foreach (var canvas in FindObjectsByType<Canvas>(FindObjectsSortMode.None))
|
foreach (var canvas in FindObjectsByType<Canvas>(FindObjectsSortMode.None))
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ public class NasPublisher : MonoBehaviour
|
|||||||
|
|
||||||
[Serializable] private class NasConfig
|
[Serializable] private class NasConfig
|
||||||
{
|
{
|
||||||
public string host;
|
public string host = "";
|
||||||
public string account;
|
public string account = "";
|
||||||
public string rootPath;
|
public string rootPath = "";
|
||||||
public string staticUrl;
|
public string staticUrl = "";
|
||||||
public string password;
|
public string password = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerator Publish(
|
public IEnumerator Publish(
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ public class SongController : MonoBehaviour
|
|||||||
[SerializeField] private GameEvent onLevelComplete;
|
[SerializeField] private GameEvent onLevelComplete;
|
||||||
[SerializeField] private TMP_Text countdownText;
|
[SerializeField] private TMP_Text countdownText;
|
||||||
|
|
||||||
|
private const float LaneSpacing = 0.42f;
|
||||||
|
private const float LayerSpacing = 0.38f;
|
||||||
|
private const float HorizontalCenter = 1.5f;
|
||||||
|
private const float VerticalCenter = 1f;
|
||||||
|
|
||||||
private AudioManager _audio;
|
private AudioManager _audio;
|
||||||
|
|
||||||
private static string CacheRoot =>
|
private static string CacheRoot =>
|
||||||
@@ -20,7 +25,7 @@ public class SongController : MonoBehaviour
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
_audio = FindObjectOfType<AudioManager>();
|
_audio = FindFirstObjectByType<AudioManager>();
|
||||||
StartCoroutine(LoadAndPlay());
|
StartCoroutine(LoadAndPlay());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +73,7 @@ public class SongController : MonoBehaviour
|
|||||||
Debug.LogError("[SongController] Map parse failed");
|
Debug.LogError("[SongController] Map parse failed");
|
||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
map.target.Sort((a, b) => a.time.CompareTo(b.time));
|
map.target.Sort(CompareNotes);
|
||||||
|
|
||||||
yield return StartCoroutine(Countdown());
|
yield return StartCoroutine(Countdown());
|
||||||
|
|
||||||
@@ -109,8 +114,8 @@ public class SongController : MonoBehaviour
|
|||||||
|
|
||||||
private void SpawnNote(NoteData note)
|
private void SpawnNote(NoteData note)
|
||||||
{
|
{
|
||||||
float x = -0.375f + note.position * 0.25f;
|
float x = MapLaneX(note.position);
|
||||||
float y = -0.333f + note.lineLayer * 0.333f;
|
float y = MapLayerY(note.lineLayer);
|
||||||
|
|
||||||
// 스폰 시점의 실제 남은 시간으로 역산 → 동시 노트가 프레임 차이 나도 같은 타이밍에 도착
|
// 스폰 시점의 실제 남은 시간으로 역산 → 동시 노트가 프레임 차이 나도 같은 타이밍에 도착
|
||||||
float remaining = note.time - _audio.CurrentTime;
|
float remaining = note.time - _audio.CurrentTime;
|
||||||
@@ -129,6 +134,31 @@ public class SongController : MonoBehaviour
|
|||||||
VR_BeatManager.instance.Spawn(cubePrefab, info);
|
VR_BeatManager.instance.Spawn(cubePrefab, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int CompareNotes(NoteData a, NoteData b)
|
||||||
|
{
|
||||||
|
int timeCompare = a.time.CompareTo(b.time);
|
||||||
|
if (timeCompare != 0)
|
||||||
|
return timeCompare;
|
||||||
|
|
||||||
|
int positionCompare = a.position.CompareTo(b.position);
|
||||||
|
if (positionCompare != 0)
|
||||||
|
return positionCompare;
|
||||||
|
|
||||||
|
return a.lineLayer.CompareTo(b.lineLayer);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static float MapLaneX(int position)
|
||||||
|
{
|
||||||
|
int lane = Mathf.Clamp(position, 0, 3);
|
||||||
|
return (lane - HorizontalCenter) * LaneSpacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static float MapLayerY(int lineLayer)
|
||||||
|
{
|
||||||
|
int layer = Mathf.Clamp(lineLayer, 0, 2);
|
||||||
|
return (layer - VerticalCenter) * LayerSpacing;
|
||||||
|
}
|
||||||
|
|
||||||
// Beat Saber cutDirection → VRBeats Direction
|
// Beat Saber cutDirection → VRBeats Direction
|
||||||
// BS: 0=Up 1=Down 2=Left 3=Right 4=UpperLeft 5=UpperRight 6=LowerLeft 7=LowerRight 8=Any
|
// BS: 0=Up 1=Down 2=Left 3=Right 4=UpperLeft 5=UpperRight 6=LowerLeft 7=LowerRight 8=Any
|
||||||
private static readonly Direction[] CutDirMap =
|
private static readonly Direction[] CutDirMap =
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ public class SongSelectManager : MonoBehaviour
|
|||||||
tTmp.color = Color.white;
|
tTmp.color = Color.white;
|
||||||
tTmp.alignment = TextAlignmentOptions.MidlineLeft;
|
tTmp.alignment = TextAlignmentOptions.MidlineLeft;
|
||||||
tTmp.overflowMode = TextOverflowModes.Overflow;
|
tTmp.overflowMode = TextOverflowModes.Overflow;
|
||||||
tTmp.enableWordWrapping = false;
|
tTmp.textWrappingMode = TextWrappingModes.NoWrap;
|
||||||
titleGO.AddComponent<MarqueeText>();
|
titleGO.AddComponent<MarqueeText>();
|
||||||
|
|
||||||
// Artist
|
// Artist
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace DamageSystem
|
|||||||
OnDamage.AddListener( ApplyImpactForce );
|
OnDamage.AddListener( ApplyImpactForce );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ApplyImpactForce(DamageInfo info, DamageablePart damageable)
|
protected override void ApplyImpactForce(DamageInfo info, DamageablePart damageable)
|
||||||
{
|
{
|
||||||
//if this AI if no dead it is being controlled by the Animator so dont apply any impact force
|
//if this AI if no dead it is being controlled by the Animator so dont apply any impact force
|
||||||
if (!IsDead)
|
if (!IsDead)
|
||||||
@@ -28,4 +28,3 @@ namespace DamageSystem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace VRSDK.Climbing
|
|||||||
{
|
{
|
||||||
base.Start();
|
base.Start();
|
||||||
|
|
||||||
target = FindObjectOfType<ClimbingTarget>();
|
target = FindFirstObjectByType<ClimbingTarget>();
|
||||||
onGrabStateChange.AddListener( OnGrabStateChangeClimb );
|
onGrabStateChange.AddListener( OnGrabStateChangeClimb );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,4 +89,3 @@ namespace VRSDK.Climbing
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
using UnityEditor.Build;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -193,8 +194,8 @@ namespace VRSDK.EditorCode
|
|||||||
public static void ForceRebuild()
|
public static void ForceRebuild()
|
||||||
{
|
{
|
||||||
string[] rebuildSymbols = { "RebuildToggle1", "RebuildToggle2" };
|
string[] rebuildSymbols = { "RebuildToggle1", "RebuildToggle2" };
|
||||||
string definesString = PlayerSettings.GetScriptingDefineSymbolsForGroup(
|
NamedBuildTarget buildTarget = NamedBuildTarget.FromBuildTargetGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
|
||||||
EditorUserBuildSettings.selectedBuildTargetGroup );
|
string definesString = PlayerSettings.GetScriptingDefineSymbols(buildTarget);
|
||||||
var definesStringTemp = definesString;
|
var definesStringTemp = definesString;
|
||||||
if (definesStringTemp.Contains( rebuildSymbols[0] ))
|
if (definesStringTemp.Contains( rebuildSymbols[0] ))
|
||||||
{
|
{
|
||||||
@@ -208,14 +209,9 @@ namespace VRSDK.EditorCode
|
|||||||
{
|
{
|
||||||
definesStringTemp += ";" + rebuildSymbols[0];
|
definesStringTemp += ";" + rebuildSymbols[0];
|
||||||
}
|
}
|
||||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(
|
PlayerSettings.SetScriptingDefineSymbols(buildTarget, definesStringTemp);
|
||||||
EditorUserBuildSettings.selectedBuildTargetGroup,
|
PlayerSettings.SetScriptingDefineSymbols(buildTarget, definesString);
|
||||||
definesStringTemp );
|
|
||||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(
|
|
||||||
EditorUserBuildSettings.selectedBuildTargetGroup,
|
|
||||||
definesString );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-5
@@ -15,10 +15,6 @@ namespace VRSDK.EditorCode
|
|||||||
|
|
||||||
private HandVisualizerTool targetScript = null;
|
private HandVisualizerTool targetScript = null;
|
||||||
|
|
||||||
private static string returnScenePath = null;
|
|
||||||
private static Scene returnScene;
|
|
||||||
private static bool inPreviewMode = false;
|
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -95,4 +91,3 @@ namespace VRSDK.EditorCode
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-5
@@ -26,15 +26,15 @@ namespace VRSDK.EditorCode
|
|||||||
{
|
{
|
||||||
|
|
||||||
Scene originalScene = EditorSceneManager.GetActiveScene();
|
Scene originalScene = EditorSceneManager.GetActiveScene();
|
||||||
originalScenePath = EditorApplication.currentScene;
|
originalScenePath = originalScene.path;
|
||||||
|
|
||||||
Scene previewScene = EditorSceneManager.NewScene( NewSceneSetup.DefaultGameObjects, NewSceneMode.Additive );
|
Scene previewScene = EditorSceneManager.NewScene( NewSceneSetup.DefaultGameObjects, NewSceneMode.Additive );
|
||||||
EditorSceneManager.MoveGameObjectToScene( clone, previewScene );
|
EditorSceneManager.MoveGameObjectToScene( clone, previewScene );
|
||||||
|
|
||||||
EditorSceneManager.UnloadSceneAsync( originalScene );
|
EditorSceneManager.UnloadSceneAsync( originalScene );
|
||||||
previewModeEnable = true;
|
previewModeEnable = true;
|
||||||
inspectedGrabbable = GameObject.FindObjectOfType<VR_Grabbable>();
|
inspectedGrabbable = GameObject.FindFirstObjectByType<VR_Grabbable>();
|
||||||
activeController = GameObject.FindObjectOfType<VR_Controller>();
|
activeController = GameObject.FindFirstObjectByType<VR_Controller>();
|
||||||
|
|
||||||
OverrideGrabAnimation();
|
OverrideGrabAnimation();
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ namespace VRSDK.EditorCode
|
|||||||
{
|
{
|
||||||
handPreviewSave = new HandPreviewSave( inspectedGrabbable );
|
handPreviewSave = new HandPreviewSave( inspectedGrabbable );
|
||||||
ExitPreviewMode();
|
ExitPreviewMode();
|
||||||
GameObjectMarker marker = GameObject.FindObjectOfType<GameObjectMarker>();
|
GameObjectMarker marker = GameObject.FindFirstObjectByType<GameObjectMarker>();
|
||||||
handPreviewSave.LoadInto(marker.GetComponent<VR_Grabbable>());
|
handPreviewSave.LoadInto(marker.GetComponent<VR_Grabbable>());
|
||||||
GameObject.DestroyImmediate(marker);
|
GameObject.DestroyImmediate(marker);
|
||||||
}
|
}
|
||||||
@@ -131,4 +131,3 @@ namespace VRSDK.EditorCode
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace VRSDK
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
Player player = FindObjectOfType<Player>();
|
Player player = FindFirstObjectByType<Player>();
|
||||||
gameOverScreenFader = player.GameOverScreenFader;
|
gameOverScreenFader = player.GameOverScreenFader;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,4 +123,3 @@ namespace VRSDK
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace VRSDK
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
characterController = FindObjectOfType<VR_CharacterController>();
|
characterController = FindFirstObjectByType<VR_CharacterController>();
|
||||||
|
|
||||||
if (characterController != null)
|
if (characterController != null)
|
||||||
{
|
{
|
||||||
@@ -25,7 +25,7 @@ namespace VRSDK
|
|||||||
|
|
||||||
if (anchorPoint == null)
|
if (anchorPoint == null)
|
||||||
{
|
{
|
||||||
Player player = FindObjectOfType<Player>();
|
Player player = FindFirstObjectByType<Player>();
|
||||||
anchorPoint = player.PocketsAnchorPoint;
|
anchorPoint = player.PocketsAnchorPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ namespace VRSDK
|
|||||||
|
|
||||||
private void SetTeleportCallback()
|
private void SetTeleportCallback()
|
||||||
{
|
{
|
||||||
VR_TeleportHandler teleportHandler = FindObjectOfType<VR_TeleportHandler>();
|
VR_TeleportHandler teleportHandler = FindFirstObjectByType<VR_TeleportHandler>();
|
||||||
|
|
||||||
if (teleportHandler != null)
|
if (teleportHandler != null)
|
||||||
{
|
{
|
||||||
@@ -102,4 +102,3 @@ namespace VRSDK
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace Platinio
|
|||||||
{
|
{
|
||||||
|
|
||||||
//get all the singletones
|
//get all the singletones
|
||||||
T[] singletons = GameObject.FindObjectsOfType( typeof(T) ) as T[];
|
T[] singletons = FindObjectsByType<T>(FindObjectsSortMode.None);
|
||||||
|
|
||||||
if(singletons != null)
|
if(singletons != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,10 +18,9 @@ namespace VRSDK
|
|||||||
{
|
{
|
||||||
for (int n = 0; n < wallCubePartArray.Length; n++)
|
for (int n = 0; n < wallCubePartArray.Length; n++)
|
||||||
{
|
{
|
||||||
wallCubePartArray[n].Reset( resetTime );
|
wallCubePartArray[n].ResetPart( resetTime );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace VRSDK
|
|||||||
rb = GetComponent<Rigidbody>();
|
rb = GetComponent<Rigidbody>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Reset(float t)
|
public void ResetPart(float t)
|
||||||
{
|
{
|
||||||
rb.isKinematic = true;
|
rb.isKinematic = true;
|
||||||
|
|
||||||
@@ -64,4 +64,3 @@ namespace VRSDK
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace VRSDK
|
|||||||
public HandPhysics(HistoryBuffer buffer)
|
public HandPhysics(HistoryBuffer buffer)
|
||||||
{
|
{
|
||||||
historyBuffer = buffer;
|
historyBuffer = buffer;
|
||||||
characterController = MonoBehaviour.FindObjectOfType<VR_CharacterController>();
|
characterController = MonoBehaviour.FindFirstObjectByType<VR_CharacterController>();
|
||||||
|
|
||||||
trackingSpace = VR_Manager.instance.Player.TrackingSpace;
|
trackingSpace = VR_Manager.instance.Player.TrackingSpace;
|
||||||
|
|
||||||
@@ -148,4 +148,3 @@ namespace VRSDK
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,17 +95,17 @@ namespace VRSDK
|
|||||||
return GetAxis1D(button) > 0.25f;
|
return GetAxis1D(button) > 0.25f;
|
||||||
case VR_InputButton.Primary:
|
case VR_InputButton.Primary:
|
||||||
#if UNITY_XR
|
#if UNITY_XR
|
||||||
thisInputDevice.IsPressed(InputHelpers.Button.PrimaryButton, out value);
|
thisInputDevice.TryGetFeatureValue(CommonUsages.primaryButton, out value);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case VR_InputButton.Secondary:
|
case VR_InputButton.Secondary:
|
||||||
#if UNITY_XR
|
#if UNITY_XR
|
||||||
thisInputDevice.IsPressed(InputHelpers.Button.SecondaryButton, out value);
|
thisInputDevice.TryGetFeatureValue(CommonUsages.secondaryButton, out value);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case VR_InputButton.TumbstickPress:
|
case VR_InputButton.TumbstickPress:
|
||||||
#if UNITY_XR
|
#if UNITY_XR
|
||||||
thisInputDevice.IsPressed(InputHelpers.Button.Primary2DAxisClick, out value);
|
thisInputDevice.TryGetFeatureValue(CommonUsages.primary2DAxisClick, out value);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -158,4 +158,3 @@ namespace VRSDK
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
using UnityEngine.Serialization;
|
||||||
|
|
||||||
namespace VRSDK.Locomotion
|
namespace VRSDK.Locomotion
|
||||||
{
|
{
|
||||||
//this scripts handles aim marker position and rotation
|
//this scripts handles aim marker position and rotation
|
||||||
public class VR_AimMarker : MonoBehaviour
|
public class VR_AimMarker : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField] private GameObject marker = null;
|
[SerializeField] private GameObject marker = null;
|
||||||
[SerializeField] private BoxCollider collider = null;
|
[FormerlySerializedAs("collider")]
|
||||||
|
[SerializeField] private BoxCollider markerCollider = null;
|
||||||
[SerializeField] private float slopeLimit;
|
[SerializeField] private float slopeLimit;
|
||||||
|
|
||||||
public GameObject Marker { get { return marker; } }
|
public GameObject Marker { get { return marker; } }
|
||||||
public BoxCollider Collider { get { return collider; } }
|
public BoxCollider Collider { get { return markerCollider; } }
|
||||||
public float SlopeLimit { get { return slopeLimit; } }
|
public float SlopeLimit { get { return slopeLimit; } }
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
@@ -52,4 +55,3 @@ namespace VRSDK.Locomotion
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,11 +88,13 @@ namespace VRSDK
|
|||||||
[NonSerialized]
|
[NonSerialized]
|
||||||
public float CameraHeight;
|
public float CameraHeight;
|
||||||
|
|
||||||
|
#if SDK_OCULUS
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This event is raised after the character controller is moved. This is used by the OVRAvatarLocomotion script to keep the avatar transform synchronized
|
/// This event is raised after the character controller is moved. This is used by the OVRAvatarLocomotion script to keep the avatar transform synchronized
|
||||||
/// with the OVRPlayerController.
|
/// with the OVRPlayerController.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event Action<Transform> TransformUpdated;
|
public event Action<Transform> TransformUpdated;
|
||||||
|
#endif
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This bool is set to true whenever the player controller has been teleported. It is reset after every frame. Some systems, such as
|
/// This bool is set to true whenever the player controller has been teleported. It is reset after every frame. Some systems, such as
|
||||||
@@ -177,7 +179,9 @@ namespace VRSDK
|
|||||||
private float SimulationRate = 60f;
|
private float SimulationRate = 60f;
|
||||||
private float buttonRotation = 0f;
|
private float buttonRotation = 0f;
|
||||||
private bool ReadyToSnapTurn; // Set to true when a snap turn has occurred, code requires one frame of centered thumbstick to enable another snap turn.
|
private bool ReadyToSnapTurn; // Set to true when a snap turn has occurred, code requires one frame of centered thumbstick to enable another snap turn.
|
||||||
|
#if SDK_OCULUS
|
||||||
private bool playerControllerEnabled = false;
|
private bool playerControllerEnabled = false;
|
||||||
|
#endif
|
||||||
private float moveInfluence = 0.0f;
|
private float moveInfluence = 0.0f;
|
||||||
public Vector3 lastPosition = Vector3.zero;
|
public Vector3 lastPosition = Vector3.zero;
|
||||||
private Vector3 velocity = Vector3.zero;
|
private Vector3 velocity = Vector3.zero;
|
||||||
@@ -409,8 +413,6 @@ namespace VRSDK
|
|||||||
moveRight = Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow);
|
moveRight = Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow);
|
||||||
moveBack = Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.DownArrow);
|
moveBack = Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.DownArrow);
|
||||||
#endif
|
#endif
|
||||||
bool dpad_move = false;
|
|
||||||
|
|
||||||
MoveScale = 1.0f;
|
MoveScale = 1.0f;
|
||||||
|
|
||||||
if ((moveForward && moveLeft) || (moveForward && moveRight) || (moveBack && moveLeft) || (moveBack && moveRight))
|
if ((moveForward && moveLeft) || (moveForward && moveRight) || (moveBack && moveLeft) || (moveBack && moveRight))
|
||||||
@@ -427,6 +429,7 @@ namespace VRSDK
|
|||||||
|
|
||||||
// Run!
|
// Run!
|
||||||
#if !UNITY_XR
|
#if !UNITY_XR
|
||||||
|
bool dpad_move = false;
|
||||||
if (dpad_move || Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
|
if (dpad_move || Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
|
||||||
moveInfluence *= 2.0f;
|
moveInfluence *= 2.0f;
|
||||||
#endif
|
#endif
|
||||||
@@ -713,4 +716,3 @@ namespace VRSDK
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ namespace VRSDK
|
|||||||
|
|
||||||
private void FindOrCreate_VR_Manager()
|
private void FindOrCreate_VR_Manager()
|
||||||
{
|
{
|
||||||
if (FindObjectOfType<VR_Manager>() == null)
|
if (FindFirstObjectByType<VR_Manager>() == null)
|
||||||
{
|
{
|
||||||
Debug.LogError("you need a VR_Manager active in the scene in order to use VR Shooter Kit");
|
Debug.LogError("you need a VR_Manager active in the scene in order to use VR Shooter Kit");
|
||||||
}
|
}
|
||||||
@@ -630,4 +630,3 @@ namespace VRSDK
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ namespace VRSDK
|
|||||||
{
|
{
|
||||||
private float minAcelerationThreshold = 0.0f;
|
private float minAcelerationThreshold = 0.0f;
|
||||||
private float maxAcelerationThreshold = 0.0f;
|
private float maxAcelerationThreshold = 0.0f;
|
||||||
private int sampleCount = 0;
|
|
||||||
|
|
||||||
private VR_Controller controller = null;
|
private VR_Controller controller = null;
|
||||||
private GesturePhase rotationGesturePhase = GesturePhase.Tracking;
|
private GesturePhase rotationGesturePhase = GesturePhase.Tracking;
|
||||||
private Quaternion rotationGesturefromQuaternion = Quaternion.identity;
|
private Quaternion rotationGesturefromQuaternion = Quaternion.identity;
|
||||||
@@ -128,4 +126,3 @@ namespace VRSDK
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ namespace VRSDK
|
|||||||
protected bool preventDefault = false;
|
protected bool preventDefault = false;
|
||||||
protected float velocityChangeThreshold = 10f;
|
protected float velocityChangeThreshold = 10f;
|
||||||
protected float angularVelocityChangeThreshold = 20f;
|
protected float angularVelocityChangeThreshold = 20f;
|
||||||
private bool previousUseGravityState = false;
|
|
||||||
private bool previousGravityState = false;
|
|
||||||
private VR_Controller lastInteractController = null;
|
private VR_Controller lastInteractController = null;
|
||||||
private bool objectWasThrow = false;
|
private bool objectWasThrow = false;
|
||||||
protected bool canUseDropZone = true;
|
protected bool canUseDropZone = true;
|
||||||
@@ -766,4 +764,4 @@ namespace VRSDK
|
|||||||
onGrabStateChange.RemoveAllListeners();
|
onGrabStateChange.RemoveAllListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ namespace VRSDK
|
|||||||
|
|
||||||
#region PUBLIC
|
#region PUBLIC
|
||||||
public VR_SDK CurrentSDK { get { return currentSDK; } }
|
public VR_SDK CurrentSDK { get { return currentSDK; } }
|
||||||
|
public ControllerGestureConfig GestureConfig { get { return gestureConfig; } }
|
||||||
public List<VR_Interactable> InteractList { get { return interactList; } }
|
public List<VR_Interactable> InteractList { get { return interactList; } }
|
||||||
public List<VR_Highlight> HighlightList { get { return highlightList; } }
|
public List<VR_Highlight> HighlightList { get { return highlightList; } }
|
||||||
public List<VR_Grabbable> GrabbableList { get { return grabbableList; } }
|
public List<VR_Grabbable> GrabbableList { get { return grabbableList; } }
|
||||||
@@ -43,7 +44,7 @@ namespace VRSDK
|
|||||||
{
|
{
|
||||||
if (player == null)
|
if (player == null)
|
||||||
{
|
{
|
||||||
player = FindObjectOfType<VR_Player>();
|
player = FindFirstObjectByType<VR_Player>();
|
||||||
player.Construct();
|
player.Construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,4 +141,3 @@ namespace VRSDK
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace VRSDK
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return FindObjectOfType<CharacterController>();
|
return FindFirstObjectByType<CharacterController>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,4 +109,3 @@ namespace VRSDK
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ namespace VRSDK
|
|||||||
|
|
||||||
public float SpeedModifier { get { return speedModifier; } }
|
public float SpeedModifier { get { return speedModifier; } }
|
||||||
public float AngularSpeedModifier { get { return aungularSpeedModifier; } }
|
public float AngularSpeedModifier { get { return aungularSpeedModifier; } }
|
||||||
bool throwed = false;
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -39,4 +38,3 @@ namespace VRSDK
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ namespace VRBeats
|
|||||||
{
|
{
|
||||||
[SerializeField] private float minCutSpeed = 0.5f;
|
[SerializeField] private float minCutSpeed = 0.5f;
|
||||||
[SerializeField] private float maxCutAngle = 40f;
|
[SerializeField] private float maxCutAngle = 40f;
|
||||||
[SerializeField] private OnSliceAction sliceAction = null;
|
|
||||||
[SerializeField] private GameEvent onCorrectSlice = null;
|
[SerializeField] private GameEvent onCorrectSlice = null;
|
||||||
[SerializeField] private GameEvent onIncorrectSlice = null;
|
[SerializeField] private GameEvent onIncorrectSlice = null;
|
||||||
[SerializeField] private GameEvent onPlayerMiss = null;
|
[SerializeField] private GameEvent onPlayerMiss = null;
|
||||||
@@ -112,4 +111,3 @@ namespace VRBeats
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ namespace VRBeats
|
|||||||
[SerializeField] private BoxCollider playZone = null;
|
[SerializeField] private BoxCollider playZone = null;
|
||||||
[SerializeField] private Transform player = null;
|
[SerializeField] private Transform player = null;
|
||||||
[SerializeField] private VR_BeatSettings settings = null;
|
[SerializeField] private VR_BeatSettings settings = null;
|
||||||
[SerializeField] private GameEvent onGameOver = null;
|
|
||||||
|
|
||||||
private AudioManager audioManager = null;
|
private AudioManager audioManager = null;
|
||||||
private EnviromentController enviromentController = null;
|
private EnviromentController enviromentController = null;
|
||||||
private PlayableDirector playableDirector = null;
|
private PlayableDirector playableDirector = null;
|
||||||
@@ -24,20 +22,17 @@ namespace VRBeats
|
|||||||
|
|
||||||
public Transform Player { get { return player; } }
|
public Transform Player { get { return player; } }
|
||||||
|
|
||||||
private int playerConsecutiveMiss = 0;
|
|
||||||
|
|
||||||
protected override void Awake()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
base.Awake();
|
base.Awake();
|
||||||
audioManager = FindObjectOfType<AudioManager>();
|
audioManager = FindFirstObjectByType<AudioManager>();
|
||||||
enviromentController = FindObjectOfType<EnviromentController>();
|
enviromentController = FindFirstObjectByType<EnviromentController>();
|
||||||
playableDirector = FindObjectOfType<PlayableDirector>();
|
playableDirector = FindFirstObjectByType<PlayableDirector>();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Start()
|
protected override void Start()
|
||||||
{
|
{
|
||||||
base.Start();
|
base.Start();
|
||||||
playerConsecutiveMiss = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ namespace VRBeats
|
|||||||
|
|
||||||
private void Rotate()
|
private void Rotate()
|
||||||
{
|
{
|
||||||
float rotation = Random.Range(-maxRotation , maxRotation);
|
float direction = Random.value < 0.5f ? -1.0f : 1.0f;
|
||||||
|
float rotation = Random.Range(minRotation, maxRotation) * direction;
|
||||||
transform.RotateTween( Vector3.forward , rotation , animTime).SetEase(ease).SetOnComplete( Rotate );
|
transform.RotateTween( Vector3.forward , rotation , animTime).SetEase(ease).SetOnComplete( Rotate );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace VRBeats
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
VolumeSingleton[] instancesArray = FindObjectsOfType<VolumeSingleton>();
|
VolumeSingleton[] instancesArray = FindObjectsByType<VolumeSingleton>(FindObjectsSortMode.None);
|
||||||
|
|
||||||
foreach (var volumeSingleton in instancesArray)
|
foreach (var volumeSingleton in instancesArray)
|
||||||
{
|
{
|
||||||
@@ -30,4 +30,3 @@ namespace VRBeats
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace Platinio.UI
|
|||||||
Canvas canvas = null;
|
Canvas canvas = null;
|
||||||
|
|
||||||
//just return the first encounter canvas
|
//just return the first encounter canvas
|
||||||
canvas = GameObject.FindObjectOfType<Canvas>();
|
canvas = GameObject.FindFirstObjectByType<Canvas>();
|
||||||
|
|
||||||
if (canvas != null)
|
if (canvas != null)
|
||||||
{
|
{
|
||||||
@@ -144,4 +144,3 @@ namespace Platinio.UI
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace VRBeats
|
|||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
enviromentController = FindObjectOfType<EnviromentController>();
|
enviromentController = FindFirstObjectByType<EnviromentController>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace VRBeats
|
|||||||
initialValue += "0";
|
initialValue += "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
scoreManager = FindObjectOfType<ScoreManager>();
|
scoreManager = FindFirstObjectByType<ScoreManager>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,4 +58,3 @@ namespace VRBeats
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+20
-2
@@ -14,8 +14,9 @@ Meta Quest용 VR Beat Saber 클론. Beat Sage API로 노래를 자동 채보하
|
|||||||
- Unity 버전: `6000.3.12f1`
|
- Unity 버전: `6000.3.12f1`
|
||||||
- 현재 브랜치: `main`
|
- 현재 브랜치: `main`
|
||||||
- 원격 저장소: `origin` = `https://whdwo798.synology.me/whdwo798/BeatSaber.git`
|
- 원격 저장소: `origin` = `https://whdwo798.synology.me/whdwo798/BeatSaber.git`
|
||||||
- 최근 푸시 커밋: `5e5e918 docs: update project handoff status`
|
- 최근 푸시 커밋: `182d2c9 fix: stabilize VR UI and song playback`
|
||||||
- `dotnet build VRBeatSaber.slnx` 결과: 오류 0개, 경고 0개
|
- `dotnet build VRBeatSaber.slnx --no-incremental` 결과: 오류 0개, 경고 0개
|
||||||
|
- 현재 워킹트리에는 큐브 간격 보정과 경고 제거 작업이 커밋 전 변경으로 남아 있다.
|
||||||
|
|
||||||
### 실제 씬 구성
|
### 실제 씬 구성
|
||||||
|
|
||||||
@@ -53,6 +54,14 @@ SongCreator.unity
|
|||||||
|
|
||||||
### 최근 반영된 변경
|
### 최근 반영된 변경
|
||||||
|
|
||||||
|
- `Assets/Script/SongController.cs`
|
||||||
|
- Beat Saber 4라인 좌표 매핑을 넓혀 인접 큐브가 가로로 겹치는 문제를 줄였다.
|
||||||
|
- 기존 라인 x 좌표는 대략 `-0.375, -0.125, 0.125, 0.375`였고, 현재는 `-0.63, -0.21, 0.21, 0.63`이다.
|
||||||
|
- 맵 노트 정렬을 `time -> position -> lineLayer` 순서로 바꿔 같은 시간대 노트 처리 순서를 안정화했다.
|
||||||
|
- 전체 C# 경고 제거
|
||||||
|
- `FindObjectOfType`, `FindObjectsOfType`, `InputHelpers`, `TMP_Text.enableWordWrapping`, `EditorApplication.currentScene`, 구버전 `PlayerSettings` API를 최신 API로 교체했다.
|
||||||
|
- 미사용 필드/변수, 상속 멤버 숨김, Unity 메시지 시그니처 경고를 정리했다.
|
||||||
|
- 최종 확인 빌드: `dotnet build VRBeatSaber.slnx --no-incremental` = 경고 0개, 오류 0개.
|
||||||
- `Assets/Script/VRPointerController.cs`, `VRPointerSetup.cs` 추가
|
- `Assets/Script/VRPointerController.cs`, `VRPointerSetup.cs` 추가
|
||||||
- VR 컨트롤러 레이로 Unity UI 버튼을 직접 hover/click 처리한다.
|
- VR 컨트롤러 레이로 Unity UI 버튼을 직접 hover/click 처리한다.
|
||||||
- `Game` 씬에서는 게임오버 전까지 비활성화하고, 메뉴 계열 씬에서는 활성화한다.
|
- `Game` 씬에서는 게임오버 전까지 비활성화하고, 메뉴 계열 씬에서는 활성화한다.
|
||||||
@@ -90,6 +99,8 @@ SongCreator.unity
|
|||||||
3. `SongCreatorManager`는 난이도 토글 필드를 갖고 있지만 현재 로직은 4개 난이도(`normal`, `hard`, `expert`, `expertplus`)를 항상 전부 생성한다.
|
3. `SongCreatorManager`는 난이도 토글 필드를 갖고 있지만 현재 로직은 4개 난이도(`normal`, `hard`, `expert`, `expertplus`)를 항상 전부 생성한다.
|
||||||
4. `manualEditorButton`은 씬에서 미연결이고 코드에서도 사용하지 않는다.
|
4. `manualEditorButton`은 씬에서 미연결이고 코드에서도 사용하지 않는다.
|
||||||
5. `Assets/img/360.mp4`는 약 192MB다. 현재 일반 Git으로 푸시되어 있으므로, 원격 정책이 바뀌면 Git LFS 전환을 검토해야 한다.
|
5. `Assets/img/360.mp4`는 약 192MB다. 현재 일반 Git으로 푸시되어 있으므로, 원격 정책이 바뀌면 Git LFS 전환을 검토해야 한다.
|
||||||
|
6. 큐브 간격은 수치상 겹침을 피하도록 넓혔지만, 실제 Quest 착용 테스트에서 손 위치/판정 거리/시야 피로도를 확인해야 한다.
|
||||||
|
7. SongCreator에서 생성 직후 첫 재생이 곡에 따라 늦거나 싱크가 흔들리는 체감이 있었다. 게임 씬 오디오 기준은 `AudioSettings.dspTime`으로 개선했지만, 생성/다운로드/첫 로드 전체 파이프라인은 추가 로그 검증이 필요하다.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -289,6 +300,9 @@ private IEnumerator LoadAndPlay()
|
|||||||
|
|
||||||
private void SpawnNote(NoteData note)
|
private void SpawnNote(NoteData note)
|
||||||
{
|
{
|
||||||
|
float x = MapLaneX(note.position);
|
||||||
|
float y = MapLayerY(note.lineLayer);
|
||||||
|
|
||||||
var info = new SpawnEventInfo
|
var info = new SpawnEventInfo
|
||||||
{
|
{
|
||||||
position = new Vector3(x, y, 0f),
|
position = new Vector3(x, y, 0f),
|
||||||
@@ -305,6 +319,8 @@ private void SpawnNote(NoteData note)
|
|||||||
|
|
||||||
`travelTimeOverride`는 동시 노트가 프레임 차이로 스폰되어도 같은 타이밍에 도착하도록 `VR_BeatManager`에 추가된 값이다.
|
`travelTimeOverride`는 동시 노트가 프레임 차이로 스폰되어도 같은 타이밍에 도착하도록 `VR_BeatManager`에 추가된 값이다.
|
||||||
|
|
||||||
|
현재 라인 매핑은 `LaneSpacing = 0.42f`, `LayerSpacing = 0.38f`를 사용한다. 이는 VRBeatsKit 큐브 콜라이더의 실제 폭이 기존 라인 간격보다 커서 인접 라인이 겹치던 문제를 피하기 위한 값이다.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ScoreManager 충돌 없음
|
## ScoreManager 충돌 없음
|
||||||
@@ -481,3 +497,5 @@ Application.temporaryCachePath/beatsaber/{songId}/
|
|||||||
3. **AudioType.MPEG**: MP3 로딩 시 `UnityWebRequestMultimedia.GetAudioClip(uri, AudioType.MPEG)` 사용.
|
3. **AudioType.MPEG**: MP3 로딩 시 `UnityWebRequestMultimedia.GetAudioClip(uri, AudioType.MPEG)` 사용.
|
||||||
4. **Unity `??` 연산자**: Unity Object에 `??` 쓰면 fake-null을 못 잡음. 반드시 `if (x == null)` 또는 `TryGetComponent` 사용.
|
4. **Unity `??` 연산자**: Unity Object에 `??` 쓰면 fake-null을 못 잡음. 반드시 `if (x == null)` 또는 `TryGetComponent` 사용.
|
||||||
5. **Build Settings 현재 상태**: 현재 등록 순서는 `Menu`, `BoxingStyle`, `SongCreator`, `SaberStyle`, `Game`이다. 예전 목표 설계의 `Intro`, `SongSelect`, `MapEditorScene`은 현재 Build Settings에 없다.
|
5. **Build Settings 현재 상태**: 현재 등록 순서는 `Menu`, `BoxingStyle`, `SongCreator`, `SaberStyle`, `Game`이다. 예전 목표 설계의 `Intro`, `SongSelect`, `MapEditorScene`은 현재 Build Settings에 없다.
|
||||||
|
6. **경고 0 상태 유지**: 패키지 내부까지 경고를 제거해 둔 상태라, 새 SDK/API를 추가할 때 `dotnet build VRBeatSaber.slnx --no-incremental`로 경고 재발 여부를 확인한다.
|
||||||
|
7. **VR 실기 테스트 필수 항목**: 게임오버 Back/Retry 클릭, SongCreator UI 클릭, 큐브 가로 간격, 큐브 도착 싱크, 세이버 각도는 Quest에서 직접 확인해야 한다.
|
||||||
|
|||||||
Reference in New Issue
Block a user