Skip to content

Instantly share code, notes, and snippets.

View TakaakiIchijo's full-sized avatar

Takaaki Ichijo TakaakiIchijo

View GitHub Profile
@TakaakiIchijo
TakaakiIchijo / ExcludeTMPDefaultFontAssetInBuild.cs
Created January 9, 2023 05:10
Exclude TextMeshPro default font asset when build
#if UNITY_EDITOR
using System.Collections.Generic;
using System.Reflection;
using TMPro;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
public class ExcludeTMPDefaultFontAssetInBuild : IPreprocessBuildWithReport, IPostprocessBuildWithReport
@TakaakiIchijo
TakaakiIchijo / ConvertTimelineTextToVoiceWav.cs
Created December 9, 2023 09:17
Convert text to voice on timeline text track subtitles to wav files with A.I.VOICE for Games
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using UnityEngine;
using CsvHelper;
using UnityEditor;
using UnityEditor.Timeline;
using UnityEngine.Timeline;
@TakaakiIchijo
TakaakiIchijo / UnityNetcodeUniRxExtensions.cs
Last active January 5, 2024 03:27
A piece of UniRx extensions for Netcode for GameObjects
using System;
using Unity.Netcode;
namespace UniRx
{
public static class UnityNetcodeUniRxExtensions
{
public static IObservable<(T previousValue, T newValue)> AsObservable<T>(this NetworkVariable<T> networkVariable)
{
return Observable.FromEvent<NetworkVariable<T>.OnValueChangedDelegate, (T, T)>(
@TakaakiIchijo
TakaakiIchijo / UnityNetcodeForGameObjectsObservableTriggerExtensions.cs
Last active February 14, 2024 05:38
A piece of R3 extensions for Netcode for GameObjects
using Unity.Netcode;
namespace R3.Trigger
{
public static class UnityNetcodeR3Extensions
{
public static Observable<(T previousValue, T newValue)> AsObservable<T>(this NetworkVariable<T> networkVariable)
{
return Observable.FromEvent<NetworkVariable<T>.OnValueChangedDelegate, (T, T)>(
h => (previousValue, newValue) => h((previousValue, newValue)),
@TakaakiIchijo
TakaakiIchijo / InputSystemObservableTriggerExtensions.cs
Created May 6, 2024 02:49
UnityInputSystemR3ObservableTriggerExtensions
using UnityEngine.InputSystem;
using R3;
namespace R3.Triggers
{
public static class InputSystemObservableTriggerExtensions
{
public static Observable<InputAction.CallbackContext> AsObservable(this InputAction action) =>
Observable.FromEvent<InputAction.CallbackContext>(
h =>
@TakaakiIchijo
TakaakiIchijo / MultiPlayerPlaymodeExtensions.cs
Created April 13, 2025 13:03
Detect this player is vitual player or not in Unity Multiplayer Play Mode package
using System;
using System.Reflection;
using UnityEditor;
using UnityEngine;
namespace NetcodeExtension
{
[InitializeOnLoad]
public static class MultiPlayerPlayModeExtensions
{