-
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.
Fix Material Editor Compatibility Issue
- Loading branch information
1 parent
e3bd237
commit 9a1eb02
Showing
4 changed files
with
29 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using AIChara; | ||
using HarmonyLib; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Reflection; | ||
using System.Text; | ||
|
||
namespace OutfitPainter | ||
{ | ||
public class OutfitPainterMaterialEditorHelper | ||
{ | ||
private static Type MaterialEditorCharaControllerType = AccessTools.TypeByName("KK_Plugins.MaterialEditor.MaterialEditorCharaController"); | ||
private static PropertyInfo CustomClothesOverrideProperty = AccessTools.Property(MaterialEditorCharaControllerType, "CustomClothesOverride"); | ||
|
||
public static void SetMaterialEditorCustomClothesFlag(ChaControl chaControl) | ||
{ | ||
if (chaControl == null) | ||
return; | ||
|
||
var controller = chaControl.gameObject.GetComponent(MaterialEditorCharaControllerType); | ||
CustomClothesOverrideProperty.SetValue(controller, true); | ||
} | ||
} | ||
} |
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