This file contains 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 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 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 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 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 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 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
$userPath = $env:USERPROFILE | |
$pathExclusions = New-Object System.Collections.ArrayList | |
$processExclusions = New-Object System.Collections.ArrayList | |
# Custom | |
$pathExclusions.Add($userPath + '\UnityProjects') > $null | |
$pathExclusions.Add($userPath + '\UnrealProjects') > $null | |
$processExclusions.Add('UnrealEngine.exe') > $null | |
$processExclusions.Add('blender.exe') > $null | |
$processExclusions.Add('maya.exe') > $null |
This file contains 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 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 Hightligher Fork | |
// @namespace https://github.com/Maoyeedy | |
// @version 1.2.7 | |
// @author Maoyeedy | |
// @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 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
[*] | |
charset = utf-8-bom | |
end_of_line = crlf | |
indent_size = 4 | |
indent_style = space | |
insert_final_newline = false | |
max_line_length = 120 | |
tab_width = 4 | |
trim_trailing_whitespace = false | |
ij_continuation_indent_size = 8 |
OlderNewer