Skip to content

Instantly share code, notes, and snippets.

@totallyRonja
totallyRonja / MaterialGradientDrawer.cs
Last active November 13, 2024 11:51
A Material Property Drawer for the [Gradient] attribute which lets you edit gradients and adds them to the shader as textures. More information here: https://twitter.com/totallyRonja/status/1368704187580682240
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
public class MaterialGradientDrawer : MaterialPropertyDrawer {
private int resolution;
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active October 24, 2024 16:16
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@phi-lira
phi-lira / UniversalPipelineTemplateShader.shader
Last active November 10, 2024 05:01
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this teamplate as a base.
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader.
// This shader works with URP 7.1.x and above
Shader "Universal Render Pipeline/Custom/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
@jasielmacedo
jasielmacedo / PhysicsSettler.cs
Last active June 16, 2023 19:51
To Test Physics on Editor Without play - Unity Engine 2017
using UnityEngine;
using UnityEditor;
// This causes the class' static constructor to be called on load and on starting playmode
[InitializeOnLoad]
class PhysicsSettler
{
// only ever register once
static bool registered = false;
@ilkinulas
ilkinulas / CustomHierarchyView.cs
Created July 20, 2016 18:40
editor script that demonstrates how to customize hierarchy window
using UnityEngine;
using UnityEditor;
using System.Text;
[InitializeOnLoad]
public class CustomHierarchyView {
private static StringBuilder sb = new StringBuilder ();
static CustomHierarchyView() {