Skip to content

Instantly share code, notes, and snippets.

View 8chan-co's full-sized avatar

Ophura 8chan-co

View GitHub Profile
using System;
using System.Runtime.InteropServices;
public static class ArrayExtensions_Dotnet
{
#if NET5_0_OR_GREATER
public static unsafe int GetElementSize(this Array array)
{
fixed (void* baseAddress = &MemoryMarshal.GetArrayDataReference(array))
{
// from: https://gist.github.com/noisecrime/3cb57c2618c7ade9d4398fe7f3835e34
using UnityEditor;
using UnityEngine;
/// <summary>
/// NoiseCrimeStudio OneShots are single scripts that provide specific functionality.
/// </summary>
namespace NoiseCrimeStudios.OneShot.Editor
{
namespace AteChan.co
{
using Autodesk.Fbx;
using UnityEditor;
internal static class BinaryFbxExporter
{
[MenuItem("Tools/Convert FBX To Binary")]
private static void ConvertToBinary()
{
using Autodesk.Fbx;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.UIElements;
internal sealed class ClearVertexColors : EditorWindow
{
private sealed class AssetDeletionProcessor : AssetModificationProcessor
{
/*
NOTE: to use this Unity Editor utility, make a folder (Create > Folder) inside of Unity, and name it "Editor",
in that folder, make a C# script (Create > C# Script) and preferably name it (MirrorAnimationEditor),
open the C# script file in a File Editor (such as Note Pad) to paste the below C# code inside of it,
save the file, then head back to Unity; wait a sec or 2 until Unity finishes compiling the script,
once Unity is done compiling; you should be able to see a Button called "Mirror Animation" on the
Inspector Window when you select an Animation Clip in the Project Window, clicking the button will make a
new Animation Clip with the same name and path as the one inspected suffixed with "Mirrored", this newly
created Animation Clip will reflect all properties of the original, with the exception where humanoid rig
properties that animate a given side of the avatar will now oppose that side to mirror the Animation Clip.