Skip to content

Instantly share code, notes, and snippets.

View andreiagmu's full-sized avatar
🎮
Developing NekoSuki! ~ Kitty Love Adventure 🐈❤️

Andrei Müller (Andy Miira) andreiagmu

🎮
Developing NekoSuki! ~ Kitty Love Adventure 🐈❤️
View GitHub Profile
Available stats:
Ai - Carving.ApplyResults - TimeNanoseconds
Ai - Carving.BuildBVTree - TimeNanoseconds
Ai - Carving.Clipping - TimeNanoseconds
Ai - Carving.ConvexHulls - TimeNanoseconds
Ai - Carving.Prepare - TimeNanoseconds
Ai - Carving.ProjectVertices - TimeNanoseconds
Ai - CollectSources - TimeNanoseconds
Ai - Colliders - TimeNanoseconds
Ai - Components.NavMeshAgent.SendMessage - TimeNanoseconds
@TheSunCat
TheSunCat / DisblockOrigin.theme.css
Last active September 2, 2024 19:14
Hide all Nitro & Boost upsells in Discord!
/**
* @name Adblock for Discord
* @author TheSunCat and contributors
* @version 1.0.0
* @description We have moved to Codeberg! Follow the link below:
* @source https://codeberg.org/AllPurposeMat/Disblock-Origin
*/
#app-mount::before {
content: "The Disblock Origin theme has moved to Codeberg! Please check https://codeberg.org/AllPurposeMat/Disblock-Origin";
@spireggs
spireggs / ScrollRectAutoScroll.cs
Last active September 18, 2024 21:06 — forked from mandarinx/ScrollRectAutoScroll.cs
Unity3d ScrollRect Auto-Scroll, Dropdown Use: Places this component in the Template of Dropdown (with the ScrollRect component)
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
//comment the next line out if you aren't using Rewired
using Rewired;
[RequireComponent(typeof(ScrollRect))]
public class ScrollRectAutoScroll : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
@SorraTheOrc
SorraTheOrc / ProximityActivationManager.cs
Last active July 4, 2024 19:21
A simple optimization trick in Unity - disable/enable objects based on proximity to the player.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using System.Linq;
using System;
using WizardsCode;
namespace WizardsCode.Optimization
{
@SorraTheOrc
SorraTheOrc / FlickeringLights
Last active September 18, 2024 01:01
A simple Unity script to make your lights flicker. Great for candles and torches.
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// This script is under CCO License (TL;DR do what you will with it ;-)
/// See https://creativecommons.org/share-your-work/public-domain/cc0/
///
/// This works best when you have a fire or candle particle effect on the same location as the light
///
/// Check out my You Tube channel https://youtube.com/c/WizardsCode
@hybridherbst
hybridherbst / RuntimeInitializeOnLoad - Event Order.cs
Created March 8, 2021 15:04
[RuntimeInitializeOnLoad] Event Order
static Lifecycle() => Debug.Log(Prefix + "Static Constructor");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] static void Subs() => Debug.Log(Prefix + "Subsystem Registration");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)] static void AfterAsm() => Debug.Log(Prefix + "AfterAssembliesLoaded");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)] static void BeforeSlash() => Debug.Log(Prefix + "Before Splash");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] static void BeforeScene() => Debug.Log(Prefix + "BeforeScene");
private void Awake() => Debug.Log(Prefix + "Awake");
private void OnEnable() => Debug.Log(Prefix + "OnEnable");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] static void AfterScene() => Debug.Log(Prefix + "AfterSceneLoad");
[RuntimeInitializeOnLoadMethod] static void DefaultLog() => Debug.Log(Prefix + "RuntimeInit Default");
void Start() => Debug
@MeowKim
MeowKim / addressable_asset.md
Last active July 9, 2024 04:26
Guide for Unity Addressable Asset System.

📝 About

Guide for Unity Addressable Asset System.
Check out this sample code repo.

This guide supports languages below.

Created: 2020-07-03
Last updated: 2020-08-26 minor typo correction

@JimmyCushnie
JimmyCushnie / UnityGraphicsBullshit.cs
Last active September 18, 2024 15:38
Exposes some Unity URP graphics settings that are (for some stupid fucking bullshit reason) private.
using System.Reflection;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using ShadowResolution = UnityEngine.Rendering.Universal.ShadowResolution;
/// <summary>
/// Enables getting/setting URP graphics settings properties that don't have built-in getters and setters.
@Janooba
Janooba / Extensions.cs
Last active February 5, 2024 02:23
Extensions needed for CSGAutoColliderAddBuildProcessor.cs
public static class UnityExtensions
{
public static Transform FindDeepChild(this Transform aParent, string aName)
{
Queue<Transform> queue = new Queue<Transform>();
queue.Enqueue(aParent);
while (queue.Count > 0)
{
var c = queue.Dequeue();
if (c.name == aName) return c;
using InternalRealtimeCSG;
using RealtimeCSG.Components;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEngine;
/// <summary>
/// Created: 03-19-2019
/// Updated: