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
@jamiephan
jamiephan / README.md
Last active September 21, 2024 10:18
A script to automatically add ALL items to your account in quixel

Script to add all items from quixel

As quixel is being removed, all items are free to aquire. This script is to automate the process to add items to your account (As of writing, a total of 18874 items)

Note: This script only tested in the latest version of Chrome.

How to use

  1. Copy the script from below (run.js)
  2. Login into https://quixel.com
using System;
using System.IO;
using System.Reflection;
using System.Text;
using Unity.Entities;
using UnityEditor;
/// <summary>
/// will create a new authring script based on an IComponentData
/// </summary>
@xabblll
xabblll / MeshPostprocessor.cs
Created June 15, 2024 21:24
Unity3D - Model postprocessor for fixing blend shapes normals and tangents
// Place inside Editor folder
using UnityEditor;
using UnityEngine;
namespace Code.Editor
{
public class MeshPostprocessor : AssetPostprocessor
{
private void OnPostprocessModel(GameObject g)
@meredoth
meredoth / LootProbabilities.cs
Last active September 13, 2024 15:31
An example of a loot probabilities table based on Unity's Animation and Min Max Curves. Check the explanation post (https://giannisakritidis.com/blog/Animation-And-Min-Max-Curves-In-Unity/)
public class LootProbabilities : MonoBehaviour
{
private const int MAX_LEVEL = 20;
private const float MAX_RARITY = 10;
[SerializeField] private ParticleSystem.MinMaxCurve lootRarityPerLevel;
[SerializeField] private AnimationCurve probabilitiesDistribution;
[ReadOnly, SerializeField] private LevelProbabilities[] probabilitiesPerLevel;
@yasirkula
yasirkula / SceneViewUIObjectPickerContextWindow.cs
Last active September 10, 2024 09:58
Select the UI object under the cursor via right click in Unity's Scene window
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
#if UNITY_2021_2_OR_NEWER
using PrefabStage = UnityEditor.SceneManagement.PrefabStage;
using PrefabStageUtility = UnityEditor.SceneManagement.PrefabStageUtility;
@pazzaar
pazzaar / AnimatorExtensions
Last active April 6, 2024 06:02
Animator rebind function that also maintains some state
using System.Collections.Generic;
using UnityEngine;
public static class AnimatorExtensions
{
public static void RebindAndRetainState(this Animator anim)
{
List<AnimatorStateInfo> animStates = new List<AnimatorStateInfo>();
for (int i = 0; i < anim.layerCount; i++)
{
@pazzaar
pazzaar / gist:17ab22412c7045fba2e002405d6d6cdd
Created September 4, 2021 09:19
Unity mesh info including LOD levels
using UnityEngine;
using System.Collections;
using UnityEditor;
public class MeshInfo : EditorWindow
{
bool showLOD1info = false;
bool showLOD2info = false;
bool showLOD3info = false;
bool showLOD4info = false;
@totallyRonja
totallyRonja / MaterialGradientDrawer.cs
Last active September 2, 2024 09:06
A Material Property Drawer for the [Gradient] attribute which lets you edit gradients and adds them to the shader as textures. More information here: https://twitter.com/totallyRonja/status/1368704187580682240
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
public class MaterialGradientDrawer : MaterialPropertyDrawer {
private int resolution;
@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;