Skip to content

Instantly share code, notes, and snippets.

@hippocoder
hippocoder / SetDate.cs
Created June 27, 2022 20:29 — forked from paulhayes/Sun.cs
Rotates a Unity directional light based on location and time. Includes time scale, and frame stepping for continuous use.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Entropedia
{
public class SetDate : MonoBehaviour
{
public Sun sun;
@hippocoder
hippocoder / DoomGlow.cs
Created June 22, 2022 14:41 — forked from TiliSleepStealer/DoomGlow.cs
Doom glow - fake volumetric light glow effect in Unity by Tili_us
// This file is in the public domain. Where
// a public domain declaration is not recognized, you are granted
// a license to freely use, modify, and redistribute this file in
// any way you choose.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Unity remake of a fake volumetric light glow effect
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)
using UnityEngine;
public class TerrainDetector
{
private TerrainData terrainData;
private int alphamapWidth;
private int alphamapHeight;
private float[,,] splatmapData;
private int numTextures;
@hippocoder
hippocoder / GameSettingsProvider.cs
Created December 20, 2018 07:29
Draw the default inspector for your SettingsProvider to save time!
using UnityEditor;
static class GameSettingsProvider
{
[SettingsProvider]
public static SettingsProvider CreateGameSettings()
{
var provider = new SettingsProvider("Game/Settings", SettingsScope.Project)
{
guiHandler = (searchContext) =>
{