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
#if UNITY_2019_1_OR_NEWER | |
using UnityEditor; | |
using UnityEngine; | |
[InitializeOnLoad] | |
public class EditorCameraZoomWithScrollWheel | |
{ | |
private const float CAMERA_SPEED = -0.25f; | |
private static bool rmbDown = false; |
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; | |
using System.IO; | |
using UnityEngine; | |
public static class ScreenshotCapture | |
{ | |
// Saves the screenshot to desktop | |
public static void Capture() | |
{ | |
string saveDirectory = Environment.GetFolderPath( Environment.SpecialFolder.DesktopDirectory ); |
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
// Uses ZipStorer (c) 2016 Jaime Olivares [v3.4.0; August 4, 2017] (MIT-License: https://github.com/jaime-olivares/zipstorer/blob/master/LICENSE.md) | |
using System.Collections.Generic; | |
using System.Text; | |
using System; | |
using System.IO; | |
using System.IO.Compression; | |
using UnityEditor; | |
using UnityEngine; |
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; | |
using System.Collections; | |
using System.Reflection; | |
using UnityEditor; | |
// Credit: http://answers.unity.com/answers/425602/view.html (I've only slightly modified the code) | |
public static class SerializedPropertyRawValueGetter | |
{ | |
public static object GetRawValue( this SerializedProperty property ) | |
{ |
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
var checkDocument = function( doc ) | |
{ | |
var frames = doc.getElementsByTagName( "iframe" ); | |
for( var i = 0, l = frames.length; i < l; i++ ) | |
checkIframe( frames[i] ); | |
}; | |
var checkIframe = function(iframe) | |
{ | |
if( iframe.src.indexOf( "https://www.youtube" ) == 0 ) |
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.Diagnostics; | |
using System.IO; | |
using UnityEditor; | |
using UnityEditor.Callbacks; | |
using UnityEngine; | |
public class OpenShaderInNotepad | |
{ | |
private const string NPP1 = @"C:\Program Files\Notepad++\notepad++.exe"; | |
private const string NPP2 = @"C:\Program Files (x86)\Notepad++\notepad++.exe"; |
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; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
public class SingleColorTextureDetector : EditorWindow, IHasCustomMenu | |
{ |
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; | |
using UnityEditor; | |
using UnityEngine; | |
public static class EmptyParentCreator | |
{ | |
[MenuItem( "GameObject/Create Empty Parent", priority = 0 )] | |
private static void CreateEmptyParent( MenuCommand command ) | |
{ | |
// This happens when this button is clicked via hierarchy's right click context menu |
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 DeviceOrientationManager : MonoBehaviour | |
{ | |
private const float ORIENTATION_CHECK_INTERVAL = 0.5f; | |
private float nextOrientationCheckTime; | |
private static ScreenOrientation m_currentOrientation; | |
public static ScreenOrientation CurrentOrientation |
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; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
namespace SimplePatchToolCore | |
{ | |
public class SimpleArchive | |
{ | |
// Archive Structure |
OlderNewer