diff --git a/KerbalVR/KerbalVR.csproj b/KerbalVR/KerbalVR.csproj index ef8c77bd..7ac803e6 100644 --- a/KerbalVR/KerbalVR.csproj +++ b/KerbalVR/KerbalVR.csproj @@ -9,8 +9,9 @@ Properties KerbalVR KerbalVR - v3.5 + v4.0 512 + true @@ -32,19 +33,354 @@ ksp_lib\Assembly-CSharp.dll + False + + + ksp_lib\Assembly-CSharp-firstpass.dll + False + + + ksp_lib\I18N.dll + False + + + ksp_lib\I18N.CJK.dll + False + + + ksp_lib\I18N.MidEast.dll + False + + + ksp_lib\I18N.Other.dll + False + + + ksp_lib\I18N.Rare.dll + False + + + ksp_lib\I18N.West.dll + False + + + ksp_lib\Ionic.Zip.dll + False + + + ksp_lib\KSPAssets.dll + False + + + ksp_lib\KSPAssets.XmlSerializers.dll + False + + + ksp_lib\KSPTrackIR.dll + False + + + ksp_lib\Mono.Cecil.dll + False + + + ksp_lib\Mono.Posix.dll + False + + + ksp_lib\Mono.Security.dll + False + + ksp_lib\System.Configuration.dll + False + + + ksp_lib\System.Security.dll + False + + + ksp_lib\TDx.TDxInput.dll + True + + + ksp_lib\Unity.Analytics.DataPrivacy.dll + False + + + ksp_lib\Unity.Analytics.StandardEvents.dll + False + + + ksp_lib\Unity.Analytics.Tracker.dll + False + + + ksp_lib\Unity.RenderPipelines.Core.Runtime.dll + False + + + ksp_lib\Unity.RenderPipelines.Core.ShaderLibrary.dll + False + + + ksp_lib\Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary.dll + False + + + ksp_lib\Unity.Timeline.dll + False + ksp_lib\UnityEngine.dll + False + + + ksp_lib\UnityEngine.AccessibilityModule.dll + False + + + ksp_lib\UnityEngine.AIModule.dll + False + + + ksp_lib\UnityEngine.AndroidJNIModule.dll + False + + + ksp_lib\UnityEngine.AnimationModule.dll + False + + + ksp_lib\UnityEngine.ARModule.dll + False + + + ksp_lib\UnityEngine.AssetBundleModule.dll + False + + + ksp_lib\UnityEngine.AudioModule.dll + False + + + ksp_lib\UnityEngine.ClothModule.dll + False + + + ksp_lib\UnityEngine.ClusterInputModule.dll + False + + + ksp_lib\UnityEngine.ClusterRendererModule.dll + False + + + ksp_lib\UnityEngine.CoreModule.dll + False + + + ksp_lib\UnityEngine.CrashReportingModule.dll + False + + + ksp_lib\UnityEngine.DirectorModule.dll + False + + + ksp_lib\UnityEngine.DSPGraphModule.dll + False + + + ksp_lib\UnityEngine.FileSystemHttpModule.dll + False + + + ksp_lib\UnityEngine.GameCenterModule.dll + False + + + ksp_lib\UnityEngine.GridModule.dll + False + + + ksp_lib\UnityEngine.HotReloadModule.dll + False + + + ksp_lib\UnityEngine.ImageConversionModule.dll + False + + + ksp_lib\UnityEngine.IMGUIModule.dll + False + + + ksp_lib\UnityEngine.InputLegacyModule.dll + False + + + ksp_lib\UnityEngine.InputModule.dll + False + + + ksp_lib\UnityEngine.JSONSerializeModule.dll + False + + + ksp_lib\UnityEngine.LocalizationModule.dll + False + + + ksp_lib\UnityEngine.ParticleSystemModule.dll + False + + + ksp_lib\UnityEngine.PerformanceReportingModule.dll + False + + + ksp_lib\UnityEngine.Physics2DModule.dll + False + + + ksp_lib\UnityEngine.PhysicsModule.dll + False + + + ksp_lib\UnityEngine.ProfilerModule.dll + False + + + ksp_lib\UnityEngine.ScreenCaptureModule.dll + False + + + ksp_lib\UnityEngine.SharedInternalsModule.dll + False + + + ksp_lib\UnityEngine.SpriteMaskModule.dll + False + + + ksp_lib\UnityEngine.SpriteShapeModule.dll + False + + + ksp_lib\UnityEngine.StreamingModule.dll + False + + + ksp_lib\UnityEngine.SubstanceModule.dll + False + + + ksp_lib\UnityEngine.TerrainModule.dll + False + + + ksp_lib\UnityEngine.TerrainPhysicsModule.dll + False + + + ksp_lib\UnityEngine.TextCoreModule.dll + False + + + ksp_lib\UnityEngine.TextRenderingModule.dll + False + + + ksp_lib\UnityEngine.TilemapModule.dll + False + + + ksp_lib\UnityEngine.TLSModule.dll + False False ksp_lib\UnityEngine.UI.dll + False + + + ksp_lib\UnityEngine.UIElementsModule.dll + False + + + ksp_lib\UnityEngine.UIModule.dll + False + + + ksp_lib\UnityEngine.UmbraModule.dll + False + + + ksp_lib\UnityEngine.UNETModule.dll + False + + + ksp_lib\UnityEngine.UnityAnalyticsModule.dll + False + + + ksp_lib\UnityEngine.UnityConnectModule.dll + False + + + ksp_lib\UnityEngine.UnityTestProtocolModule.dll + False + + + ksp_lib\UnityEngine.UnityWebRequestAssetBundleModule.dll + False + + + ksp_lib\UnityEngine.UnityWebRequestAudioModule.dll + False + + + ksp_lib\UnityEngine.UnityWebRequestModule.dll + False + + + ksp_lib\UnityEngine.UnityWebRequestTextureModule.dll + False + + + ksp_lib\UnityEngine.UnityWebRequestWWWModule.dll + False + + + ksp_lib\UnityEngine.VehiclesModule.dll + False + + + ksp_lib\UnityEngine.VFXModule.dll + False + + + ksp_lib\UnityEngine.VideoModule.dll + False + + + ksp_lib\UnityEngine.VRModule.dll + False + + + ksp_lib\UnityEngine.WindModule.dll + False + + + ksp_lib\UnityEngine.XRModule.dll + False diff --git a/KerbalVR/KerbalVR_Scene.cs b/KerbalVR/KerbalVR_Scene.cs index a6c4bee5..a7cbb254 100644 --- a/KerbalVR/KerbalVR_Scene.cs +++ b/KerbalVR/KerbalVR_Scene.cs @@ -12,11 +12,22 @@ namespace KerbalVR /// public class Scene : MonoBehaviour { + /* + * Camera 00 + [LOG 21:31:53.750] [KerbalVR] Camera Found: Camera 00 + [LOG 21:31:53.750] [KerbalVR] Camera Found: FXDepthCamera + [LOG 21:31:53.750] [KerbalVR] Camera Found: FXCamera + [LOG 21:31:53.750] [KerbalVR] Camera Found: InternalCamera + [LOG 21:31:53.750] [KerbalVR] Camera Found: UIMainCamera + [LOG 21:31:53.750] [KerbalVR] Camera Found: UIVectorCamera + [LOG 21:31:53.750] [KerbalVR] Camera Found: velocity camera + + + */ #region Constants public static readonly string[] FLIGHT_SCENE_IVA_CAMERAS = { "GalaxyCamera", "Camera ScaledSpace", - "Camera 01", "Camera 00", "InternalCamera", }; @@ -24,7 +35,6 @@ public class Scene : MonoBehaviour public static readonly string[] FLIGHT_SCENE_EVA_CAMERAS = { "GalaxyCamera", "Camera ScaledSpace", - "Camera 01", "Camera 00", }; @@ -382,7 +392,7 @@ private void PopulateCameraList(string[] cameraNames) { } else { // determine clip plane and new projection matrices - float nearClipPlane = (foundCamera.name.Equals("Camera 01")) ? 0.05f : foundCamera.nearClipPlane; + float nearClipPlane = (foundCamera.name.Equals("Camera 00")) ? 0.05f : foundCamera.nearClipPlane; HmdMatrix44_t projectionMatrixL = OpenVR.System.GetProjectionMatrix(EVREye.Eye_Left, nearClipPlane, foundCamera.farClipPlane); HmdMatrix44_t projectionMatrixR = OpenVR.System.GetProjectionMatrix(EVREye.Eye_Right, nearClipPlane, foundCamera.farClipPlane); diff --git a/KerbalVR/SteamVR/Scripts/SteamVR.cs b/KerbalVR/SteamVR/Scripts/SteamVR.cs index ee976efa..886285ac 100644 --- a/KerbalVR/SteamVR/Scripts/SteamVR.cs +++ b/KerbalVR/SteamVR/Scripts/SteamVR.cs @@ -19,7 +19,7 @@ public static bool enabled { get { - if (!UnityEngine.VR.VRSettings.enabled) + if (!UnityEngine.XR.XRSettings.enabled) enabled = false; return _enabled; } @@ -58,7 +58,7 @@ public static SteamVR instance public static bool usingNativeSupport { - get { return UnityEngine.VR.VRDevice.GetNativePtr() != System.IntPtr.Zero; } + get { return UnityEngine.XR.XRDevice.GetNativePtr() != System.IntPtr.Zero; } } static SteamVR CreateInstance() diff --git a/KerbalVR/SteamVR/Scripts/SteamVR_Camera.cs b/KerbalVR/SteamVR/Scripts/SteamVR_Camera.cs index 5f14741d..ac7339de 100644 --- a/KerbalVR/SteamVR/Scripts/SteamVR_Camera.cs +++ b/KerbalVR/SteamVR/Scripts/SteamVR_Camera.cs @@ -18,7 +18,7 @@ public class SteamVR_Camera : MonoBehaviour public Transform offset { get { return _head; } } // legacy public Transform origin { get { return _head.parent; } } - public new Camera camera { get; private set; } + public Camera camera { get; private set; } [SerializeField] private Transform _ears; @@ -33,8 +33,8 @@ public Ray GetRay() static public float sceneResolutionScale { - get { return UnityEngine.VR.VRSettings.renderScale; } - set { UnityEngine.VR.VRSettings.renderScale = value; } + get { return UnityEngine.XR.XRSettings.eyeTextureResolutionScale; } + set { UnityEngine.XR.XRSettings.eyeTextureResolutionScale = value; } } #region Enable / Disable @@ -197,14 +197,7 @@ public void Expand() while (transform.childCount > 0) transform.GetChild(0).parent = head; -#if !UNITY_2017_2_OR_NEWER - var guiLayer = GetComponent(); - if (guiLayer != null) - { - DestroyImmediate(guiLayer); - head.gameObject.AddComponent(); - } -#endif + var audioListener = GetComponent(); if (audioListener != null) {