Skip to content

Instantly share code, notes, and snippets.

View gakkossphynx's full-sized avatar
💯
Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work

SPHYNX gakkossphynx

💯
Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work-Work
  • TR
View GitHub Profile
@andrew-raphael-lukasik
andrew-raphael-lukasik / .TextureColorFillCalculator.cs.md
Last active September 28, 2023 18:52
Texture Color Fill Calculator

test1 test2 test3 test4

@unitycoder
unitycoder / gist:199ff1dfd521bd9e9ae1e70e44e6bc5d
Last active September 25, 2021 08:14
[Fixefox GreaseMonkey Plugin Script] Fix Old Asset Store Links
// ==UserScript==
// @name Fix Old Asset Store Links
// @version 1
// @include https://www.assetstore.unity3d.com/*
// @grant none
// ==/UserScript==
// get current url
var URL = window.location.href;
@yasirkula
yasirkula / ShaderStripper.cs
Last active May 6, 2025 20:50
Stripping commonly unused shader variants in Unity's built-in render pipeline
//#define SHADER_COMPILATION_LOGGING
//#define SKIP_SHADER_COMPILATION
using System.Collections.Generic;
using UnityEditor.Build;
using UnityEditor.Rendering;
using UnityEngine;
using UnityEngine.Rendering;
public class ShaderStripper : IPreprocessShaders
@ditzel
ditzel / MeshDestroy.cs
Created August 19, 2019 19:02
MeshDestroy => Put it on a game object with a mesh filter and renderer. Make sure to have read/write enabled on fbx import
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeshDestroy : MonoBehaviour
{
private bool edgeSet = false;
private Vector3 edgeVertex = Vector3.zero;
private Vector2 edgeUV = Vector2.zero;
@SradnickDev
SradnickDev / Timer.cs
Created June 14, 2019 11:23
Timer using Photon Unity Network / Pun 2
using System;
using ExitGames.Client.Photon;
using Photon.Pun;
using Photon.Realtime;
using UnityEngine;
/// <summary>
/// PhotonNetwork Timer, using Photon Events(RaiseEvents).
/// Call Initialize() as soon as the Timer should react to Photon Callbacks(RaiseEvents), Deinitialize if not needed.
/// Every Client should Update the Timer : timer.Update(Time.deltaTime)
@Oxeren
Oxeren / MySingletonSO.cs
Last active February 15, 2024 04:57
Auto singleton Unity ScriptableObject. Derive your class from this class (and use your class as the generic type), create an instance in the Resources folder (name of the instance must be the same as the name of your class). Then you will be able to access the singleton via static Instance property without having to add boilerplate code.
// Example Scriptable Object. Instance must be placed in Resources folder and have the same name as the class, type of generic parameter must be your class.
using UnityEngine;
[CreateAssetMenu(fileName = "MySingletonSO")]
public class MySingletonSO : SingletonScriptableObject<MySingletonSO>
{
// Here goes your data. This class can be called by the static Instance property, which will automatically locate the instance in the Resources folder.
}
@kurtdekker
kurtdekker / CallAfterDelay.cs
Last active April 6, 2025 20:50
Call After Delay - handy Unity3D coroutine to do something later
using UnityEngine;
using System.Collections;
public class CallAfterDelay : MonoBehaviour
{
float delay;
System.Action action;
// Will never call this frame, always the next frame at the earliest
public static CallAfterDelay Create( float delay, System.Action action)
@ErikOG
ErikOG / TMP_InputFieldCustom.cs
Created August 8, 2018 02:12
This is a quick fix to make TMP_InputField not dependant on the IMGUI Package. Has some flaws that need sorting; look at the methods "KeyPressed", "handleKey" and "OnUpdateSelected".
//#define TMP_DEBUG_MODE
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
@ErikOG
ErikOG / SingletonMonoBehaviour.cs
Created August 8, 2018 01:11
Most singletons out there will 'destroy' other instances, I think there shouldn't be more than one instance of it to begin with, if there are we just want to find out about it so we can fix the core of the problem and not just the symptom.
using UnityEngine;
#if UNITY_EDITOR || DEBUG
using System;
using UnityEngine.SceneManagement;
#endif
public class SingletonMonoBehaviour<T> : MonoBehaviour where T : MonoBehaviour {
private static T _instance = null;
public static T Instance {
@ssshake
ssshake / isWrit
Last active June 21, 2024 10:28
Photon PUN Cheat Sheet
## Photon Methods
**public class Blank : Photon.PunBehaviour**
instead of mono behavior, use this to receive photon callbacks in your script.
**public override void OnLeftRoom()**
An example of overriding a punbehavior callback