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 prompt { | |
if (Test-Success) { | |
$heart = "❤", "🧡", "💛", "💚", "💙", "💜", "💔", "💕", "💓", "💗", "💖", "💘", "💝" | Get-Random | |
"`e[107m`e[30mI${heart}PS`e[37m`e[49m" # that last character is the powerline > | |
} else { | |
$heart = "🧡", "💛", "💙", "🖤" | Get-Random | |
"`e[41m`e[37mI${heart}PS`e[31m`e[49m" # that last character is the powerline > | |
} | |
} |
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
// put me in an Editor folder | |
using System.IO; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine; | |
public static class LayoutUtils | |
{ | |
// unity stores layouts in a path referenced in WindowLayout.LayoutsPreferencesPath. | |
// Unfortunately, thats internal - well just creat the path in the same way they do! |
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
// NOTE DONT put in an editor folder! | |
using UnityEngine; | |
public class AutohookAttribute : PropertyAttribute | |
{ | |
} |
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
Get-Command # Retrieves a list of all the commands available to PowerShell | |
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules) | |
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft* | |
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item" | |
Get-Help # Get all help topics | |
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page) | |
Get-Help -Name Get-Command # Get help for a specific PowerShell function | |
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command |
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-TwitchEvent { | |
[CmdletBinding(DefaultParameterSetName = 'Standard')] | |
param ( | |
[Parameter(Mandatory, | |
ParameterSetName = 'Standard')] | |
[string] | |
$UserName, | |
[Parameter(Mandatory, | |
ParameterSetName = 'Pipeline', |
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 Sirenix.OdinInspector; | |
using UnityEngine; | |
#if UNITY_EDITOR | |
#endif | |
/// <summary> | |
/// Placed where an obstacle will be spawned when the game loads. | |
/// Used to fake nested prefabs in a pre-2018.3 world. | |
/// </summary> | |
[ExecuteInEditMode] |
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 "Custom/UIBlur" | |
{ | |
Properties | |
{ | |
[Toggle(IS_BLUR_ALPHA_MASKED)] _IsAlphaMasked("Image Alpha Masks Blur", Float) = 1 | |
[Toggle(IS_SPRITE_VISIBLE)] _IsSpriteVisible("Show Image", Float) = 1 | |
// Internally enforced by MAX_RADIUS | |
_Radius("Blur Radius", Range(0, 64)) = 1 |
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
## Photon Methods | |
**public class Blank : Photon.PunBehaviour** | |
instead of mono behavior, use this to receive photon callbacks in your script. | |
**public override void OnLeftRoom()** | |
An example of overriding a punbehavior callback |
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.Linq; | |
using UnityEngine; | |
using Unity.Entities; | |
public class WorldBootstrap | |
{ | |
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] | |
public static void Initialize() |
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
YOUR METHOD HERE - BEGIN | |
if (SOME_CONTROL_OF_YOURS && Application.isEditor) | |
{ | |
Action<string> commCallback = (csv) => | |
{ | |
LoadCSVText(csv); | |
}; | |
StartCoroutine(DownloadCSVCoroutine(spreadSheetId, commCallback, true, "YOUR_ASSET_NAME_NO_EXT", tabId)); |