Skip to content

Commit

Permalink
Add project files.
Browse files Browse the repository at this point in the history
  • Loading branch information
HAHOOS committed Nov 3, 2024
1 parent 9f5ea2b commit 48c7a2e
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 0 deletions.
25 changes: 25 additions & 0 deletions HandsStuck.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35327.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandsStuck", "HandsStuck\HandsStuck.csproj", "{D6D47D73-64CE-44CD-A2DC-B44EB909B005}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D6D47D73-64CE-44CD-A2DC-B44EB909B005}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6D47D73-64CE-44CD-A2DC-B44EB909B005}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6D47D73-64CE-44CD-A2DC-B44EB909B005}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6D47D73-64CE-44CD-A2DC-B44EB909B005}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FD510F94-485F-412E-8D4D-B2DDFCECE13F}
EndGlobalSection
EndGlobal
26 changes: 26 additions & 0 deletions HandsStuck/HandsStuck.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using MelonLoader;
using System.Linq;
using UnityEngine.XR.OpenXR;

namespace HandsStuck
{
public class HandsStuck : MelonMod
{
public const string Version = "1.0.0";

public override void OnInitializeMelon()
{
var eyegaze = OpenXRSettings.Instance.features.First(x => x.name == "EyeGazeInteraction Standalone");
if (eyegaze?.enabled == true)
{
eyegaze.enabled = false;
OpenXRSettings.Instance.ApplySettings();
LoggerInstance.Msg("Disabled EyeGazeInteraction feature, which breaks controller tracking on SteamVR beta");
}
else
{
LoggerInstance.Msg("It seems like the feature is not enabled, which means the bug was already fixed by the devs");
}
}
}
}
40 changes: 40 additions & 0 deletions HandsStuck/HandsStuck.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>

<GenerateAssemblyInfo>False</GenerateAssemblyInfo>

<!-- Directory used for references and PostBuild events -->
<GameDirectory>C:\Oculus\Software\stress-level-zero-inc-bonelab</GameDirectory>
</PropertyGroup>

<ItemGroup>
<Reference Include="Il2CppInterop.Runtime">
<HintPath>$(GameDirectory)\MelonLoader\net6\Il2CppInterop.Runtime.dll</HintPath>
</Reference>
<Reference Include="Il2Cppmscorlib">
<HintPath>$(GameDirectory)\MelonLoader\Il2CppAssemblies\Il2Cppmscorlib.dll</HintPath>
</Reference>
<Reference Include="Unity.XR.OpenXR">
<HintPath>$(GameDirectory)\MelonLoader\Il2CppAssemblies\Unity.XR.OpenXR.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>$(GameDirectory)\MelonLoader\Il2CppAssemblies\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.XRModule">
<HintPath>$(GameDirectory)\MelonLoader\Il2CppAssemblies\UnityEngine.XRModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(GameDirectory)\MelonLoader\Il2CppAssemblies\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="MelonLoader">
<HintPath>$(GameDirectory)\MelonLoader\net6\MelonLoader.dll</HintPath>
</Reference>

</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="COPY &quot;$(TargetPath)&quot; &quot;$(GameDirectory)\Mods&quot;" />
</Target>
</Project>
34 changes: 34 additions & 0 deletions HandsStuck/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using HandsStuck;
using MelonLoader;
using System.Reflection;
using System.Runtime.InteropServices;

#region MelonLoader

[assembly: MelonInfo(typeof(HandsStuck.HandsStuck), "HandsStuck", "1.0.0", "HAHOOS", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: MelonColor(0, 191, 35, 0)]

#endregion MelonLoader

#region General

[assembly: AssemblyTitle("Fixes the controller tracking bug in newer versions of SteamVR")]
[assembly: AssemblyDescription("Fixes the controller tracking bug in newer versions of SteamVR")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HAHOOS")]
[assembly: AssemblyProduct("HandsStuck")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion(HandsStuck.HandsStuck.Version)]
[assembly: AssemblyFileVersion(HandsStuck.HandsStuck.Version)]
[assembly: AssemblyInformationalVersion(HandsStuck.HandsStuck.Version)]

#endregion General

#region Other

[assembly: ComVisible(false)]
[assembly: Guid("5293f777-bfbf-4a4d-a006-95a2fc2670c3")]

#endregion Other

0 comments on commit 48c7a2e

Please sign in to comment.