static void Postfix(OcPlCharacterBuilder __instance, GameObject prefab, int?layer = null) { var go = __instance.GetRefField <OcPlCharacterBuilder, GameObject>("hair"); foreach (var mr in go.GetComponentsInChildren <MeshRenderer>()) { mr.enabled = false; } foreach (var smr in go.GetComponentsInChildren <SkinnedMeshRenderer>()) { smr.enabled = false; } }
static void Postfix(OcPlCharacterBuilder __instance, GameObject prefab, int?layer = null) { var go = __instance.GetRefField <OcPlCharacterBuilder, GameObject>("hair"); OcPl pl = go.GetComponentInParentRecursive <OcPl>(); if (!Settings.isUseVRM(pl)) { return; } foreach (var mr in go.GetComponentsInChildren <MeshRenderer>()) { mr.enabled = false; } foreach (var smr in go.GetComponentsInChildren <SkinnedMeshRenderer>()) { smr.enabled = false; } }
static void Postfix(OcPlCharacterBuilder __instance, GameObject prefab, int?layer = null) { var go = __instance.GetRefField <OcPlCharacterBuilder, GameObject>("hair"); var slave = go.GetComponentInParentRecursive <OcPlSlave>(); if (slave && !slave.FindNameInParentRecursive("UI")) { var selfId = OcNetMng.Inst.NetPlId_Master; if (SingletonMonoBehaviour <OcPlMng> .Inst.getPlSlave(selfId - 1) != slave) { return; } } foreach (var mr in go.GetComponentsInChildren <MeshRenderer>()) { mr.enabled = false; } foreach (var smr in go.GetComponentsInChildren <SkinnedMeshRenderer>()) { smr.enabled = false; } }