Skip to content

Instantly share code, notes, and snippets.

View CheeryLee's full-sized avatar
🚙
wroom wroom

Alexander Pluzhnikov CheeryLee

🚙
wroom wroom
  • PlayFlock
  • Moscow, Russia
View GitHub Profile
import bpy
bl_info = {
"name": "Change curve extreme points radius",
"author": "Alexander Pluzhnikov",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "View3D",
"description": "Change curve extreme points radius with UI dialog",
"category": "3D View"
@CheeryLee
CheeryLee / PlayModeView.cs
Last active January 27, 2022 14:05
PlayModeView wrapper for Unity that describes which type of Play Mode is currently active on the screen. Useful to determine between GameView and DeviceSimulator.
#if UNITY_EDITOR
using System;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
public static class PlayModeView
@CheeryLee
CheeryLee / DelayedHashSet.cs
Created April 21, 2021 22:48
A set of values with delayed adding and removing. Useful for changing items when iterating over them. The changes will be applied at the next frame.
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Represents a set of values with delayed adding and removing
/// </summary>
/// <typeparam name="T">The type of elements in the hash set</typeparam>
public class DelayedHashSet<T> : IEnumerable<T>
{
/// <summary>
@CheeryLee
CheeryLee / LoopList.cs
Created June 28, 2020 11:47
Looped list implementation without using loop to get a value with a negative index.
using System.Collections.Generic;
public class LoopList<T> : List<T> {
public new T this[int index] {
get {
index = CalculateIndex(index);
return base[index];
}
@CheeryLee
CheeryLee / AssetReferenceDrawer.cs
Last active December 18, 2022 10:28
Workaround for Addressables 1.10.0 to get AssetReference work with serialized Dictionary (probably with OdinInspector)
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Text;
using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Settings;