Skip to content

Instantly share code, notes, and snippets.

View JT5D's full-sized avatar
💭
Multiversing...

JT5D JT5D

💭
Multiversing...
View GitHub Profile
@JT5D
JT5D / Melter.cs
Last active August 29, 2015 14:23 — forked from unitycoder/Melter.cs
using UnityEngine;
using System.Collections;
public class Melter : MonoBehaviour {
public Transform heatPoint;
public bool restoreColor=false;
void Start () {
var mesh = GetComponent<MeshFilter>().mesh;
foreach (Transform child in transform)
{
Debug.Log(child.name);
}
var stopwatch = new System.Diagnostics.Stopwatch();
stopwatch.Start();
// your function here..
stopwatch.Stop();
//Debug.Log("Timer: " + stopwatch.Elapsed);
Debug.Log("Timer: " + stopwatch.ElapsedMilliseconds);
stopwatch.Reset();
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class GetSliderValue : MonoBehaviour {
public YourScript yourScript;
void Awake ()
{
using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour {
public LayerMask targetLayer;
Vector3 prevPos;
void Start () {
@JT5D
JT5D / ClearPrefs
Last active August 29, 2015 14:23 — forked from unitycoder/ClearPrefs
using UnityEngine;
using System.Collections;
using UnityEditor;
public class ClearPrefs : MonoBehaviour {
// otherwise adjusting player settings resolution wont do anything..
// http://answers.unity3d.com/questions/516517/why-doesnt-standalone-build-resolution-settings-af.html
[MenuItem("Edit/Reset Playerprefs")]
using UnityEngine;
using System.Collections;
// modified from : http://docs.unity3d.com/ScriptReference/Mesh-uv.html
public class PlanarUVMap : MonoBehaviour {
public bool flipX=false;
void Start()
@JT5D
JT5D / Remap.cs
Last active August 29, 2015 14:23 — forked from unitycoder/Remap.cs
float Remap(float source, float sourceFrom, float sourceTo, float targetFrom, float targetTo)
{
return targetFrom + (source-sourceFrom)*(targetTo-targetFrom)/(sourceTo-sourceFrom);
}
using UnityEngine;
// http://answers.unity3d.com/questions/816861/46-ui-image-is-capturing-clicks-how-to-prevent.html
public class UIIgnoreRaycast : MonoBehaviour, ICanvasRaycastFilter
{
public bool IsRaycastLocationValid(Vector2 screenPoint, Camera eventCamera)
{
return false;
}
// ==UserScript==
// @name AssetStoreBuddy
// @namespace unitycoder.com
// @include https://www.assetstore.unity3d.com/en/#!/search/*
// @version 1
// @grant none
// ==/UserScript==
// currently need to press F5 to run these