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 UnityEditor; | |
public static class RenameByAttachedImage | |
{ | |
/// <summary> | |
/// Called from the right-click context menu in the Hierarchy when objects are selected | |
/// </summary> | |
[MenuItem("GameObject/Rename By Attached Image", false, 0)] |
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
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
using UnityEngine; | |
[AddComponentMenu("Comment")] | |
public class CommentComponent : MonoBehaviour | |
{ | |
#if UNITY_EDITOR | |
[SerializeField] |
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
/* | |
Based on the Anti-aliased Euclidean distance transform described by Stefan Gustavson and | |
Robin Strand. For further information, see https://contourtextures.wikidot.com/ and | |
https://web.archive.org/web/20220503051209/https://weber.itn.liu.se/~stegu/edtaa/ | |
The algorithm is an adapted version of Stefan Gustavson's code, it inherits the copyright | |
statement below, which applies to this file only. | |
The rewrite with Unity Burst support makes the execution 40 times faster by default, | |
and 75 times faster if the passed in textures are both of type TextureFormat.RGBAFloat. |
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; | |
// MB: Simple procedural audio generator. | |
// Generates a pure sine wave/tone at a given frequency. | |
public class SimpleAudioGenerator : MonoBehaviour | |
{ | |
int outputSampleRate; | |
const float TAU = Mathf.PI * 2.0f; |
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
/////////////////////////////////////////////////////////////////////////////// | |
// ABOUT: A unity Shader .cginc to draw numbers in the fragment shader | |
// AUTHOR: Freya Holmér | |
// LICENSE: Use for whatever, commercial or otherwise! | |
// Don't hold me liable for issues though | |
// But pls credit me if it works super well <3 | |
// LIMITATIONS: There's some precision loss beyond 3 decimal places | |
// CONTRIBUTORS: yes please! if you know a more precise way to get | |
// decimal digits then pls lemme know! | |
// GetDecimalSymbolAt() could use some more love/precision |
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.Collections.Generic; | |
using System.IO; | |
using System.Threading.Tasks; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
/// <summary> | |
/// Provides functionality for screenshotting full editor windows, and the inspector in particular |
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.IO; | |
using System; | |
public static class RenderTextureExtensions | |
{ | |
private static DefaultDictionary<RenderTexture, Texture2D> _cachedTextures = new DefaultDictionary<RenderTexture, Texture2D>(); | |
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
import os | |
import sys | |
import random | |
from time import sleep | |
try: | |
from playwright_recaptcha import recaptchav2 | |
from playwright.sync_api import Playwright, sync_playwright, expect | |
except (ImportError, ModuleNotFoundError): | |
os.system( |
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.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Threading.Tasks; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine; | |
namespace Naninovel |
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; | |
[RequireComponent(typeof(SpriteRenderer))] | |
public class SpriteWrapper : MonoBehaviour { | |
[Header("Sprite Wrapper")] | |
[Tooltip("Should sprite be wrapped when reaching the edge of the screen?"), SerializeField] | |
private bool wrap; |
NewerOlder