This file contains hidden or 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; | |
class Test | |
{ | |
static int Main(String[] argv) | |
{ | |
var names = Enum.GetNames(typeof(Environment.SpecialFolder)); | |
var values = Enum.GetValues(typeof(Environment.SpecialFolder)); | |
for(int i = 0; i < names.Length; ++i) | |
Console.WriteLine("{0} {1}: {2}", (int)values.GetValue(i), names[i], Environment.GetFolderPath((Environment.SpecialFolder)values.GetValue(i))); |
This file contains hidden or 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 Rain : MonoBehaviour | |
{ | |
[SerializeField] protected ParticleEmitter m_ParticleEmitter; | |
[SerializeField] protected Splashes m_Splashes; | |
[SerializeField] protected float m_Width = 10.0f; | |
This file contains hidden or 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 SpaceDust : MonoBehaviour | |
{ | |
public float m_Size = 1.0f; // Halfwidth of the particle volume | |
public float m_MinBrightness = 0.2f; | |
public float m_MaxBrightness = 1.0f; | |
protected ParticleEmitter m_ParticleEmitter; |
This file contains hidden or 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 ReflectiveBeam : MonoBehaviour | |
{ | |
[SerializeField] protected LineRenderer m_LineRenderer; | |
[SerializeField] protected float m_MaximumDistance = 10.0f; | |
[SerializeField] protected int m_NumBounces = 10; | |
This file contains hidden or 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 UnityEditor; | |
using System.Collections; | |
using System.IO; | |
public class EditorActions | |
{ | |
[MenuItem ("Toolkit/Tags and Layers/Update Layer.cs")] | |
static void UpdateLayerConstants() | |
{ |
This file contains hidden or 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.Linq; | |
[AddComponentMenu("Paths/Path")] | |
public class Path : MonoBehaviour, IEnumerable<Path.Segment> | |
{ | |
[System.Serializable] | |
public class Waypoint : System.ICloneable |
This file contains hidden or 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 UnityEditor; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
[CustomEditor(typeof(Path))] | |
public class PathEditor : Editor | |
{ | |
protected Path m_Path; |
This file contains hidden or 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; | |
// This component can emit particles into one or more ParticleEmitters. As several ParticleInjectors can emit to a shared set of | |
// ParticleEmitters, this allows you to save draw calls by having fewer separate particle systems. | |
// | |
// Note that when a ParticleEmitter's Simulate In World Space checkbox is off, it's OK to attach ParticleInjectors to separate | |
// hierarchies and move them independently. If it's turned on, the ParticleInjectors really need to be children of the emitter | |
// for the emission behaviour to make sense. |
This file contains hidden or 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 StickOnContact : MonoBehaviour | |
{ | |
public Collider m_Contactor; | |
void OnCollisionEnter(Collision collisionInfo) | |
{ | |
foreach(ContactPoint contact in collisionInfo.contacts) |
This file contains hidden or 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 "Mine/Spatial Cutoff Test" | |
{ | |
Properties | |
{ | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_Cutoff ("Cutoff", Float) = 1 | |
} | |
SubShader |