diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5fb64194..49232245 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -10,25 +10,26 @@ on:
jobs:
build:
+ name: Build
runs-on: windows-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up Beat Saber
- uses: nicoco007/setup-beat-saber@main
+ uses: nicoco007/setup-beat-saber@v1
with:
access-token: ${{ secrets.PRIVATE_GITHUB_TOKEN }}
additional-dependencies: '{ "XR Hands": "^1.1.0", "OpenVR API": "^2.0.0" }'
aliases: '{ "DynamicBone": "Dynamic Bone", "FinalIK": "Final IK" }'
- manifest: ${{ github.workspace }}\Source\CustomAvatar\manifest.json
+ project-path: ${{ github.workspace }}\Source\CustomAvatar\CustomAvatar.csproj
- name: Add NuGet source
run: dotnet nuget update source "nicoco007 GitHub Packages" --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
- name: Build Release
id: build-release
- run: dotnet build Source\CustomAvatar\CustomAvatar.csproj -c Release
+ run: dotnet build ${{ github.workspace }}\Source\CustomAvatar\CustomAvatar.csproj -c Release
- name: Upload Release
uses: actions/upload-artifact@v4
@@ -38,7 +39,7 @@ jobs:
- name: Build Editor
id: build-editor
- run: dotnet build Source\CustomAvatar-Editor\CustomAvatar-Editor.csproj -c Release
+ run: dotnet build ${{ github.workspace }}\Source\CustomAvatar-Editor\CustomAvatar-Editor.csproj -c Release
- name: Upload Editor
uses: actions/upload-artifact@v4
@@ -50,4 +51,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build-editor.outputs.unity-project-name }}
- path: Unity\BeatSaberCustomAvatars
+ path: ${{ github.workspace }}\Unity\BeatSaberCustomAvatars
diff --git a/.gitignore b/.gitignore
index c47a9cdb..3c1c040b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,10 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
-## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
+*.rsuser
*.suo
*.user
*.userosscache
@@ -12,6 +13,9 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
+# Mono auto generated files
+mono_crash.*
+
# Build results
[Dd]ebug/
[Dd]ebugPublic/
@@ -19,42 +23,62 @@
[Rr]eleases/
x64/
x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
+[Ll]ogs/
-# Visual Studio 2015 cache/options directory
+# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
-# NUNIT
+# NUnit
*.VisualState.xml
TestResult.xml
+nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
*_i.c
*_p.c
-*_i.h
+*_h.h
*.ilk
*.meta
*.obj
+*.iobj
*.pch
*.pdb
+*.ipdb
*.pgc
*.pgd
*.rsp
@@ -64,7 +88,9 @@ artifacts/
*.tlh
*.tmp
*.tmp_proj
+*_wpftmp.csproj
*.log
+*.tlog
*.vspscc
*.vssscc
.builds
@@ -92,6 +118,9 @@ ipch/
*.vspx
*.sap
+# Visual Studio Trace Files
+*.e2e
+
# TFS 2012 Local Workspace
$tf/
@@ -103,15 +132,21 @@ _ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
-# JustCode is a .NET coding add-in
-.JustCode
-
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
# Visual Studio code coverage results
*.coverage
*.coveragexml
@@ -147,7 +182,7 @@ publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
-# TODO: Comment the next line if you want to checkin your web deploy settings
+# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
@@ -159,12 +194,14 @@ PublishScripts/
# NuGet Packages
*.nupkg
+# NuGet Symbol Packages
+*.snupkg
# The packages folder can be ignored because of Package Restore
-**/packages/*
+**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
-!**/packages/build/
+!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
-#!**/packages/repositories.config
+#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
@@ -182,12 +219,15 @@ AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
-!*.[Cc]ache/
+!?*.[Cc]ache/
# Others
ClientBin/
@@ -200,6 +240,10 @@ ClientBin/
*.publishsettings
orleans.codegen.cs
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
@@ -214,6 +258,8 @@ _UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
# SQL Server files
*.mdf
@@ -224,6 +270,10 @@ UpgradeLog*.htm
*.rdl.data
*.bim.layout
*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
@@ -235,9 +285,6 @@ FakesAssemblies/
.ntvs_analysis.dat
node_modules/
-# Typescript v1 declaration files
-typings/
-
# Visual Studio 6 build log
*.plg
@@ -247,6 +294,17 @@ typings/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
+# Visual Studio 6 auto-generated project file (contains which files were open etc.)
+*.vbp
+
+# Visual Studio 6 workspace and project file (working project files containing files to include in project)
+*.dsw
+*.dsp
+
+# Visual Studio 6 technical files
+*.ncb
+*.aps
+
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
@@ -262,12 +320,8 @@ paket-files/
# FAKE - F# Make
.fake/
-# JetBrains Rider
-.idea/
-*.sln.iml
-
-# CodeRush
-.cr/
+# CodeRush personal settings
+.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
@@ -277,6 +331,9 @@ __pycache__/
# tools/**
# !tools/packages.config
+# Tabs Studio
+*.tss
+
# Telerik's JustMock configuration file
*.jmconfig
@@ -286,4 +343,58 @@ __pycache__/
*.odx.cs
*.xsd.cs
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# Visual Studio History (VSHistory) files
+.vshistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
+
+# VS Code files for those working on multiple tools
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+*.code-workspace
+
+# Local History for Visual Studio Code
+.history/
+
+# Windows Installer files from build outputs
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# JetBrains Rider
+*.sln.iml
+
!*.dll.meta
diff --git a/Source/.editorconfig b/Source/.editorconfig
index c73c22ee..599b9acc 100644
--- a/Source/.editorconfig
+++ b/Source/.editorconfig
@@ -392,3 +392,6 @@ dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
# Unity analyzers
dotnet_diagnostic.UNT0030.severity = error
+
+# TODO: re-enable this
+dotnet_diagnostic.CS1591.severity = suggestion
diff --git a/Source/Common.props b/Source/Common.props
new file mode 100644
index 00000000..8e50dd25
--- /dev/null
+++ b/Source/Common.props
@@ -0,0 +1,30 @@
+
+
+ CustomAvatar
+ CustomAvatar
+ Copyright © 2018-2024 Nicolas Gnyra and Beat Saber Custom Avatars Contributors
+ x64
+ $(DefineConstants);UNITY_5_3_OR_NEWER
+
+
+
+ CustomAvatar
+ Custom Avatars
+ Custom Avatars Contributors
+ Copyright © 2018-2024 Nicolas Gnyra and Beat Saber Custom Avatars Contributors
+ Allows the use of custom player models for body presence.
+ 1.37.2
+ 5.4.2
+ https://github.com/nicoco007/BeatSaberCustomAvatars
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/CustomAvatar-Editor/CustomAvatar-Editor.csproj b/Source/CustomAvatar-Editor/CustomAvatar-Editor.csproj
index 3a6329cd..b8fc072b 100644
--- a/Source/CustomAvatar-Editor/CustomAvatar-Editor.csproj
+++ b/Source/CustomAvatar-Editor/CustomAvatar-Editor.csproj
@@ -1,20 +1,12 @@
+
+
- CustomAvatar
- CustomAvatar
- net472
- UNITY_EDITOR
+ $(DefineConstants);UNITY_EDITOR
$(ProjectDir)..\..\Unity\BeatSaberCustomAvatars
- $(MSBuildProjectDirectory)\$(IntermediateOutputPath)=$(MSBuildProjectName)
- 11
- disable
- x64
-
-
- none
- false
+
$(BeatSaberDir)\Libs\DynamicBone.dll
@@ -77,7 +69,7 @@
-
+
@@ -87,13 +79,5 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
\ No newline at end of file
diff --git a/Source/CustomAvatar-Editor/Directory.Build.props b/Source/CustomAvatar-Editor/Directory.Build.props
index 021c64cc..6ffde463 100644
--- a/Source/CustomAvatar-Editor/Directory.Build.props
+++ b/Source/CustomAvatar-Editor/Directory.Build.props
@@ -1,23 +1,64 @@
- false
- false
+ False
+ False
Plugin
- true
+ True
+ True
portable
- false
+ True
+ v{0}
+ True
+ False
+ False
+ False
+ False
12
- disable
+ False
+ True
+ net472
+
+
+
$(MSBuildProjectDirectory)\$(IntermediateOutputPath)=$(MSBuildProjectName)
-
+
+
+
+ $(BeatSaberDir)Beat Saber_Data\Managed\IPA.Loader.dll
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/CustomAvatar-Editor/Directory.Build.targets b/Source/CustomAvatar-Editor/Directory.Build.targets
index 5e3d168c..0003de5c 100644
--- a/Source/CustomAvatar-Editor/Directory.Build.targets
+++ b/Source/CustomAvatar-Editor/Directory.Build.targets
@@ -1,46 +1,82 @@
- $(ProjectDir)..\CustomAvatar\manifest.json
-
-
-
-
-
-
-
-
-
+
+ $(BeatSaberDir)\
-
- $(BasePluginVersion)
- $(BasePluginVersion)
- $(PluginVersion)
-
+ $(IntermediateOutputPath)manifest.json
+ $(TargetDir)$(TargetName).manifest
+
+
+ $([System.String]::Format('$(GitTagFormat)', '$(Version)'))
+
+
+ dev
+ bs.$(GameVersion)
+ $(BuildMetadata).git.sha.$(GITHUB_SHA)
+ $(Version)+$(BuildMetadata)
+
+ $(TargetDir)Artifact\
+ $(ArtifactDir)Plugins\
+ $(ArtifactDir)Libs\
+
+
+
+
+
-
-
+
+
- $(TargetDir)Artifact\
+ $(BeatSaberDir)Beat Saber_Data\Managed\
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- $(ProjectName)-v$(PluginVersion)
- $(ArtifactName)-$(Configuration)
+ $(ProjectName)-v$(Version)
-
+
@@ -50,19 +86,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/Source/CustomAvatar.sln b/Source/CustomAvatar.sln
index 2445d985..ad53e665 100644
--- a/Source/CustomAvatar.sln
+++ b/Source/CustomAvatar.sln
@@ -10,6 +10,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{38569516-4FF0-45CF-883C-08E539399F1C}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
+ Common.props = Common.props
..\NuGet.config = ..\NuGet.config
..\README.md = ..\README.md
EndProjectSection
diff --git a/Source/CustomAvatar/Avatar/AvatarLoader.cs b/Source/CustomAvatar/Avatar/AvatarLoader.cs
index 9c7e6baa..686ec149 100644
--- a/Source/CustomAvatar/Avatar/AvatarLoader.cs
+++ b/Source/CustomAvatar/Avatar/AvatarLoader.cs
@@ -32,7 +32,7 @@
namespace CustomAvatar.Avatar
{
///
- /// Allows loading from various sources.
+ /// Allows loading from various sources.
///
public class AvatarLoader
{
diff --git a/Source/CustomAvatar/Avatar/AvatarSpawner.cs b/Source/CustomAvatar/Avatar/AvatarSpawner.cs
index b8f28ab5..97369cc7 100644
--- a/Source/CustomAvatar/Avatar/AvatarSpawner.cs
+++ b/Source/CustomAvatar/Avatar/AvatarSpawner.cs
@@ -26,7 +26,7 @@
namespace CustomAvatar.Avatar
{
///
- /// Allows spawning instances of .
+ /// Allows spawning instances of .
///
public class AvatarSpawner
{
@@ -63,9 +63,9 @@ public void DeregisterComponent() where T : MonoBehaviour
}
///
- /// Spawn a .
+ /// Spawn a .
///
- /// The to spawn
+ /// The to spawn
/// The to use
/// The container in which to spawn the avatar (optional)
///
diff --git a/Source/CustomAvatar/Avatar/AvatarTransformTracking.cs b/Source/CustomAvatar/Avatar/AvatarTransformTracking.cs
index 87845181..13cbc6a5 100644
--- a/Source/CustomAvatar/Avatar/AvatarTransformTracking.cs
+++ b/Source/CustomAvatar/Avatar/AvatarTransformTracking.cs
@@ -159,7 +159,7 @@ private void UpdateConstraint(DeviceUse deviceUse, ParentConstraint parentConstr
return;
}
- parentConstraint.SetSources(new List() { new ConstraintSource { sourceTransform = target, weight = 1 } });
+ parentConstraint.SetSources([new ConstraintSource { sourceTransform = target, weight = 1 }]);
}
}
}
diff --git a/Source/CustomAvatar/CustomAvatar.csproj b/Source/CustomAvatar/CustomAvatar.csproj
index d7db5833..cece0b19 100644
--- a/Source/CustomAvatar/CustomAvatar.csproj
+++ b/Source/CustomAvatar/CustomAvatar.csproj
@@ -1,239 +1,219 @@
-
+
-
- CustomAvatar
- CustomAvatar
- Copyright © 2018-2024 Nicolas Gnyra and Beat Saber Custom Avatars Contributors
- net472
- $(MSBuildProjectDirectory)\$(IntermediateOutputPath)=$(MSBuildProjectName)
- x64
- 11
- disable
- $(DefineConstants);UNITY_5_3_OR_NEWER
-
-
- none
- false
-
+
+
- $(BeatSaberDir)\Libs\0Harmony.dll
- false
+ $(BeatSaberDir)Libs\0Harmony.dll
+ False
- $(BeatSaberDir)\Plugins\AssetBundleLoadingTools.dll
- false
+ $(BeatSaberDir)Plugins\AssetBundleLoadingTools.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\BeatmapCore.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\BeatmapCore.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\BeatSaber.GameSettings.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\BeatSaber.GameSettings.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\BeatSaber.PerformancePresets.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\BeatSaber.PerformancePresets.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.AppFlow.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\BGLib.AppFlow.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.Polyglot.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\BGLib.Polyglot.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.SaveDataCore.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\BGLib.SaveDataCore.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.UnityExtension.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\BGLib.UnityExtension.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\BGNetCore.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\BGNetCore.dll
+ False
- $(BeatSaberDir)\Plugins\BSML.dll
- false
+ $(BeatSaberDir)Plugins\BSML.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\DataModels.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\DataModels.dll
+ False
- $(BeatSaberDir)\Libs\DynamicBone.dll
- false
- true
+ $(BeatSaberDir)Libs\DynamicBone.dll
+ False
+ True
BeatSaberDynamicBone
- $(BeatSaberDir)\Libs\FinalIK.dll
- false
- true
+ $(BeatSaberDir)Libs\FinalIK.dll
+ False
+ True
BeatSaberFinalIK
- $(BeatSaberDir)\Beat Saber_Data\Managed\GameplayCore.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\GameplayCore.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\Helpers.dll
- false
- true
+ $(BeatSaberDir)Beat Saber_Data\Managed\Helpers.dll
+ False
+ True
- $(BeatSaberDir)\Libs\Hive.Versioning.dll
- false
+ $(BeatSaberDir)Libs\Hive.Versioning.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\HMLib.dll
- false
- true
+ $(BeatSaberDir)Beat Saber_Data\Managed\HMLib.dll
+ False
+ True
- $(BeatSaberDir)\Beat Saber_Data\Managed\HMRendering.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\HMRendering.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\HMUI.dll
- false
- true
-
-
- $(BeatSaberDir)\Beat Saber_Data\Managed\IPA.Loader.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\HMUI.dll
+ False
+ True
- $(BeatSaberDir)\Beat Saber_Data\Managed\Menu.CommonLib.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\Menu.CommonLib.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\Main.dll
- false
- true
+ $(BeatSaberDir)Beat Saber_Data\Managed\Main.dll
+ False
+ True
- $(BeatSaberDir)\Libs\Newtonsoft.Json.dll
- false
+ $(BeatSaberDir)Libs\Newtonsoft.Json.dll
+ False
- $(BeatSaberDir)\Libs\OpenVR.dll
- false
+ $(BeatSaberDir)Libs\OpenVR.dll
+ False
- $(BeatSaberDir)\Libs\Unity.XR.Hands.dll
- false
- true
+ $(BeatSaberDir)Libs\Unity.XR.Hands.dll
+ False
+ True
- $(BeatSaberDir)\Libs\protobuf-net.dll
- false
+ $(BeatSaberDir)Libs\protobuf-net.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\Rendering.dll
- false
- true
+ $(BeatSaberDir)Beat Saber_Data\Managed\Rendering.dll
+ False
+ True
- $(BeatSaberDir)\Plugins\SiraUtil.dll
- false
+ $(BeatSaberDir)Plugins\SiraUtil.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\Unity.InputSystem.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\Unity.InputSystem.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\Unity.TextMeshPro.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\Unity.TextMeshPro.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\Unity.XR.OpenXR.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\Unity.XR.OpenXR.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.AnimationModule.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.AnimationModule.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.AssetBundleModule.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.AssetBundleModule.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.AudioModule.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.AudioModule.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll
- false
- true
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.CoreModule.dll
+ False
+ True
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.ImageConversionModule.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.ImageConversionModule.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.InputLegacyModule.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.InputLegacyModule.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.PhysicsModule.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.PhysicsModule.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.SpatialTracking.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.SpatialTracking.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.SubsystemsModule.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.SubsystemsModule.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UI.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.UI.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UIModule.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.UIModule.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.VRModule.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.VRModule.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.XRModule.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\UnityEngine.XRModule.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\VRUI.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\VRUI.dll
+ False
- $(BeatSaberDir)\Beat Saber_Data\Managed\Zenject.dll
- false
- true
+ $(BeatSaberDir)Beat Saber_Data\Managed\Zenject.dll
+ False
+ True
- $(BeatSaberDir)\Beat Saber_Data\Managed\Zenject-usage.dll
- false
+ $(BeatSaberDir)Beat Saber_Data\Managed\Zenject-usage.dll
+ False
-
-
-
-
+
@@ -241,13 +221,5 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
\ No newline at end of file
+
diff --git a/Source/CustomAvatar/Directory.Build.props b/Source/CustomAvatar/Directory.Build.props
index 021c64cc..6ffde463 100644
--- a/Source/CustomAvatar/Directory.Build.props
+++ b/Source/CustomAvatar/Directory.Build.props
@@ -1,23 +1,64 @@
- false
- false
+ False
+ False
Plugin
- true
+ True
+ True
portable
- false
+ True
+ v{0}
+ True
+ False
+ False
+ False
+ False
12
- disable
+ False
+ True
+ net472
+
+
+
$(MSBuildProjectDirectory)\$(IntermediateOutputPath)=$(MSBuildProjectName)
-
+
+
+
+ $(BeatSaberDir)Beat Saber_Data\Managed\IPA.Loader.dll
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/CustomAvatar/Directory.Build.targets b/Source/CustomAvatar/Directory.Build.targets
index 101ecc59..94819d58 100644
--- a/Source/CustomAvatar/Directory.Build.targets
+++ b/Source/CustomAvatar/Directory.Build.targets
@@ -1,70 +1,82 @@
- $(ProjectDir)manifest.json
- $(ProjectDir)$(TargetName).manifest
+
+ $(BeatSaberDir)\
+
+ $(IntermediateOutputPath)manifest.json
+ $(TargetDir)$(TargetName).manifest
+
+
+ $([System.String]::Format('$(GitTagFormat)', '$(Version)'))
+
+
+ dev
+ bs.$(GameVersion)
+ $(BuildMetadata).git.sha.$(GITHUB_SHA)
+ $(Version)+$(BuildMetadata)
+
+ $(TargetDir)Artifact\
+ $(ArtifactDir)Plugins\
+ $(ArtifactDir)Libs\
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(BasePluginVersion)
- $(BasePluginVersion)
- $(PluginVersion)
-
+
+
+
-
-
+
+
- $(TargetDir)Artifact\
- $(ArtifactDir)Plugins
+ $(BeatSaberDir)Beat Saber_Data\Managed\
+
+
+
+
-
- $(ArtifactDir)Libs
-
+
+
+
-
+
-
+
-
+
+
+
+
+
+
+
-
+
-
+
+
- $(ProjectName)-v$(PluginVersion)
- $(ArtifactName)-$(Configuration)
+ $(ProjectName)-v$(Version)
-
+
@@ -73,19 +85,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/Source/CustomAvatar/Player/PlayerAvatarManager.cs b/Source/CustomAvatar/Player/PlayerAvatarManager.cs
index 4ec4cf1d..e933dc73 100644
--- a/Source/CustomAvatar/Player/PlayerAvatarManager.cs
+++ b/Source/CustomAvatar/Player/PlayerAvatarManager.cs
@@ -430,8 +430,8 @@ private void UpdateConstraints()
if (_activeOriginManager.current != null)
{
- _parentConstraint.SetSources(new List(1) { new ConstraintSource { sourceTransform = _activeOriginManager.current, weight = 1 } });
- _scaleConstraint.SetSources(new List(1) { new ConstraintSource { sourceTransform = _activeOriginManager.current, weight = 1 } });
+ _parentConstraint.SetSources([new ConstraintSource { sourceTransform = _activeOriginManager.current, weight = 1 }]);
+ _scaleConstraint.SetSources([new ConstraintSource { sourceTransform = _activeOriginManager.current, weight = 1 }]);
}
else
{
@@ -564,7 +564,7 @@ private void OnPlayerArmSpanChanged(float armSpan)
private void UpdateAvatarVerticalPosition(float eyeHeight)
{
- _parentConstraint.translationOffsets = new Vector3[] { new Vector3(0, GetFloorOffset(eyeHeight), 0) };
+ _parentConstraint.translationOffsets = [new Vector3(0, GetFloorOffset(eyeHeight), 0)];
}
}
}
diff --git a/Source/CustomAvatar/Properties/launchSettings.json b/Source/CustomAvatar/Properties/launchSettings.json
index c7ff1ef1..9c16cbab 100644
--- a/Source/CustomAvatar/Properties/launchSettings.json
+++ b/Source/CustomAvatar/Properties/launchSettings.json
@@ -2,7 +2,7 @@
"profiles": {
"Beat Saber": {
"commandName": "Executable",
- "executablePath": "$(BeatSaberDir)\\Beat Saber.exe",
+ "executablePath": "$(BeatSaberDir)Beat Saber.exe",
"commandLineArgs": "--verbose --debug",
"workingDirectory": "$(BeatSaberDir)",
"environmentVariables": {
@@ -11,7 +11,7 @@
},
"Beat Saber (FPFC)": {
"commandName": "Executable",
- "executablePath": "$(BeatSaberDir)\\Beat Saber.exe",
+ "executablePath": "$(BeatSaberDir)Beat Saber.exe",
"commandLineArgs": "fpfc --verbose --debug",
"workingDirectory": "$(BeatSaberDir)",
"environmentVariables": {
diff --git a/Source/CustomAvatar/Scripts/AvatarDescriptor.cs b/Source/CustomAvatar/Scripts/AvatarDescriptor.cs
index 10f51295..d52a6ee5 100644
--- a/Source/CustomAvatar/Scripts/AvatarDescriptor.cs
+++ b/Source/CustomAvatar/Scripts/AvatarDescriptor.cs
@@ -14,16 +14,14 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using CustomAvatar.Logging;
using UnityEngine;
using System.Linq;
#if UNITY_EDITOR
+using CustomAvatar.Logging;
using CustomAvatar.Utilities;
using System.IO;
using System.Reflection;
-#else
-using Zenject;
#endif
// keeping root namespace for compatibility
diff --git a/Source/CustomAvatar/Scripts/EventManager.cs b/Source/CustomAvatar/Scripts/EventManager.cs
index 7ff131eb..9071623c 100644
--- a/Source/CustomAvatar/Scripts/EventManager.cs
+++ b/Source/CustomAvatar/Scripts/EventManager.cs
@@ -22,10 +22,10 @@
using UnityEngine.Serialization;
#else
using System.Reflection;
+#if DEBUG
+using CustomAvatar.Avatar;
using CustomAvatar.Logging;
using JetBrains.Annotations;
-using CustomAvatar.Avatar;
-#if DEBUG
using Zenject;
#endif // DEBUG
#endif // UNITY_EDITOR
diff --git a/Source/CustomAvatar/Tracking/TrackingRig.cs b/Source/CustomAvatar/Tracking/TrackingRig.cs
index d6174c58..576703e4 100644
--- a/Source/CustomAvatar/Tracking/TrackingRig.cs
+++ b/Source/CustomAvatar/Tracking/TrackingRig.cs
@@ -610,7 +610,7 @@ private void OnActivePlayerSpaceChanged(Transform transform)
if (transform != null)
{
- var sources = new List(1) { new ConstraintSource { sourceTransform = transform, weight = 1 } };
+ List sources = [new ConstraintSource { sourceTransform = transform, weight = 1 }];
_parentConstraint.SetSources(sources);
_scaleConstraint.SetSources(sources);
diff --git a/Source/CustomAvatar/UI/TrackerStatusHost.cs b/Source/CustomAvatar/UI/TrackerStatusHost.cs
index 8f38b086..bd705998 100644
--- a/Source/CustomAvatar/UI/TrackerStatusHost.cs
+++ b/Source/CustomAvatar/UI/TrackerStatusHost.cs
@@ -25,7 +25,7 @@ namespace CustomAvatar.UI
{
internal class TrackerStatusHost : ViewControllerHost
{
- private static readonly InternedString[] kFullBodyTrackingUsages = new InternedString[] { new InternedString("Waist"), new InternedString("LeftFoot"), new InternedString("RightFoot") };
+ private static readonly InternedString[] kFullBodyTrackingUsages = [new InternedString("Waist"), new InternedString("LeftFoot"), new InternedString("RightFoot")];
private readonly TrackingRig _trackingRig;
diff --git a/Source/CustomAvatar/Zenject/HealthWarningInstaller.cs b/Source/CustomAvatar/Zenject/HealthWarningInstaller.cs
index 185644a9..fd345e4a 100644
--- a/Source/CustomAvatar/Zenject/HealthWarningInstaller.cs
+++ b/Source/CustomAvatar/Zenject/HealthWarningInstaller.cs
@@ -14,7 +14,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
-using System;
using CustomAvatar.Logging;
using CustomAvatar.Player;
using UnityEngine;
diff --git a/Source/CustomAvatar/manifest.json b/Source/CustomAvatar/manifest.json
deleted file mode 100644
index f7bab9c4..00000000
--- a/Source/CustomAvatar/manifest.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "$schema": "https://raw.githubusercontent.com/nike4613/ModSaber-MetadataFileSchema/master/Schema.json",
- "author": "Custom Avatars Contributors",
- "description": "Allows the use of custom player models for body presence.",
- "gameVersion": "1.37.2",
- "id": "CustomAvatar",
- "icon": "CustomAvatar.Resources.icon.png",
- "name": "Custom Avatars",
- "version": "5.4.2+dev",
- "dependsOn": {
- "AssetBundleLoadingTools": "^1.0.0",
- "BeatSaberMarkupLanguage": "^1.10.4",
- "BSIPA": "^4.3.0",
- "DynamicBone": "^1.2.0",
- "FinalIK": "^1.9.0",
- "protobuf-net": "^3.0.0",
- "SiraUtil": "^3.1.3"
- }
-}
\ No newline at end of file