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
/* | |
* Setup: | |
* Create an empty GameObject and add the EventManager script to it. | |
* Create custom event classes that extend the CustomEvent. | |
* | |
* Restrictions & Tips: | |
* DO NOT add event listeners in the Awake() method! | |
* This is used by the EventManager to initialize. | |
* Change this class' Execution Order to before default time if you need to work around this. | |
* Use the Start() method to setup your events. |
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
// Real-time Realistic Ocean Lighting using Seamless Transitions from Geometry to BRDF | |
// Copyright (c) 2009 INRIA | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions | |
// are met: | |
// 1. Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. |
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 MoveTransform : IActivated { | |
public Transform objectMoved; | |
public Movements activatedPos, deactivatedPos; | |
[System.Serializable] | |
public class Movements { |
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; | |
[CustomEditor (typeof(Trigger))] | |
[CanEditMultipleObjects()] | |
public class TriggerEditor : Editor | |
{ | |
private SerializedObject obj; | |
private SerializedProperty radius; |
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
// C# built-in event system used in Unity3D | |
// | |
// Author: Bartek Drozdz | |
// Reference: http://www.everyday3d.com/blog/index.php/2010/10/04/c-events-and-unity3d/ | |
using UnityEngine; | |
public class EventDispatcher : MonoBehaviour | |
{ | |
public delegate void EventHandler(GameObject e); |
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 "Hidden/Vignetting" { | |
Properties { | |
_MainTex ("Base", 2D) = "white" {} | |
_VignetteTex ("Vignette", 2D) = "white" {} | |
_GlitchTex ("Glitch", 2D) = "white" {} | |
} | |
CGINCLUDE | |
#pragma target 3.0 |
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 "JaaVuori Gradiend Bumped" { | |
// JaaVuori is Iceberg in finnish | |
// | |
// I use finnish in variable, class etc names, maybe bad habit but it helps me to find my "own" code and stuff faster. | |
// |
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
<canvas id="stage"></canvas> |
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; | |
public class Recorder : EditorWindow { | |
string myString = "FileNameHere"; | |
string status = "Idle"; | |
string recordButton = "Record"; | |
int state = 0; | |
int fps = 24; | |
int[] fpsOptions = new int[] {12,24,30,60}; |
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
import System.Collections.Generic; | |
import System.Linq; | |
import System; | |
class Message | |
{ | |
//Holds the messages being displayed | |
static var messages : List.<Message> = new List.<Message>(); | |
//Holds the messages waiting for display | |
static var queue : List.<Message> = new List.<Message>(); |
OlderNewer