Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
‏‏‎

mika unitycoder

‏‏‎
View GitHub Profile
@unitycoder
unitycoder / Worlds.cs
Created November 12, 2022 20:53 — forked from andrew-raphael-lukasik/Worlds.cs
(dots) code for world serialization and deserialization
// src: https://gist.github.com/andrew-raphael-lukasik/66d898be737734f26e607e6526d22901
using IO = System.IO;
using UnityEngine;
using Unity.Entities;
using Unity.Scenes;
using Unity.Entities.Serialization;
public static class Worlds
{
@unitycoder
unitycoder / BlurImage.shader
Created November 15, 2022 20:12 — forked from nilpunch/BlurImage.shader
Blur for UI elements. Compatible with Built in RP, HDRP, URP and SRP.
Shader "UI/BlurImage"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
[Space(50)]
_BlurX ("X Blur", Range(0.0, 0.5)) = 0.001
_BlurY ("Y Blur", Range(0.0, 0.5)) = 0.001
@unitycoder
unitycoder / StereographicProjectionBubble.shader
Created November 18, 2022 13:49 — forked from bgolus/StereographicProjectionBubble.shader
Modifying UVs using stereographic projection to create the illusion of a sphere.
Shader "Unlit/StereographicProjectionBubble"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_PanSpeed ("Pan Speed", Float) = 0.1
_Spherify ("Spherify", Range(0,1)) = 1
}
SubShader
{
@unitycoder
unitycoder / windows_hardening.cmd
Created November 21, 2022 18:25 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@unitycoder
unitycoder / PrintUnity3dType.cs
Created November 27, 2022 09:39 — forked from yin8086/PrintUnity3dType.cs
Unity3d Texture Type Descriptions.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestUnityConsole
{
class Program
{
@unitycoder
unitycoder / GLSL-Noise.md
Created December 4, 2022 20:39 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@unitycoder
unitycoder / DancePad.cs
Created December 12, 2022 12:32 — forked from mathiassoeholm/DancePad.cs
Unity dance pad input
using System;
using System.Collections.Generic;
using UnityEngine;
using Object = UnityEngine.Object;
namespace DancePadInput
{
public enum Player
{
Any,
@unitycoder
unitycoder / GeneralSpriteShader.shader
Created December 17, 2022 13:44 — forked from Antoshidza/GeneralSpriteShader.shader
unity instanced sprite shader
Shader "Universal Render Pipeline/2D/SimpleSpriteShader"
{
Properties
{
_MainTex("_MainTex", 2D) = "white" {}
}
HLSLINCLUDE
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
@unitycoder
unitycoder / main.js
Created December 24, 2022 14:39 — forked from woxtu/main.js
Twitter インプレッション アクセスカウンター
const id = "kiriban-fuminige-kinshi";
const conversions = [
{ unit: "K", rate: 1000 },
{ unit: "M", rate: 1000000 },
{ unit: "B", rate: 1000000000 },
{ unit: "万", rate: 10000 },
];
function run(target) {
@unitycoder
unitycoder / ScriptFileWatcher.cs
Created January 8, 2023 11:09 — forked from Asuta/ScriptFileWatcher.cs
Modify the version to be directly available, monitor all folders containing C# scripts under assets, and directly copy them to any directory under assets
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
namespace Naninovel