Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
‏‏‎

mika unitycoder

‏‏‎
View GitHub Profile
@unitycoder
unitycoder / Outline.shader
Created June 26, 2023 17:49 — forked from ScottJDaley/Outline.shader
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
@unitycoder
unitycoder / BasicFPCC.cs
Created May 10, 2023 07:20 — forked from Alucard-Jay/BasicFPCC.cs
A basic first person character controller for Unity3D
// ------------------------------------------
// BasicFPCC.cs
// a basic first person character controller
// with jump, crouch, run, slide
// 2020-10-04 Alucard Jay Kay
// ------------------------------------------
// source :
// https://forum.unity.com/threads/a-basic-first-person-character-controller-for-prototyping.1169491/
// Brackeys FPS controller base :
@unitycoder
unitycoder / CircularMenu.cs
Created April 28, 2023 12:45 — forked from alexanderameye/CircularMenu.cs
Circular menu for the Unity Editor
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Ameye.EditorUtilities.CircularMenu;
using Ameye.EditorUtilities.Editor.RadialMenu;
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
@unitycoder
unitycoder / GameHost.cs
Created April 25, 2023 14:23 — forked from Vanlalhriata/GameHost.cs
Host Unity game in WPF
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Interop;
namespace KinectRun.Host.Controls
{
// GameHost is a FrameworkElement and can be added to controls like so:
// var gameHost = new GameHost(container.ActualWidth, container.ActualHeight);
@unitycoder
unitycoder / MeshCut.cs
Created April 3, 2023 16:27 — forked from alexcmd/MeshCut.cs
Mesh cut algorithm for Unity
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class MeshCut
{
private static Plane blade;
private static Transform victim_transform;
private static Mesh victim_mesh;
@unitycoder
unitycoder / orthodoxc++.md
Created April 1, 2023 19:19 — forked from bkaradzic/orthodoxc++.md
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@unitycoder
unitycoder / SpatialHash.cs
Created March 11, 2023 12:18 — forked from gamemachine/SpatialHash.cs
Spatial Hash
using Unity.Mathematics;
namespace GameCommon.Spatial
{
public struct SpatialHash
{
public const int Goffset = 10000;
public const int Max = 20480;
public int CellSize;
@unitycoder
unitycoder / HideFlagsUtility.cs
Created March 7, 2023 12:15 — forked from FlaShG/HideFlagsUtility.cs
Shows all GameObjects in the scene with hideFlags, so you can debug them.
using UnityEngine;
using UnityEditor;
public static class HideFlagsUtility
{
[MenuItem("Help/Hide Flags/Show All Objects")]
private static void ShowAll()
{
var allGameObjects = Object.FindObjectsOfType<GameObject>();
foreach (var go in allGameObjects)
@unitycoder
unitycoder / PrefabDetector.cs
Created March 5, 2023 09:43 — forked from idbrii/PrefabDetector.cs
A Unity editor window to show you the prefab-ness of an object
// public domain
// Add to Scripts/Editor/PrefabDetector.cs
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System;
using UnityEditor.Experimental.SceneManagement;
using UnityEditor.SceneManagement;
using UnityEditor;
using UnityEngine;
@unitycoder
unitycoder / DoomGlow.cs
Created February 17, 2023 10:37 — 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