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
// Angle Limitation based off https://forum.unity.com/threads/projector-shader-with-angle-limitation.406876/ | |
Shader "Projector/Preview" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_ShadowTex ("Cookie", 2D) = "" {} | |
_FalloffTex ("FallOff", 2D) = "" {} | |
} | |
Subshader { |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[CreateAssetMenu(menuName = "Definitions/Target Filter")] | |
public class TargetFilter : ScriptableObject | |
{ | |
// Target filters work by taking a set of potential targets and then by applying | |
// a series of filters in turn to narrow down your targets until you're left | |
// with who you want to target. |
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 UnityEngine.Animations; | |
using UnityEngine.Playables; | |
[RequireComponent(typeof(Animator))] | |
public class AnimationController : MonoBehaviour | |
{ | |
const string ANIMATION = "Animation"; | |
PlayableGraph _playableGraph; |
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; | |
[RequireComponent(typeof(MeshRenderer))] | |
public class ScrollingMaterial : MonoBehaviour | |
{ | |
public float Speed; | |
float _uvFactor; | |
Material _materialToScroll; |
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 DebugTimeScaler : MonoBehaviour | |
{ | |
#if UNITY_EDITOR | |
void Update() | |
{ | |
if (Input.GetKeyDown(KeyCode.LeftBracket)) | |
{ | |
Time.timeScale /= 2f; |
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 System.IO; | |
using System.Linq; | |
namespace CountingInversions | |
{ | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ |