Skip to content

Instantly share code, notes, and snippets.

raysan5 /
Last active Nov 26, 2021
A small state-of-the-art study on custom engines



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

JohannesMP / LICENSE
Last active Oct 30, 2021
[Unity3D] A Reliable, user-friendly way to reference SceneAssets by script.
* Don't Be a Jerk: The Open Source Software License.
* Adapted from:
* _I_ am the software author - JohannesMP on Github.
* _You_ are the user of this software. You might be a _we_, and that's OK!
* This is free, open source software. I will never charge you to use,
* license, or obtain this software. Doing so would make me a jerk.
View GlowLevels.shader
Shader "Sprites/GlowLevels"
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_AlphaIntensity_Fade_1("_AlphaIntensity_Fade_1", Range(0, 3)) = 1
_TintRGBA_Color_1("_TintRGBA_Color_1", COLOR) = (1,1,1,1)
_AlphaIntensity_Fade_2("_AlphaIntensity_Fade_2", Range(0, 3)) = 1
_TintRGBA_Color_2("_TintRGBA_Color_2", COLOR) = (1,1,1,1)
lazlo-bonin / UndoUtility.cs
Last active Nov 7, 2021
Fixing Unity's broken Undo.RecordObject
View UndoUtility.cs
using UnityEditor;
using UnityEngine;
using UnityObject = UnityEngine.Object;
namespace Ludiq
public static class UndoUtility
private static void RecordObject(UnityObject uo, string name)
phi-lira / UniversalPipelineTemplateShader.shader
Last active Nov 23, 2021
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
View UniversalPipelineTemplateShader.shader
// 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"
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
View SpriteUVToShader.cs
// c# companion script
// SpriteUVToShader.cs -------------------------------------------------------------------------------------------------------------------------------- //
// Save you your project, add to your SpriteRenderer gameObject
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
LotteMakesStuff / Colors.cs
Created Apr 6, 2017
Trying to set Colours from code but need something better than the few that unity provide and dont wanna mess around with colour values for ages? Colors is your friend!!!
View Colors.cs
using UnityEngine;
public class Colors
// NOTE: The follwing color names come from the CSS3 specification, Section 4.3 Extended Color Keywords
public static readonly Color AliceBlue = new Color32(240,248,255,255);
public static readonly Color AntiqueWhite = new Color32(250,235,215,255);
public static readonly Color Aqua= new Color32(0,255,255,255);
MattRix / UnityEditorIcons.txt
Last active Nov 27, 2021
A list of all the built-in EdtiorGUI icons in Unity. Use EditorGUIUtility.IconContent([icon name]) to access them.
View UnityEditorIcons.txt
ScriptableObject Icon
View CUDA in LXC via LXD
# Suppose we already have LXD, and already add the default image repo as images:
# 1. Start a new Trusty LXC container
host:~$ lxc launch images:ubuntu/trusty/amd64 cuda-trusty
# 2. Download and install CUDA on *both* host & LXC container, from
# Note that host and container have to have *exactly* the same driver version
# 3. Add necessary Nvidia devices to LXC container
host:~$ lxc config device add cuda-trusty nvidia0 unix-char path=/dev/nvidia0
host:~$ lxc config device add cuda-trusty nvidiactl unix-char path=/dev/nvidiactl

How to Use?

GUIStyle mystyle = new GUIStyle("some string from the list below");


  • "CN Box"
  • "Button"