Skip to content

Instantly share code, notes, and snippets.

View andreydobrikov's full-sized avatar

Andrey Dobrikov andreydobrikov

View GitHub Profile
@sgarcia22
sgarcia22 / NounCharacterAssigner.cs
Last active February 5, 2025 15:58
Creates a prefab from Nouns base models. Created as a fix for the https://3dnouns.com/ characters.
using UnityEngine;
using UnityEditor;
/// <summary>
/// Creates a prefab from Nouns base models. Created as a fix for improperly rigged https://3dnouns.com/ characters.
///
/// This tool takes a "MAIN" prefab with the base body and head set up, creates a new prefab based on the "MAIN" one, and swaps out the textures for the imported .gltf gameobject.
///
/// Set Up:
/// -Download the base body.glb and head.glb from https://github.com/0xFloyd/3DNouns/tree/main/public/baseModels.
@FronkonGames
FronkonGames / TinyTween.cs
Created October 30, 2022 23:20
A Complete and Easy to use Tweens library in One File.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// _____ _ _____
// |_ _|_|___ _ _ |_ _|_ _ _ ___ ___ ___
// | | | | | | | | | | | | | -_| -_| |
// |_| |_|_|_|_ | |_| |_____|___|___|_|_|
// |___|
// A Complete and Easy to use Tweens library in One File
//
// Basic use:
// Thanks to https://twitter.com/jon_barron/status/1318946131078909952
//
using UnityEngine;
public static class CurveUtils
{
// From pico8 example by @otikik
public static float BiasGain(float x, float s, float t)
{
@yasirkula
yasirkula / UnitypackageExtractor.cs
Last active April 21, 2025 12:37
Extract a .unitypackage to any directory (even outside the project folder) from within Unity
#define STOP_EXTRACTION_WHEN_WINDOW_CLOSED
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Reflection;
using System.Text;
using System.Threading;
using UnityEditor;
@bitinn
bitinn / .a-unity-git-config.md
Last active April 2, 2025 07:53
My Unity git config
@R-WebsterNoble
R-WebsterNoble / SavWav.cs
Last active November 8, 2024 02:15 — forked from darktable/SavWav.cs
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
@JohannesMP
JohannesMP / LICENSE
Last active October 5, 2025 19:01
[Unity3D] A Reliable, user-friendly way to reference SceneAssets by script.
/*******************************************************************************
* Don't Be a Jerk: The Open Source Software License.
* Adapted from: https://github.com/evantahler/Dont-be-a-Jerk
*******************************************************************************
* _I_ am the software author - JohannesMP on Github.
* _You_ are the user of this software. You might be a _we_, and that's OK!
*
* This is free, open source software. I will never charge you to use,
* license, or obtain this software. Doing so would make me a jerk.
*
@ffyhlkain
ffyhlkain / ReferenceFinder.cs
Last active February 19, 2025 05:48
A reference finder for assets in a #Unity3d project.
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
using UnityEngine;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
namespace FoundationEditor.Editor.ReferenceFinder
{
@DashW
DashW / ScreenRecorder.cs
Last active October 1, 2025 11:55
ScreenRecorder - High Performance Unity Video Capture Script
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading;
class BitmapEncoder
{
public static void WriteBitmap(Stream stream, int width, int height, byte[] imageData)
@miguelcma
miguelcma / DeviceUID.m
Created May 25, 2015 15:09
iOS Unique Device ID that persists between app reinstalls
/* DeviceUID.h
#import <Foundation/Foundation.h>
@interface DeviceUID : NSObject
+ (NSString *)uid;
@end
*/
// Device.m