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 OpenTK; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Events; | |
using UnityEngine.EventSystems; | |
using UnityEngine.Profiling; | |
using System.Linq; | |
using UnityEngine.UI; |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System; | |
public static class ChangeNotifier | |
{ | |
private static Dictionary<Type, List<WeakReference>> listeners = new Dictionary<Type, List<WeakReference>>(); | |
private static List<WeakReference> checkersToRemove = new List<WeakReference>(); |
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; | |
using System.Collections; | |
public class ChangeChecker | |
{ | |
private bool isUpdated = false; | |
public bool IsUpdated | |
{ | |
get |
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; | |
using System.Collections; | |
using UnityEditor; | |
public class WebGL : MonoBehaviour | |
{ | |
[MenuItem("Tools/SetWebGLParameter")] | |
public static void SetWebGLParameter() | |
{ | |
PlayerSettings.SetPropertyString("emscriptenArgs", "-s ALLOW_MEMORY_GROWTH=1 -s DEMANGLE_SUPPORT=1 -s ASSERTIONS=2", BuildTargetGroup.WebGL); |
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
private bool TryAgainIfException(Action action, int attemts = 10) | |
{ | |
while (attemts > 0) | |
{ | |
try | |
{ | |
action(); | |
return true; | |
} | |
catch (Exception e) |
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
void DrawLine(Texture2D tex, int x1, int y1, int x2, int y2, Color col) | |
{ | |
int dy = (int)(y1-y0); | |
int dx = (int)(x1-x0); | |
int stepx, stepy; | |
if (dy < 0) {dy = -dy; stepy = -1;} | |
else {stepy = 1;} | |
if (dx < 0) {dx = -dx; stepx = -1;} | |
else {stepx = 1;} |
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
XCOPY "$(ProjectDir)osmosis-latest" "$(TargetDir)osmosis-latest" /h/i/c/k/e/r/y |
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 PinchZoom : MonoBehaviour | |
{ | |
public float perspectiveZoomSpeed = 0.5f; // The rate of change of the field of view in perspective mode. | |
public float orthoZoomSpeed = 0.5f; // The rate of change of the orthographic size in orthographic mode. | |
void Update() | |
{ |
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
Update-Package –reinstall |