Skip to content

Instantly share code, notes, and snippets.

View bo11ox's full-sized avatar
🏴󠁧󠁢󠁳󠁣󠁴󠁿
:rage4:

Rainer Strobo bo11ox

🏴󠁧󠁢󠁳󠁣󠁴󠁿
:rage4:
  • FFM/Germany
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.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Nothke.SimpleMenu;
using TMPro;
public class ExampleMenu : Menu
{
int intTest = 10;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AlansBlendShapeClipVowels : MonoBehaviour
{
[Range(0f, 1f)] public float A;
[Range(0f, 1f)] public float E;
[Range(0f, 1f)] public float I;
[Range(0f, 1f)] public float O;
Shader "Custom/swirl"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
}
SubShader
@CharStiles
CharStiles / unityStickerSheet.shader
Created October 5, 2021 21:57
Unity shader sticker sheet
// Tips for converting GLSL functions to Unity functions
// vec turn into float (usually massive comand all replace works)
// fract -> frac
// mod -> modf
// time, iTime, u_Time -> _Time.y
float3 hsv2rgb(float3 c) {
c = float3(c.x, clamp(c.yz, 0.0, 1.0));
float4 K = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
@herohiralal
herohiralal / Archetype.cs
Created February 15, 2022 04:03
HiraBots sample 1
using UnityEngine;
using UnityEngine.AI;
namespace AIEngineTest
{
public class Archetype : MonoBehaviour,
IHiraBotArchetype<NavMeshAgent>,
IHiraBotArchetype<Animator>,
IHiraBotArchetype<ConsolidatedSensor>,
IHiraBotArchetype<HiraLGOAPRealtimeBot>,
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Breakable : MonoBehaviour
{
public float mass = 50;
public float impulseThreshold = 10000;
Collider _collider;
@addie-lombardo
addie-lombardo / DiceLuaCommands.cs
Created August 4, 2022 04:43
A robust dice roll Lua command for Dialogue System for Unity
// Requires Dialogue System for Unity: https://www.pixelcrushers.com/dialogue-system/
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Security.Cryptography;
using PixelCrushers.DialogueSystem;
using UnityEngine;
/// <summary>
@mtvee
mtvee / windowscpp.md
Created October 3, 2022 02:11
c++ from command line in windows

How to build c++ from the command line in windows 10

The rest of all this is done from the shell and any editor

  • make a junk directory somewhere and put these files into it
@Anthelmed
Anthelmed / WorldSpaceUIDocument.cs
Last active April 28, 2025 09:39
Until Unity decide to make it official, this is a custom WorldSpaceUIDocument component. Code is under the MIT license: https://github.com/git/git-scm.com/blob/main/MIT-LICENSE.txt
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Rendering;
using UnityEngine.UIElements;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem.UI;
#endif
#if UNITY_EDITOR
using UnityEditor;