Skip to content

Instantly share code, notes, and snippets.

View novavision's full-sized avatar

Roman Ivanicky novavision

View GitHub Profile
@adammyhre
adammyhre / InspectorLock.cs
Last active February 16, 2025 06:34
Lock Inspector Icon and Transform Constrain Proportion Icon in Unity
using System.Reflection;
using UnityEditor;
using UnityEngine;
/// <summary>
/// Toggles the Inspector lock state and the Constrain Proportions lock state.
/// </summary>
public static class LockInspector {
static readonly MethodInfo flipLocked;
static readonly PropertyInfo constrainProportions;
@cmdr2
cmdr2 / Math3d.cs
Created November 11, 2021 07:34
Useful 3D math functions from the old Unity 3D wiki (which has been shut down). Source: the archived version from July, 2021 at https://web.archive.org/web/20210507045029/https://wiki.unity3d.com/index.php/3d_Math_functions
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
public class Math3d {
private static Transform tempChild = null;
private static Transform tempParent = null;
@nicoplv
nicoplv / ReimportAsset.cs
Last active May 18, 2018 10:06
Automatize the reimportation of working file from a folder ended with '~' (a demo video is available here https://youtu.be/S-yyK3Fzw3c)
using UnityEngine;
using UnityEditor;
using System.Text.RegularExpressions;
using System.IO;
public class ReimportAsset : MonoBehaviour
{
#region MenuItem Methods
[MenuItem("Assets/Reimport from ~ &R", false, priority = 40)]