Skip to content

Instantly share code, notes, and snippets.

View TsubameUnity's full-sized avatar

Tsubame TsubameUnity

View GitHub Profile
@TsubameUnity
TsubameUnity / SequentialImport.cs
Last active July 30, 2019 03:25
AssetDatabase.ImportPackageを連続で呼び出す
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System;
public class ImportPackageList : ScriptableSingleton<ImportPackageList>
{
public List<string> list;
}
@TsubameUnity
TsubameUnity / EditorHeaderHideFlags.cs
Last active February 7, 2020 06:23
GameObjectのヘッダーに情報を追加できるようにするエディタ拡張。
using System;
using System.Reflection;
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(GameObject))]
public class EditorHeaderHideFlags : Editor
{
Editor defaultCustomEditor;
@TsubameUnity
TsubameUnity / EditorMultiDisplayDrawer.cs
Created February 12, 2020 07:29
UnityEditor上で、Camera.Renderを使用するパターンでの、マルチディスプレイ対応スクリプト
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
public class EditorMultiDisplayDrawer
{
#if UNITY_EDITOR
Type type;
@TsubameUnity
TsubameUnity / RuntimePrefabUpdate.cs
Last active February 21, 2020 04:57
Prefabに付けておくと、ランタイム時にシーン変更・ゲーム終了時に自動でPrefabを更新する機能
using UnityEngine;
public class RuntimePrefabUpdate : MonoBehaviour
{
#if UNITY_EDITOR
UnityEngine.SceneManagement.Scene scene;
void Start()
{
scene = gameObject.scene;