This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <summary> | |
/// 計算に関するUtilityクラス | |
/// </summary> | |
public class MathUtils | |
{ | |
/// <summary> | |
/// 点と円の内外判定を行う | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public static class RectTransformExtensions | |
{ | |
/// <summary> | |
/// 座標を保ったままPivotを変更する | |
/// </summary> | |
/// <param name="rectTransform">自身の参照</param> | |
/// <param name="targetPivot">変更先のPivot座標</param> | |
public static void SetPivotWithKeepingPosition(this RectTransform rectTransform, Vector2 targetPivot) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class DebugMover : MonoBehaviour | |
{ | |
[SerializeField] | |
Transform Head = null; | |
const float Angle = 30f; | |
const float DashSpeed = 5f; | |
const float SlowSpeed = 0.2f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
namespace UnityEngine.UI | |
{ | |
/// <summary> | |
/// 描画しない透明Imageコンポーネント | |
/// </summary> | |
[AddComponentMenu("UI/NonRenderImage", 14)] | |
public class NoRenderImage : Graphic | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine.EventSystems; | |
using UnityEngine.UI; | |
namespace UnityEngine | |
{ | |
public class ExclusiveInput | |
{ | |
public static bool IsFocusedOnInputField | |
{ | |
get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
/// <summary> | |
/// リスト中から重複せずに要素を取り出すクラス | |
/// </summary> | |
public class UniqueItemPicker<T> | |
{ | |
T[] AllItems; | |
/// <summary> | |
/// コンストラクタ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using System.Threading.Tasks; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
using UnityEngine.SceneManagement; | |
using UnityEngine.UI; | |
/// <summary> | |
/// エディタ上でのアプリ起動時に自動実行されるデバッグ用スクリプト |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine.TestTools; | |
using NUnit.Framework; | |
using System.Collections; | |
using UnityEngine.EventSystems; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
using System.Linq; | |
using UnityEngine.SceneManagement; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
public static class SaveStateExtensions | |
{ | |
public static void SaveState(this Toggle toggle, string key) | |
{ | |
key = $"{new System.Diagnostics.StackFrame(1).GetMethod().ReflectedType}+{key}"; | |
Debug.Log(key); | |
toggle.isOn = PlayerPrefs.GetInt(key, 0) == 1; |
NewerOlder