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
| #!/bin/bash | |
| # This script installs BetterDiscord for the Flatpak version of Discord on Linux. | |
| # Written by Rob Chiocchio on 04/30/2024 | |
| ### Variables ### | |
| # Color variables | |
| NO_COLOR="\033[0m" | |
| COLOR="\033[0;36m" # Cyan | |
| # Flatpak Discord AppID and download URL for latest BetterDiscord Linux AppImage release |
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 "Pristine Grid" | |
| { | |
| Properties | |
| { | |
| [KeywordEnum(MeshUV, WorldX, WorldY, WorldZ)] _UVMode ("UV Mode", Float) = 2.0 | |
| _GridScale ("Grid Scale", Float) = 1.0 | |
| _LineWidthX ("Line Width X", Range(0,1.0)) = 0.01 | |
| _LineWidthY ("Line Width Y", Range(0,1.0)) = 0.01 |
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 UnityEngine; | |
| using UnityEngine.UI; | |
| // Restrict raycasting to a sprite mesh shape | |
| // Could use Image.alphaHitTestMinimumThreshold to mask but that requires read/write images which can't be packed | |
| [RequireComponent(typeof(Image))] | |
| public class SpriteMeshRaycastFilter : MonoBehaviour, ICanvasRaycastFilter { | |
| private RectTransform rectTransform; |
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 UnityEngine; | |
| using UnityObject = UnityEngine.Object; | |
| namespace Ludiq | |
| { | |
| public static class UndoUtility | |
| { | |
| private static void RecordObject(UnityObject uo, string name) | |
| { |
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
| // Non Editor code | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public abstract class TrafficLightAttribute : PropertyAttribute | |
| { | |
| public bool DrawLabel = true; | |
| public string CustomLabel; | |
| public bool AlsoDrawDefault; |
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; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Reflection; | |
| public class EditorCoroutineRunner | |
| { | |
| [MenuItem("Window/Lotte's Coroutine Runner: Demo")] |
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
| /* | |
| Basic Sprite Shader for aligning pixel art to the same grid, based on the Unity Sprite Shader. | |
| Create one Material where you assign the same Pixels Per Unit value you use on your imported Sprites, | |
| then reuse this Material on all appropriate Sprite Renderers. | |
| (You can use Shader.SetGlobalFloat to set that Pixels Per Unit value for all your shaders: | |
| https://docs.unity3d.com/ScriptReference/Shader.SetGlobalFloat.html) | |
| This is not for scaled or rotated artwork. If you need those features, look at low res render textures. | |
| Use this however you want. |
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 UnityEngine; | |
| using System; | |
| using System.Collections; | |
| /* | |
| Usage: | |
| using (new UndoStack("Batch Changes")) { | |
| // Make some changes using RecordObject or whatever... |
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
| /* | |
| * Copyright (c) 2013 Calvin Rien | |
| * | |
| * Based on the JSON parser by Patrick van Bergen | |
| * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
| * | |
| * Simplified it so that it doesn't throw exceptions | |
| * and can be used in Unity iPhone with maximum code stripping. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining |