forked from legoandmars/GorillaCosmetics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
expanded vrrig material array, store custom material at the end dynam…
…ically. untested
- Loading branch information
AHauntedArmy
committed
Feb 28, 2022
1 parent
d1b64d5
commit 8c063e4
Showing
5 changed files
with
71 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
GorillaCosmetics/HarmonyPatches/Patches/ChangeMaterialPatch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using HarmonyLib; | ||
|
||
namespace GorillaCosmetics.HarmonyPatches.Patches | ||
{ | ||
[HarmonyPatch(typeof(VRRig))] | ||
[HarmonyPatch("ChangeMaterialLocal", MethodType.Normal)] | ||
internal class ChangeMaterialPatch | ||
{ | ||
internal static void Prefix(VRRig __instance, ref int materialIndex) | ||
{ | ||
var controller = __instance.gameObject.GetComponent<ICustomCosmeticsController>(); | ||
if (controller != null && materialIndex == 0) | ||
{ | ||
materialIndex = controller.MatIndex; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters