Skip to content

Instantly share code, notes, and snippets.

View yCatDev's full-sized avatar
🎱
I just exist

Grebenuk Denis yCatDev

🎱
I just exist
View GitHub Profile
@yCatDev
yCatDev / CppBuildPreprocessing.cs
Created May 1, 2023 07:20
Script that enables Full Generic Sharing by default for all builds for Unity 2021
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
public class CppBuildPreprocessing : IPreprocessBuildWithReport
{
public int callbackOrder
{
get { return 0; }
@yCatDev
yCatDev / UnlitTexture.shader
Last active September 29, 2021 17:59 — forked from phi-lira/UnlitTexture.shader
URP Unlit Color Fade example
Shader "Custom/UnlitTexture"
{
Properties
{
[MainColor] _BaseColor("BaseColor", Color) = (1,1,1,1)
[MainTexture] _BaseMap("BaseMap", 2D) = "white" {}
}
// Universal Render Pipeline subshader. If URP is installed this will be used.
SubShader
@yCatDev
yCatDev / TextureMix.Shader
Last active January 17, 2021 14:59
Simple URP shader for blending two texures based on Lit Shader templete
// 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/TextureMix"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
@yCatDev
yCatDev / Greyscale.cs
Created September 28, 2020 19:24 — forked from CptAsgard/Greyscale.cs
Unity Greyscale image effect
using UnityEngine;
using System.Collections;
public class Greyscale : MonoBehaviour {
public Material mat;
void Start() {
mat.SetFloat( "_Power", 0.0f );
}
@yCatDev
yCatDev / ScriptableObjectProtector.cs
Last active September 18, 2024 06:22
Simple editor workaround for ScriptableObjects that fix saving changes after play mode.
#if UNITY_EDITOR
using System.Collections.Generic;
using ClickerFramework.Abstract;
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
public static class ScriptableObjectProtector
{
private static bool _playing = false;
@yCatDev
yCatDev / Knight.cs
Last active May 5, 2020 00:24
Knight chess problem solution
using System;
namespace TSS
{
public class Knight
{
public char X;
public int Y;
/// <summary>