View EditorCameraZoomWithScrollWheel.cs
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; |
View UIToggler.cs
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 UnityEditor; | |
using UnityEngine; | |
public class UIToggler | |
{ | |
private const int UI_LAYER = 1 << 5; | |
[InitializeOnLoadMethod] | |
private static void Init() | |
{ |
View ScreenshotCapture.cs
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 ); |
View SimpleArchive.cs
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 |
View TimeManager.cs
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 UnityEngine; | |
using UnityEngine.SceneManagement; | |
public static class TimeManager | |
{ | |
private static List<object> pauseHolders = new List<object>(); | |
public static event System.Action<bool> OnPauseStateChanged = null; | |
public static event System.Action<float> OnTimeScaleChanged = null; |
View DirectoryComparer.cs
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
#define COMPARE_FILE_CONTENTS | |
#if COMPARE_FILE_CONTENTS | |
#define USE_THREADS | |
#endif | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
#if USE_THREADS | |
using System.Threading; |
View PluginJARExtractor.cs
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; |
View UnlitWithShadows.shader
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
Shader "Unlit/Texture with Shadows" | |
{ | |
Properties | |
{ | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Texture", 2D) = "white" | |
} | |
SubShader | |
{ | |
Tags { "RenderType"="Opaque" "Queue"="Geometry" } |
View ScriptedAnimations.cs
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 UnityEngine; | |
using UnityEngine.SceneManagement; | |
namespace ScriptedAnim | |
{ | |
// Hide from Add Component menu | |
[AddComponentMenu( "" )] | |
public class ScriptedAnimations : MonoBehaviour | |
{ |
View SerializedPropertyRawValueGetter.cs
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 ) | |
{ |
OlderNewer