Skip to content

Instantly share code, notes, and snippets.

@builder-main
builder-main / BlenderInstallScript.cs
Last active March 3, 2023 20:12
Blender Script unity Installer
[InitializeOnLoad]
public static class BlenderInstallScript
{
//change this to your own import script
private static string blenderScriptRepo = "https://github.com/builder-main/unity-blender-better-import.git";
private static string blenderScripFileName = "Unity-BlenderToFBX.py";
private static string blenderScriptInstallPath = @"Data\Tools";
private static string backupSuffix = ".back";
static BlenderInstallScript()
@builder-main
builder-main / AnimatorExtensions
Last active January 17, 2023 05:14 — forked from pazzaar/AnimatorExtensions
Animator rebind function that also maintains some state
public static class AnimatorExtensions
{
public static AnimatorParametersState SaveState(this Animator anim)
{
List<AnimatorStateInfo> animStates = new List<AnimatorStateInfo>();
for (int i = 0; i < anim.layerCount; i++)
{
animStates.Add(anim.GetCurrentAnimatorStateInfo(i));
}