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 Get-UnityInstallationRoot { | |
$userPathFile = "$env:APPDATA\UnityHub\secondaryInstallPath.json" | |
# Check if Unity Hub is installed, if installed, then must come with this file | |
if (-not (Test-Path $userPathFile)) { | |
Write-Warning "Unity Hub not installed." | |
return $null | |
} | |
# By default, it only has two quotes: "" |
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.Rendering; | |
namespace CameraAmbientOverride | |
{ | |
/// <summary> | |
/// Attach it to camera. Supports both URP and HDRP. | |
/// </summary> | |
[DisallowMultipleComponent] | |
[RequireComponent(typeof(Camera))] |
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 && ENABLE_INPUT_SYSTEM | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.InputSystem; | |
namespace Project.Editor | |
{ | |
/// <summary> | |
/// Toggles play mode when pressing both Start and Select. | |
/// You may alter the trigger at the <see cref="IsGamepadPressed" />> method. |
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 System; | |
using System.IO; | |
using UnityEditor; | |
using UnityEditor.Recorder; | |
using UnityEditor.Recorder.Input; | |
using UnityEngine; | |
using UnityEngine.InputSystem; | |
namespace Screenshot |
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
<# | |
.SYNOPSIS | |
Make Textures Quad-Divisible | |
.DESCRIPTION | |
Resize PNG and JPG images so their dimensions are divisible by 4. | |
Useful for textures in game engines that require quad-divisible dimensions to be compressed with DXT or BC formats. | |
.NOTES | |
Requires ImageMagick to be installed and available in the PATH. | |
#> |
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 Change Font to HarmonyOS Sans SC | |
// @namespace https://github.com/Maoyeedy | |
// @grant GM_addStyle | |
// @version 1.1 | |
// @author Maoyeedy | |
// @description Override font to 'HarmonyOS Sans SC' for Chinese sites | |
// @match *://*.nate.com/* | |
// @match *://*.huya.com/* | |
// @match *://*.douyu.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
#if UNITY_EDITOR | |
using UnityEditor; | |
using UnityEditor.SceneManagement; | |
using UnityEngine.SceneManagement; | |
namespace Project.Editor | |
{ | |
/// <summary> | |
/// Autosave the modified scenes when exiting playmode. | |
/// </summary> |
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 System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
namespace Editor | |
{ | |
/// <summary> | |
/// It runs after each assembly reload. | |
/// </summary> |
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 Manual Redirect | |
// @namespace https://github.com/Maoyeedy/ | |
// @version 1.0 | |
// @description Redirect Unity Manual to 2022.3 | |
// @author Maoyeedy | |
// @match https://docs.unity3d.com/Manual/* | |
// @icon https://unity.com/favicon.ico | |
// @grant none | |
// ==/UserScript== |
NewerOlder