Skip to content

Instantly share code, notes, and snippets.

@ElementalSpork
ElementalSpork / SimpleGeo.cs
Created July 14, 2016 03:51 — forked from phosphoer/SimpleGeo.cs
Simple Geometry Painter for Unity
// David Evans @phosphoer
// Feel free to use this in your commercial projects
// Let me know if you do cause it will make me feel good and stuff
using UnityEngine;
using System.Collections.Generic;
using System;
#if UNITY_EDITOR
using UnityEditor;
@unitycoder
unitycoder / Standard-2Sided-FixNormals.shader
Last active October 2, 2023 14:40
Standard Shader - 2 Sided (cull off) - Also, 2 Sided Standard Surface Shader with Fixed Normals
// 2 sided standard surface shader (using 2 passes), with fixed normals for flipped faces
Shader "Custom/TwoSided (FixedNormals)"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
@ByronMayne
ByronMayne / AnimatedComponent.cs
Created May 29, 2017 11:17
The source code behind my Unity tip.
using UnityEngine;
using System.Collections;
// This is not need but I just wanted to make the point clear.
public class AnimatedComponent : MonoBehaviour
{
}
@kalineh
kalineh / PrefabNode.cs
Created July 13, 2017 18:09
Simple nested prefab utility with editor preview.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor(typeof(PrefabNode))]
public class PrefabNodeEditor
: Editor
@karljj1
karljj1 / Unity Assembly Definition Debugger.cs
Last active April 2, 2025 23:06
Find out what assemblies are being built and how long each takes.
using System;
using System.Collections.Generic;
using System.Text;
using UnityEditor;
using UnityEditor.Compilation;
using UnityEngine;
[InitializeOnLoad]
public class AsmdefDebug
{
@0xLeif
0xLeif / metal_01_swiftui.swift
Last active May 6, 2023 11:47
Metal + SwiftUI
//
// ContentView.swift
// MetalSwiftUI
//
// Created by Zach Eriksen on 9/8/20.
// Copyright © 2020 oneleif. All rights reserved.
//
// Inspired [MetalUI](https://github.com/0xLeif/MetalUI)
import SwiftUI
@AKosmachyov
AKosmachyov / Player-MVVM-SwiftUI.md
Last active February 10, 2024 18:21
SwiftUI + Combine. Sync Slider & AVPlayer states. MVVM
@seyhajin
seyhajin / readme.md
Last active February 22, 2023 11:21
Minimal sprite rendering example written in C with `SDL2` for windowing, `sokol_gfx` for graphics API using WebGL2/GLES3, `stb_image` for loading image, compiled in WebAssembly with Emscripten

webgl2-wasm-sdl-sokol-sprite

Minimal sprite rendering example written in C with SDL2 for windowing, sokol_gfx for graphics API using WebGL2/GLES3, stb_image for loading image, compiled in WebAssembly with Emscripten.

Step by step

  1. Clone the repositories sokol and stb in the deps folder
  2. Add an image (sky.png) in assets directory
  3. Compile and build with the following command (need Emscripten installed):