Skip to content

Instantly share code, notes, and snippets.

@Naphier
Naphier / UGuiTextToTextMeshPro.cs
Created January 4, 2017 15:23
Unity3D Editor Tool to convert Unity GUI Text objects to Text Mesh Pro Text Objects
using UnityEngine;
using UnityEditor;
using UnityEngine.UI;
using TMPro;
using TMPro.EditorUtilities;
public class UGuiTextToTextMeshPro : Editor
{
[MenuItem("GameObject/UI/Convert To Text Mesh Pro", false, 4000)]
static void DoIt()
@marukun318
marukun318 / Build.cs
Created March 6, 2015 07:02
Unity5で選択したファイルにアセットバンドルの名前を自動で付ける
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
public class BuildScript
{
const string kAssetBundlesOutputPath = "AssetBundles";
// アセットバンドル化するフォルダの設置場所
@hecomi
hecomi / ResourecePathAsPopupDrawer.cs
Last active September 7, 2016 03:03
Resoureces 下のファイルを Popup で表示する PropertyDrawer
using UnityEngine;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class ResourcePathAsPopupAttribute : PropertyAttribute
{
public string resourceType;
using UnityEngine.EventSystems;
namespace UnityEngine.UI
{
[RequireComponent (typeof (Canvas))]
[ExecuteInEditMode]
[AddComponentMenu("Layout/Reference Resolution", 101)]
public class ReferenceResolution : UIBehaviour
{
@cician
cician / TransformEditorWrapper.cs
Last active December 27, 2015 17:18
Transform editor rendering the original Unity's editor.
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(Transform))]
public class TransformEditorWrapper : Editor {
Editor transformEditor;
void OnEnable() {
Transform transform = target as Transform;
System.Type t = typeof(UnityEditor.EditorApplication).Assembly.GetType("UnityEditor.TransformInspector");
@uranuno
uranuno / TimeUtils.cs
Last active June 12, 2016 15:54
Time.timeScale = 0にしたときも動く、WaitForSeconds(Unity)
using UnityEngine;
using System.Collections;
public class TimeUtils : MonoBehaviour
{
//TimeScaleに関わらず、指定の秒数まつ
public static IEnumerator WaitForSecondsIgnoreTimeScale(float time)
{
float targetTime = Time.realtimeSinceStartup + time;
while(Time.realtimeSinceStartup < targetTime)
@darktable
darktable / UpdateXcodeProject.cs
Created October 5, 2012 16:57
Unity3D: Post-process script that copies the xcode build output to another directory. Used for updating a heavily modified Xcode project without stomping on changes to AppController.mm, Info.plist, etc.
/* **************************************************************************
Copyright 2012 Calvin Rien
(http://the.darktable.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0