Skip to content

Instantly share code, notes, and snippets.

@runevision
runevision / Unity versions not affected by Unity Runtime Fee.md
Created September 14, 2023 09:45
Unity versions not affected by Unity Runtime Fee

Unity versions not affected by Unity Runtime Fee

This is information that has been dug up by me and others in the Unity community. It's not official information from Unity (but most of the linked resources are). It is also not legal advise. I am not a lawyer.

TLDR:

Contrary to what Unity themselves are saying, for games made with these Unity versions, developers can elect not to be affected by a newer version of the Terms of Service that introduces the Unity Runtime Fee:

  • Unity 2022.x or earlier
  • Unity 2021.x LTS or earlier
Shader "Ohmnivore/Heightmap"
{
Properties
{
}
SubShader
{
Tags { "RenderType"="Opaque" }
@Anthelmed
Anthelmed / WorldSpaceUIDocument.cs
Last active April 28, 2025 09:39
Until Unity decide to make it official, this is a custom WorldSpaceUIDocument component. Code is under the MIT license: https://github.com/git/git-scm.com/blob/main/MIT-LICENSE.txt
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Rendering;
using UnityEngine.UIElements;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem.UI;
#endif
#if UNITY_EDITOR
using UnityEditor;
@ScottJDaley
ScottJDaley / Outline.shader
Last active February 18, 2025 06:05
Wide Outlines Renderer Feature for URP and ECS/DOTS/Hybrid Renderer
// Original shader by @bgolus, modified slightly by @alexanderameye for URP, modified slightly more
// by @gravitonpunch for ECS/DOTS/HybridRenderer.
// https://twitter.com/bgolus
// https://medium.com/@bgolus/the-quest-for-very-wide-outlines-ba82ed442cd9
// https://alexanderameye.github.io/
// https://twitter.com/alexanderameye/status/1332286868222775298
Shader "Hidden/Outline"
{
Properties
@chrisyarbrough
chrisyarbrough / CustomPreviewExample.cs
Last active March 24, 2025 10:27
This shows how UnityEditor.PreviewRenderUtility can be used to draw a custom scene and render it interactively in an editor window. The target object can be modified while running, but it is important to note, that in this case we need to managed target instantiation and destruction ourselves.
using UnityEditor;
using UnityEngine;
/// <summary>
/// Demonstrates how to use <see cref="UnityEditor.PreviewRenderUtility"/>
/// to render a small interactive scene in a custom editor window.
/// </summary>
public class CustomPreviewExample : EditorWindow
{
[MenuItem("My Tools/Custom Preview")]
@MagistrAVSH
MagistrAVSH / URP-VertexLit.shader
Last active October 12, 2024 02:00
UniversalRenderingPipeline VertexLit Shader
Shader "Universal Render Pipeline/Custom/VertexLit"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_Gain ("Gain", Float) = 1.5
_Color ("Color", Color) = (1,1,1,1)
_EdgeColor ("Edge Color", Color) = (0,0,0,1)
[Toggle] _RemoveDiag("Remove diagonals", Float) = 0.
@eviltester
eviltester / gist:11093f0e4c501a41990e227393184eda
Last active February 14, 2025 09:30
uncheck twitter interests
var timer=100;document.querySelectorAll("div > input[type='checkbox']:checked").forEach((interest) => {setTimeout(function(){interest.click()},timer);timer+=2000;});
@jeffvella
jeffvella / ProfilerMarker.cs
Last active May 11, 2020 21:21
How to add burst job timing to the profiler.
public unsafe class JobTestSystem : JobComponentSystem
{
private ProfilerMarker _marker;
protected override void OnCreateManager()
{
_marker = new ProfilerMarker("Job1z");
}
protected override JobHandle OnUpdate(JobHandle inputDeps)
@HAliss
HAliss / TextureCombiner.cs
Last active January 8, 2023 21:08
Texture combiner for Unity 3D
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEngine;
public class TextureCombiner : EditorWindow {
//Input textures
private Texture2D[] textures = new Texture2D[4];
@Split82
Split82 / UnityShadersCheatSheet.shader
Created April 17, 2018 10:07
Unity Shaders Cheat Sheet
Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)