static void Postfix(Female __instance) { if (Application.productName == "PlayHomeStudio") { return; } __instance.GetOrAddComponent <BMMHuman>().Name = Female.HeroineName(__instance.HeroineID); }
private static string GetCharacterName(this Human h) { if (StudioAPI.InsideStudio) { var charaName = Studio.Studio.Instance.dicObjectCtrl.Values.OfType <OCIChar>().FirstOrDefault(x => x.charInfo.human == h)?.charStatus.name; if (!string.IsNullOrEmpty(charaName)) { return(charaName); } } return(h is Female f ? Female.HeroineName(f.HeroineID) : Male.MaleName(((Male)h).MaleID)); }