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; | |
using TMPro; | |
using UnityEngine; | |
public class DialogPlayer : MonoBehaviour | |
{ | |
public Dialog[] dialogs; | |
public TextMeshProUGUI dialogText, nameText; | |
public float characterInterval = 0.05f, autoNextLineTime = 2.5f; |
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.IO; | |
using UnityEngine; | |
public class ScreenshotScript : MonoBehaviour | |
{ | |
public string folderPath = Path.Combine(Application.dataPath, "..", "SampleRecordings"); | |
public KeyCode captureKey = KeyCode.Tab; | |
private void Start() |
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
const img = document.querySelectorAll('img'); | |
img.forEach((image) => { | |
image.draggable = false; | |
}); | |
const anchors = document.querySelectorAll('a'); | |
anchors.forEach((anchor) => { | |
anchor.target = '_blank'; | |
anchor.rel = 'noopener'; | |
anchor.draggable = false; |
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
.gist .blob-code-inner, | |
.gist .blob-num { | |
font-family: 'Spline Sans Mono', monospace !important; | |
font-size: 0.8rem !important; | |
} | |
.gist .gist-file { | |
margin: 0 !important; | |
border-radius: 1em !important; | |
} |
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/sh | |
const imgElements = document.querySelectorAll('.fullscreenable img') | |
imgElements.forEach(img => { | |
img.addEventListener('click', () => { | |
const src = img.getAttribute('src') | |
const overlay = document.createElement('div') | |
overlay.style.width = '100%' | |
overlay.style.height = '100%' | |
overlay.style.position = 'fixed' |
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
function extendImagesWithPicture () { | |
let imgElements = document.querySelectorAll("img") | |
imgElements.forEach(function (img) { | |
let dataSrc = img.getAttribute("data-src") | |
let path = dataSrc.substring(0, dataSrc.lastIndexOf("/") + 1) | |
let imageName = dataSrc.substring(dataSrc.lastIndexOf("/") + 1, dataSrc.lastIndexOf(".")) | |
let picture = document.createElement("picture") | |
let sourceAVIF = document.createElement("source") |
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
$EditorRootPath = "C:\Program Files\Unity\Hub\Editor" | |
$versions = Get-ChildItem -Directory $EditorRootPath | Select-Object -Expand Name | |
$latestVersion = ($versions | Sort-Object -Descending | Select-Object -First 1) | |
$unityExe = Join-Path $EditorRootPath "$latestVersion\Editor\Unity.exe" | |
Write-Host "Try registering URL:com.unity3d.kharma for $unityExe" | |
Remove-Item -Path "Registry::HKEY_CLASSES_ROOT\UnityAssetStore" -Recurse -ErrorAction SilentlyContinue | |
New-Item -Path "Registry::HKEY_CLASSES_ROOT\UnityAssetStore" | Out-Null | |
New-Item -Path "Registry::HKEY_CLASSES_ROOT\UnityAssetStore\DefaultIcon" | Out-Null |
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
// ==UserScript== | |
// @name Unity Docs Syntax Highlighter | |
// @namespace https://github.com/Maoyeedy | |
// @version 1.3.1 | |
// @author Yidi Mao, hyblocker | |
// @license MIT | |
// @description Adds syntax highlighting to the Unity Documentation. Forked from hyblocker. | |
// @icon https://unity.com/favicon.ico | |
// | |
// @match https://docs.unity3d.com/Manual/* |
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 UnityEditor; | |
using UnityEngine; | |
public class MixamoAnimationRenamingProcessor : AssetPostprocessor | |
{ | |
private static readonly HashSet<string> NamesToReplace = new() | |
{ | |
"mixamo.com" |
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
// ==UserScript== | |
// @name Unity Docs Redirect | |
// @namespace https://github.com/Maoyeedy/ | |
// @version 1.1 | |
// @author Yidi Mao | |
// @license MIT | |
// @description Redirect old Unity docs to latest LTS version | |
// @icon https://unity.com/favicon.ico | |
// @match https://docs.unity3d.com/*/Documentation/** | |
// @run-at document-start |
OlderNewer