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
@stonstad
stonstad / AnimatorExtensions.cs
Last active November 6, 2022 17:52
Unity Animation State Start and Stop Notifications
using System;
using System.Reflection;
using UnityEngine;
public static class AnimatorExtensions
{
/// <summary>Gets an instance method with single argument of type <typeparamref
/// name="TArg0"/> and return type of <typeparamref name="TReturn"/> from <typeparamref
/// name="TThis"/> and compiles it into a fast open delegate.</summary>
/// <typeparam name="TThis">Type of the class owning the instance method.</typeparam>
@FlaShG
FlaShG / UsePropertyNameAttribute.cs
Last active January 20, 2023 07:18
Fix the display name when serializing property backing fields in Unity.
using UnityEngine;
/// <summary>
/// Use this attribute in combination with a [SerializeField] attribute on top of a property to display the property name. Example:
/// [field: SerializeField, UsePropertyName]
/// public int number { get; private set; }
/// </summary>
public class UsePropertyNameAttribute : PropertyAttribute
{
@gmoraiz
gmoraiz / rm_emulator5562_offline.sh
Last active March 8, 2024 17:41
remove emulator-5562 offline from adb devices
#Native Instruments software uses PORT 5562 ON TCP (NTKDaemon)
#Run CMD as Administrador and write:
netstat -ano | findstr :5563
taskkill /PID <PID> /F
@sebas77
sebas77 / BurstHelper.cs
Last active January 25, 2024 23:27
Code to compile c# actions with Burst and use them outside the job system. Attention: it's a hack, use just for experiments only
#if UNITY_BURST_FEATURE_FUNCPTR
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.InteropServices;
using Unity.Burst;
namespace BurstHelper
@karljj1
karljj1 / Unity Assembly Definition Debugger.cs
Last active March 27, 2024 17:18
Find out what assemblies are being built and how long each takes.
using System;
using System.Collections.Generic;
using System.Text;
using UnityEditor;
using UnityEditor.Compilation;
using UnityEngine;
[InitializeOnLoad]
public class AsmdefDebug
{
using UnityEngine;
public class DistanceJoint3D : MonoBehaviour {
public Transform ConnectedRigidbody;
public bool DetermineDistanceOnStart = true;
public float Distance;
public float Spring = 0.1f;
public float Damper = 5f;
@naelstrof
naelstrof / CopyAvatarData.cs
Created April 8, 2018 23:07
Copies all avatar components and children to another object. Such as Dynamic Bones, Guns, Animations, etc.
#if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Text.RegularExpressions;
public class CopyAvatarData : ScriptableWizard {
public GameObject from;
public GameObject to;
@mandarinx
mandarinx / Unity_NewerThan2017_1.cs
Last active November 5, 2022 16:49
Unity3D: Detect when play mode changes to what
// For Unity versions newer than 2017.1
using UnityEditor;
[InitializeOnLoad]
public class DetectPlayModeChanges {
static DetectPlayModeChanges() {
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
}
@SrPhilippe
SrPhilippe / vrchat-dynamic-bone-config.md
Last active April 9, 2024 05:27
Nice configs for dynamic bone to use on VRChat

Vrchat dynamic bone configs

Hair

Normal Long Hair Other
name value name value name value
damping 0.2 damping 0.894 damping 0.025
elasticity 0.05 elasticity 0.1 elasticity 0.008
stiffness 0.8 stiffness 0.783 stiffness 0.85
@nikomoravec
nikomoravec / Program.cs
Created February 6, 2018 16:24
Call private methods in C#
using System;
using System.Reflection;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
A a = new A();