Skip to content

Instantly share code, notes, and snippets.

@Naphier
Naphier / UGuiTextToTextMeshPro.cs
Created Jan 4, 2017
Unity3D Editor Tool to convert Unity GUI Text objects to Text Mesh Pro Text Objects
View UGuiTextToTextMeshPro.cs
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()
@marukun700
marukun700 / Build.cs
Created Mar 6, 2015
Unity5で選択したファイルにアセットバンドルの名前を自動で付ける
View Build.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
public class BuildScript
{
const string kAssetBundlesOutputPath = "AssetBundles";
// アセットバンドル化するフォルダの設置場所
@hecomi
hecomi / ResourecePathAsPopupDrawer.cs
Last active Sep 7, 2016
Resoureces 下のファイルを Popup で表示する PropertyDrawer
View ResourecePathAsPopupDrawer.cs
using UnityEngine;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class ResourcePathAsPopupAttribute : PropertyAttribute
{
public string resourceType;
View ReferenceResolution.cs
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 Dec 27, 2015
Transform editor rendering the original Unity's editor.
View TransformEditorWrapper.cs
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 Jun 12, 2016
Time.timeScale = 0にしたときも動く、WaitForSeconds(Unity)
View TimeUtils.cs
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)
View angry-chicken-doc.md
@darktable
darktable / UpdateXcodeProject.cs
Created Oct 5, 2012
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.
View UpdateXcodeProject.cs
/* **************************************************************************
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
You can’t perform that action at this time.