Skip to content

Instantly share code, notes, and snippets.

View Invertex's full-sized avatar
👁️‍🗨️
Doing too many things at once

Dabbles in too many things Invertex

👁️‍🗨️
Doing too many things at once
View GitHub Profile
@Invertex
Invertex / CustomHoldingInteraction.cs
Last active January 17, 2025 02:57
Unity New Input System custom Hold "Interaction" where the .performed callback is constantly triggered while input is held.
using UnityEngine;
using UnityEngine.InputSystem;
//!!>> This script should NOT be placed in an "Editor" folder. Ideally placed in a "Plugins" folder.
namespace Invertex.UnityInputExtensions.Interactions
{
//https://gist.github.com/Invertex
/// <summary>
/// Custom Hold interaction for New Input System.
/// With this, the .performed callback will be called everytime the Input System updates.
@popcron
popcron / CustomPlayBehaviour.cs
Last active May 26, 2022 01:31
Custom code before play
using System;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
namespace blablalblalmao
{
[InitializeOnLoad]
@Invertex
Invertex / StreamingAudioPlayer.cs
Last active November 12, 2024 14:12
Unity streaming audio playback example
using System.Collections;
using UnityEngine;
using UnityEngine.Networking;
namespace Invertex.Unity.Audio
{
/// <summary>
/// Component that allows playback of an audio file from a server or locally that begins playing before the file is completely downloaded.
/// </summary>
public class StreamingAudioPlayer : MonoBehaviour
@williamd1k0
williamd1k0 / EditorIconTexture.gd
Created May 6, 2024 23:46
Helper Texture class to use Godot Editor icons in plugins, such as main screen plugins.
@tool
class_name EditorIconTexture
extends AtlasTexture
var icon :String:
set(val):
icon = val
_update_icon.call_deferred()
func _init():
@Wavesonics
Wavesonics / remove-onedrive.ps1
Created June 25, 2024 02:08
A Shell script to remove OneDrive, move files to their proper directories, and fix paths in your registry
# Description:
# This script will remove and disable OneDrive integration.
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\New-FolderForced.psm1
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1
Write-Output "Kill OneDrive process"
taskkill.exe /F /IM "OneDrive.exe"
taskkill.exe /F /IM "explorer.exe"
@Invertex
Invertex / StandardShaderDoubleSided.shader
Created March 29, 2025 12:42
Unity Standard Shader that renders with proper double-sided lighting, not just culling disabled. Also uses the proper Standard shader GUI.
Shader "Invertex/Standard Double Sided" {
Properties {
_Color("Color", Color) = (1,1,1,1)
_MainTex("Albedo", 2D) = "white" {}
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
_Glossiness("Roughness", Range(0.0, 1.0)) = 0.5
_GlossMapScale("Roughness Scale", Range(0.0, 1.0)) = 1.0
[Enum(Metallic Alpha,0,Albedo Alpha,1)] _SmoothnessTextureChannel ("Smoothness texture channel", Float) = 0