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
GET /__utm.gif?utmwv=1.3&utmn=1102687404&utmcs=ISO-8859-1&utmsr=1920x1080&utmsc=24-bit&utmul=en&utmje=0&utmfl=-&utmdt=Unity%20Editor&utmhn=editor%2Eanalytics%2Eunity3d%2Ecom&utmr=%2D&utmt=event&utme=5%28Compiler%2Aerror%20CS0619%2A%60UnityEngine%2EAudioSource%2ErolloffFactor%27%20is%20obsolete%3A%20%60rolloffFactor%20is%20not%20supported%20anymore%2E%20Use%20min%2D%2C%20maxDistance%20and%20rolloffMode%20instead%2E%27%29%281%29%3A&utmac=UA-16068464-6&utmcc=__utma%3D1.1790855761.1301922981.1302003006.1302086526.8%3B%2B__utmz%3D1.1302086526.8.1.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B HTTP/1.1 | |
User-Agent: UnityEditor/3.3.0.63135 (Macintosh; U; Intel Mac OS X 10.6; en) | |
Host: www.google-analytics.com | |
Accept: */* |
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
Vector3 randomVector = Random.onUnitSphere; | |
Plane plane = new Plane(randomVector, start, end); | |
float breakPoint = Random.value; | |
Vector3 candidatePoint = plane.normal * Random.value * maxBreakDistanceFromPath + (end - start) * breakPoint + start; | |
return candidatePoint; |
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; | |
public class RandomPointOnMesh : MonoBehaviour | |
{ | |
public MeshCollider lookupCollider; | |
public bool bangGetPoint; | |
private Vector3 randomPoint; |
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
Vector3 parallaxCenter = background.parallaxCenter.position; | |
Vector3 mainOffset = mainCamera.position - parallaxCenter; | |
cam1.position = parallaxCenter + Vector3.Scale(mainOffset, cam1Factor); | |
(Scale is component-wise multiplication) |
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 "Sunspots" { | |
Properties { | |
_MainTex ("Texture1 (RGB)", 2D) = "white" {} | |
_Color ("Main Color", Color) = (1,1,1,1) | |
} | |
Category { | |
Tags {"RenderType"="Opaque" "Queue"="Transparent"} | |
Lighting Off | |
BindChannels { |
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 UnityEditor; | |
using UnityEngine; | |
using System.Collections; | |
public class MakeGif : EditorWindow { | |
public string folder = "ScreenshotFolder"; | |
public int frameRate = 25; |
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
take a file.gif | |
gifsicle.exe -b -O3 file.gif | |
"C:\Program Files (x86)\IrfanView\i_view32.exe" file.gif /extract=("\extracted",gif) | |
gifsicle.exe extracted/file_frame_*.gif > file.gif | |
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; | |
public class DontDestroyOnLoad : MonoBehaviour { | |
void OnEnable() | |
{ | |
DontDestroyOnLoad(gameObject); | |
} | |
} |
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.Linq; | |
using UnityEngine; | |
using System; | |
using System.Collections.Generic; | |
using Debug = UnityEngine.Debug; | |
using Object = UnityEngine.Object; | |
using Random = UnityEngine.Random; | |
public static class Extensions | |
{ |
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
float3 Hue(float H) | |
{ | |
float R = abs(H * 6 - 3) - 1; | |
float G = 2 - abs(H * 6 - 2); | |
float B = 2 - abs(H * 6 - 4); | |
return saturate(float3(R,G,B)); | |
} | |
float3 HSVtoRGB(in float3 HSV) |
OlderNewer