private static void AddObjectChara_Add_Postfix() { // only fires when adding chara Core.DebugLog($"AddObjectChara_Add_Postfix"); OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(new OCIChar(), CharaLoadMode.Add, CharaLoadState.Post)); Instance.StartCoroutine(AddObjectChara_Coroutine(null, CharaLoadMode.Add)); }
private static void AddObjectChara_Load_Postfix(OICharInfo _info) { // only fires when loading scene Core.DebugLog($"AddObjectChara_Load_Postfix"); OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(_info, CharaLoadMode.Load, CharaLoadState.Post)); Instance.StartCoroutine(AddObjectChara_Coroutine(GetOCIChar(_info), CharaLoadMode.Load)); }
private static void OCIChar_ChangeChara_Postfix(OCIChar __instance, string _path) { // only fires when switching chara Core.DebugLog($"OCIChar_ChangeChara_Postfix"); OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(__instance, CharaLoadMode.Change, CharaLoadState.Post)); //StudioInstance.StartCoroutine(OCIChar_ChangeChara_Coroutine(__instance, CharaLoadState.Post)); Instance.StartCoroutine(OCIChar_ChangeChara_Coroutine(__instance, CharaLoadState.Coroutine)); }
internal static IEnumerator AddObjectChara_Coroutine(OCIChar _chara, CharaLoadMode _mode) { yield return(new WaitForEndOfFrame()); yield return(new WaitForEndOfFrame()); OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(_chara, _mode, CharaLoadState.Coroutine)); Core.DebugLog($"AddObjectChara_Coroutine [mode: {_mode}]"); }
internal static IEnumerator OCIChar_ChangeChara_Coroutine(OCIChar _chara, CharaLoadState _state) { yield return(new WaitForEndOfFrame()); yield return(new WaitForEndOfFrame()); yield return(new WaitForEndOfFrame()); yield return(new WaitForEndOfFrame()); Core.DebugLog($"OCIChar_ChangeChara_Postfix_Coroutine [state: {_state}]"); /* * if (state == CharaLoadState.Post) * StudioInstance.StartCoroutine(OCIChar_ChangeChara_Coroutine(chara, CharaLoadState.Coroutine)); * else */ OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(_chara, CharaLoadMode.Change, _state)); }
private static void AddObjectChara_Load_Prefix(OICharInfo _info) { // only fires when loading scene Core.DebugLog($"AddObjectChara_Load_Prefix"); OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(_info, CharaLoadMode.Load, CharaLoadState.Pre)); }
private static void AddObjectChara_Add_Prefix() { // only fires when adding chara Core.DebugLog($"AddObjectChara_Add_Prefix"); OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(new OCIChar(), CharaLoadMode.Add, CharaLoadState.Pre)); }
private static void OCIChar_ChangeChara_Prefix(OCIChar __instance, string _path) { // only fires when switching chara Core.DebugLog($"OCIChar_ChangeChara_Prefix"); OnCharaLoad?.Invoke(null, new CharaLoadEventArgs(__instance, CharaLoadMode.Change, CharaLoadState.Pre)); }