Skip to content

Instantly share code, notes, and snippets.

@randalfien
randalfien / MarkUnused.cs
Last active October 24, 2022 09:51
Unity Mark Unused Assets
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine;
public class MarkUnused
{
private const string UnusedLabel = "Unused"; // All unused assets will be tagged with this label
@ByronMayne
ByronMayne / Point
Last active May 5, 2018 16:01
A int version of a Vector2 in Unity. Supports explicit conversion between the two types as well as a few helpful helper functions. The second script is a property drawer that supports panning of values and right clicking to reset the value to zero (taking from 3Ds Max).
using UnityEngine;
using System;
[Serializable]
public struct Point
{
[SerializeField]
public int x;
[SerializeField]
public int y;
@t0chas
t0chas / CustomEditorBase.cs
Last active March 5, 2024 16:47
Default Custom Inspector-Editor for Unity3D with ReorderableLists for arrays handling
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System.Collections.Generic;
using UnityEditor.AnimatedValues;
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)]
[CanEditMultipleObjects]
public class CustomEditorBase : Editor
{
@LearnCocos2D
LearnCocos2D / gist:77f0ced228292676689f
Last active February 12, 2024 20:47
Overview of Entity Component System (ECS) variations with pseudo-code

For background and further references see: Entity Component Systems on Wikipedia

ECS by Scott Bilas (GDC 2002)

Entity->Components->Update
  • entity = class: no logic + no data OR at most small set of frequently used data (ie position)
  • component = class: logic + data
foreach entity in allEntities do
    foreach component in entity.components do
anonymous
anonymous / Random Beat Sequencer (AudioContext Oscillators FTW).markdown
Created May 11, 2015 20:08
Random Beat Sequencer (AudioContext Oscillators FTW)

Random Beat Sequencer (AudioContext Oscillators FTW) ('-' * 52) Takes composition data, and data relative to each instrument and generates a random beat sequence.

A Pen by Jake Albaugh on CodePen.

License.

@esfand
esfand / typescript_angular.adoc
Last active September 30, 2022 12:37
AngularJS with TypeScript
@jogleasonjr
jogleasonjr / SlackClient.cs
Last active October 20, 2023 15:54
A simple C# class to post messages to a Slack channel. You must have the Incoming WebHooks Integration enabled. This class uses the Newtonsoft Json.NET serializer available via NuGet. Scroll down for an example test method and a LinqPad snippet. Enjoy!
using Newtonsoft.Json;
using System;
using System.Collections.Specialized;
using System.Net;
using System.Text;
//A simple C# class to post messages to a Slack channel
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet
public class SlackClient
{
@geksilla
geksilla / bootsrap_class_list
Last active April 29, 2023 03:59
Bootstrap css class list
.navbar
.caret
.label
.table
.img-responsive
.img-rounded
.img-thumbnail
.img-circle
.sr-only
.lead