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
| /// <summary> | |
| /// Modes that specify how the control points affect a Bezier curve. | |
| /// </summary> | |
| public enum BezierControlPointMode | |
| { | |
| Aligned, | |
| Free, | |
| Mirrored, | |
| } |
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.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text.RegularExpressions; | |
| using UnityEditor; | |
| using UnityEditor.AddressableAssets.Build; | |
| using UnityEditor.AddressableAssets.Build.AnalyzeRules; | |
| using UnityEditor.AddressableAssets.Settings; | |
| using UnityEngine; |
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.XR.Interaction.Toolkit; | |
| public class OffsetGrabInteractable : XRGrabInteractable | |
| { | |
| Vector3 interactorPosition; | |
| Quaternion interactorRotation; | |
| protected override void OnSelectEntered(XRBaseInteractor interactor) | |
| { |
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.VFX; | |
| [ExecuteInEditMode] | |
| [RequireComponent(typeof(VisualEffect))] | |
| public class VisualEffectPlayRate : MonoBehaviour | |
| { | |
| [SerializeField, Range(0, 10)] float playRate = 1f; | |
| VisualEffect vfx; |
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 UnityEditor; | |
| using UnityEditor.IMGUI.Controls; | |
| using UnityEngine; | |
| public class RotateAroundCircle : MonoBehaviour | |
| { | |
| public Color color = Color.cyan; | |
| public Vector3 pivot; | |
| } |
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; | |
| using System.Linq; | |
| using System.Collections.Generic; | |
| public static class Pathfinding | |
| { | |
| /// <summary> | |
| /// A* implementation. Finds a path from start to goal. | |
| /// </summary> | |
| /// <param name="start">Where to begin.</param> |
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
| /// <summary> | |
| /// Vertically flips a render texture in-place. | |
| /// </summary> | |
| /// <param name="target">Render texture to flip.</param> | |
| public static void VerticallyFlipRenderTexture(RenderTexture target) | |
| { | |
| var temp = RenderTexture.GetTemporary(target.descriptor); | |
| Graphics.Blit(target, temp, new Vector2(1, -1), new Vector2(0, 1)); | |
| Graphics.Blit(temp, target); | |
| RenderTexture.ReleaseTemporary(temp); |
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; | |
| using System.Text.RegularExpressions; | |
| using UnityEngine; | |
| /// <summary> | |
| /// Holds the result of parsing the ytInitialPlayerResponse JSON from a YouTube page. | |
| /// </summary> | |
| /// <remarks> | |
| /// This is an incomplete list of fields in ytInitialPlayerResponse. | |
| /// The full object contains many more, but we only care about a few. |
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
| $wshell = New-Object -ComObject WScript.Shell | |
| while ($true) { | |
| Write-Output "$(Get-Date) Toggling numlock" | |
| $whell.SendKeys('{NUMLOCK}') | |
| Start-Sleep -Seconds 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
| #!/usr/bin/env bash | |
| for filename in "$@"; do | |
| base=$(basename "$filename" .mov) | |
| mkdir "$base" | |
| ffmpeg -i "$filename" "$base/$base-%03d.png" | |
| done |