Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using UnityEngine;
public class Example : MonoBehaviour
{
private IEnumerator Start()
{
Screen.SetResolution( 640, 480, true );
yield return null;
using System.Collections;
using Kogane;
using UnityEngine;
using UnityEngine.Networking;
public class Example : MonoBehaviour
{
private IEnumerator Start()
{
const string url =
// ReSharper disable UnusedMember.Global
namespace MyProject
{
/// <summary>
/// 購入エラーコード
/// https://sdk.revenuecat.com/android/4.6.1/public/com.revenuecat.purchases/-purchases-error-code/index.html
/// </summary>
public enum PurchasesErrorCode
{
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
namespace Kogane
{
/// <summary>
/// Purchases 型の拡張メソッド
/// </summary>
public static class PurchasesExtensionMethods
{
using UnityEngine;
namespace Kogane
{
/// <summary>
/// Android 端末の「設定 > システム > 日付と時刻」の「日時を自動的に設定」と「タイムゾーンを自動的に設定」の設定値を取得できるクラス
/// </summary>
public static class AndroidDeviceDateTimeChecker
{
//================================================================================
#if UNITY_EDITOR_OSX
#else
using UnityEditor;
using UnityEditor.ShortcutManagement;
using UnityEngine;
namespace Kogane.Internal
{
/// <summary>
using System.Runtime.InteropServices;
using UnityEditor;
internal static class DarkMode
{
[InitializeOnLoadMethod]
[DllImport( "【ここに UnityEditorDarkMode.dll のパスを書く】", EntryPoint = "DllMain" )]
public static extern void DllMain();
}
using System;
using UnityEditor;
using UnityEngine;
namespace Kogane.Internal
{
/// <summary>
/// JetBrains Rider のように Ctrl + Alt + Shift + ↑↓ でゲームオブジェクトの順番を移動できるエディタ拡張
/// </summary>
[InitializeOnLoad]
using UnityEditor;
using UnityEditor.Build.Reporting;
public class Example
{
[MenuItem( "Tools/Hoge" )]
private static void Hoge()
{
var latestReport = BuildReport.GetLatestReport();
using System.Linq;
using UnityEditor;
[InitializeOnLoad]
public static class Example
{
static Example()
{
BuildPlayerWindow.RegisterGetBuildPlayerOptionsHandler( OnGetBuildPlayerOptions );
}