コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

2023-03-29から1日間の記事一覧

【Unity】Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.

概要 Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s) at System.…

【Unity】Android 端末で機内モードかどうか確認する方法

概要 using UnityEngine; namespace Kogane { public static class AirplaneModeChecker { public static bool IsAirplaneMode { get { #if UNITY_EDITOR || UNITY_ANDROID if ( Application.isEditor ) return false; using var unityPlayer = new AndroidJ…