Skip to content

Instantly share code, notes, and snippets.

@quasiblob
quasiblob / delete_any_components.py
Created February 1, 2021 10:06
Simple Blender add-on to allow deleting any mesh component without questions asked. (Blender 2.79b version)
# 2015.2 Sami Sorjonen
# License:
# This script is “free as in beer” i.e.
# feel free to use this script in Blender any way you like
# However do not re-distribute the script - share a link to my page instead
# How to install:
# Go to Preferences (Ctrl + Alt + U)
# Select Add-ons tab
@quasiblob
quasiblob / EditorSelection.cs
Created January 14, 2021 08:41
How to prevent Unity Editor Scene default selection behavior
using UnityEngine;
using UnityEditor;
namespace ConditionalEditorSelection
{
// 2021.1.1
// Written by Sami S.
// How to prevent Unity Editor Scene default selection behavior
// NOTE:
@quasiblob
quasiblob / DrawTilemapBorder.cs
Created November 5, 2019 19:49
Visualize Unity Tilemap center and bounds
// Visualize Unity Tilemap center and bounds
// Red border shows the Tilemap current bounds
// Green cross shows the 0,0,0 position of Tilemap
// Script does take into account position of Tilemap in World space
// but if the Grid or Tilemap is scaled or rotated
// the rendering no longer will be aligned to Tilemap
// Allows to see unused space where user has erased the tiles
// but hasn't compressed the bounds.
@quasiblob
quasiblob / delete_any_components.py
Last active January 20, 2021 19:25
Simple Blender add-on to allow deleting any mesh component without questions asked.
# 2015.10
# 2020.6
# 2021.1 - Sami S.
# License:
# This script is “free as in beer” i.e.
# feel free to use this script in Blender any way you like.
# However, do not re-distribute the script - share a link to my page instead!
@quasiblob
quasiblob / 20150926_Unity_sprite_replacement.cs
Last active September 26, 2015 14:35
Unity runtime sprite replacement (inefficient)
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class LateSprite : MonoBehaviour
{
public SpriteRenderer rend;
public string sheetName;
List<Sprite> sprites;