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
| /* | |
| * This work is free. You can redistribute it and/or modify it under the | |
| * terms of the Do What The Fuck You Want To Public License, Version 2, | |
| * as published by Sam Hocevar. See the COPYING file for more details. | |
| */ | |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { |
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; | |
| public static class ConfigurableJointExtensions { | |
| /// <summary> | |
| /// Sets a joint's targetRotation to match a given local rotation. | |
| /// The joint transform's local rotation must be cached on Start and passed into this method. | |
| /// </summary> | |
| public static void SetTargetRotationLocal (this ConfigurableJoint joint, Quaternion targetLocalRotation, Quaternion startLocalRotation) | |
| { | |
| if (joint.configuredInWorldSpace) { |
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.Reflection; | |
| [CustomEditor (typeof(MonoBehaviour),true)] | |
| [CanEditMultipleObjects] | |
| public class MonoBehaviourInspector : Editor | |
| { |
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
| static void drawString(string text, Vector3 worldPos, Color? colour = null) { | |
| UnityEditor.Handles.BeginGUI(); | |
| if (colour.HasValue) GUI.color = colour.Value; | |
| var view = UnityEditor.SceneView.currentDrawingSceneView; | |
| Vector3 screenPos = view.camera.WorldToScreenPoint(worldPos); | |
| Vector2 size = GUI.skin.label.CalcSize(new GUIContent(text)); | |
| GUI.Label(new Rect(screenPos.x - (size.x / 2), -screenPos.y + view.position.height + 4, size.x, size.y), text); | |
| UnityEditor.Handles.EndGUI(); | |
| } |
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 "Mattaz/LIC" { | |
| Properties { | |
| _VectorFieldTex ("Vector Field Texture", 2D) = "white" {} | |
| _NoiseTex ("Noise Texture", 2D) = "white" {} | |
| _FlowLength ("Flow Length", int) = 10 | |
| } | |
| SubShader { | |
| Tags { "RenderType"="Opaque" } | |
| LOD 200 |
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; | |
| using System.Collections.Generic; | |
| [RequireComponent (typeof(MeshRenderer))] | |
| [RequireComponent (typeof(MeshFilter))] | |
| public class IsoSurface : MonoBehaviour | |
| { | |
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 Example : MonoBehaviour | |
| { | |
| public ExampleClass example; | |
| void Start() {} | |
| void Update() {} | |
| } |
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; | |
| [RequireComponent (typeof(Rigidbody))] | |
| public class PhysicsFollower : MonoBehaviour | |
| { | |
| public Transform target; | |
| Rigidbody rb; |
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 UnityEngine.UI; | |
| using System.Collections.Generic; | |
| [RequireComponent(typeof(CanvasRenderer))] | |
| public class SimpleGraphic : MaskableGraphic //could extend Graphic if you don't need it maskable | |
| { | |
| public Texture texture; | |
| public override Texture mainTexture |
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
| // Developed by Tom Kail at Inkle | |
| // Released under the MIT Licence as held at https://opensource.org/licenses/MIT | |
| // Must be placed within a folder named "Editor" | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using UnityEditor; | |
| using UnityEngine; |
OlderNewer