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
| public static float SmoothClip(float input, float min, float max, float spread, float step) { | |
| float timelinePosition = (input - min) / (max - min) * (1 - spread) + spread; | |
| float signedDistanceToScrubber = timelinePosition - step; | |
| float normalizedDistanceToScrubber = signedDistanceToScrubber / spread; | |
| return Mathf.Clamp01(1 - normalizedDistanceToScrubber); | |
| } |
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; | |
| public class ShadowMeshBatcher : EditorWindow { | |
| [MenuItem("Window/Shadow Mesh Batcher")] | |
| static void Init() { | |
| // Get existing open window or if none, make a new one: |
NewerOlder