Skip to content

Instantly share code, notes, and snippets.

Avatar
😇
Focusing

sukedon sukedon

😇
Focusing
View GitHub Profile
@sukedon
sukedon / Sandbox_InAppReviewAPI.cs
Last active Oct 4, 2020
Android端末でIn-App Review APIを呼ぶサンプル
View Sandbox_InAppReviewAPI.cs
using System.Collections;
using Google.Play.Review;
using UnityEngine;
/// <summary>
/// Android端末でIn-App Review APIを呼ぶサンプル
/// </summary>
public class Sandbox_InAppReviewAPI : MonoBehaviour
{
private void Start()
@sukedon
sukedon / FontReplaceWindow.cs
Last active Jan 13, 2020
特定のフォントを別のフォントに置き換えるやつ
View FontReplaceWindow.cs
using System;
using UnityEngine;
using UnityEditor;
using UnityEngine.UI;
public class FontReplaceWindow : EditorWindow
{
private static Font _replaceBeforeFont;
private static Font _replaceAfterFont;
@sukedon
sukedon / AnimatorCustomEditor.cs
Last active Jan 29, 2019
Animatorの再生確認用ボタンを追加する拡張
View AnimatorCustomEditor.cs
using UnityEditor;
using UnityEditor.Animations;
using UnityEngine;
[CustomEditor(typeof(Animator))]
public class AnimatorCustomEditor : Editor {
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
@sukedon
sukedon / AtlasConverterModel.cs
Last active Aug 2, 2018
SpritePackerとSpriteAtlasを自動変換するスクリプト
View AtlasConverterModel.cs
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using UnityEditor;
using UnityEngine;
using UnityEngine.U2D;
public static class AtlasConverterModel
@sukedon
sukedon / RaycastTargetDisabler.cs
Last active Jun 17, 2018
RaycastTargetをオフるやつ
View RaycastTargetDisabler.cs
using UnityEditor;
using UnityEngine.UI;
public static class RaycastTargetDisabler
{
[MenuItem("GameObject/Disable RaycastTarget", false, -1)]
public static void Disable()
{
var selected = Selection.activeGameObject;
if (!selected)
@sukedon
sukedon / DoTweenExtension.cs
Created Jun 29, 2017
DoTweenの拡張クラス
View DoTweenExtension.cs
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
public static class DoTweenExtension {
public static Tweener DoLocalAdditiveMoveX(this Transform transform, float diff,float duration)
{
var current = transform.localPosition;
View TriggerEnabledBoxCollider.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Rigidbody))]
[RequireComponent(typeof(BoxCollider))]
public class TriggerEnabledBoxCollider : MonoBehaviour {
#region MonoBehaviour
void Reset()
@sukedon
sukedon / ReferenceFindResultWindow.cs
Last active Jan 26, 2017
コンポーネントからの参照を検索する(This is sample of "Reference Finder".This code is a mere part of the asset.)
View ReferenceFindResultWindow.cs
using UnityEditor;
using UnityEngine;
using System.Collections.Generic;
using System.Collections;
/// <summary>
/// 参照の検索結果を表示するEditorWindow
/// </summary>
public class ReferenceFindResultWindow : EditorWindow {
@sukedon
sukedon / StringPerformanceChecker.cs
Last active Jul 15, 2016
GameObjectの文字列プロパティパフォーマンスチェック用
View StringPerformanceChecker.cs
public class StringPerformanceChecker : MonoBehaviour {
private GameObject sample;
private int examineCount = 10000;
private string targetTag = "Hoge";
// Use this for initialization
IEnumerator Start () {
sample = new GameObject();
yield return new WaitForSeconds(5f);
@sukedon
sukedon / SamplePlayerController.cs
Created Jun 12, 2016
ジョイスティック使用サンプル
View SamplePlayerController.cs
using UnityEngine;
public class SamplePlayerController : MonoBehaviour {
[SerializeField]
private JoystickController _controller;
// Use this for initialization
void Start () {
_controller.OnDragEvent += Move;