Skip to content

Instantly share code, notes, and snippets.

View Bian-Sh's full-sized avatar

雨落随风 Bian-Sh

View GitHub Profile
@jamiephan
jamiephan / README.md
Last active November 14, 2024 23:02
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
@YN-Studio
YN-Studio / MeasureToolEditor.cs
Created October 14, 2023 03:10
基于Odin Inspector的Unity2D测量工具。Unity2D measure tool using Odin Inspector
using System.Collections.Generic;
using Sirenix.OdinInspector;
using Sirenix.OdinInspector.Editor;
using UnityEditor;
using UnityEngine;
/// <summary>
/// 地编中使用的测量工具(2D)
/// </summary>
public class MeasureToolEditor : OdinEditorWindow
@yasirkula
yasirkula / SlicedFilledImage.cs
Last active October 27, 2024 11:21
Combining UI Image's Sliced+Filled features together in Unity
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
#if UNITY_2017_4 || UNITY_2018_2_OR_NEWER
using UnityEngine.U2D;
#endif
using Sprites = UnityEngine.Sprites;
#if UNITY_EDITOR
@fishtopher
fishtopher / HighlightAttribute.cs
Last active November 28, 2023 04:23
Highlight Property Drawer - Simply sets the text/background colour of a field in the inspector.
// Do NOT put me in an /Editor/ folder
// Questions/bugs: [email protected]
using UnityEngine;
public class HighlightAttribute : PropertyAttribute {
public Color col;
public HighlightAttribute(float r=1, float g=0, float b=0) {
this.col = new Color(r,g,b,1);
@LotteMakesStuff
LotteMakesStuff / EditorExtensionMethods.cs
Last active April 28, 2023 09:50
A reimplementation of the logic in the Unity Editor that draws an inspector for a component. We can use this to learn how unity actually draws the inspector. for more info see https://www.patreon.com/posts/16724128
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Reflection;
public static class EditorExtensionMethods
{
// Public reimplmentation of extention methods and helpers that are marked internal in UnityEditor.dll
@LotteMakesStuff
LotteMakesStuff / InspectorButtonsTest.cs
Last active November 10, 2024 13:09
Code running pack! two property drawing scripts that make it super easy to trigger code via buttons in the inspector, and get feedback! [TestButton] draws you little buttons that call a method on your MonoBehaviour, and [ProgressBar] give you a great way to show feedback from long running methods. These are *super* helpful for things like proced…
using UnityEngine;
using System.Collections;
public class InspectorButtonsTest : MonoBehaviour
{
[TestButton("Generate world", "DoProcGen", isActiveInEditor = false)]
[TestButton("Clear world", "ClearWorld", 2, isActiveInEditor = false)]
[ProgressBar(hideWhenZero = true, label = "procGenFeedback")]
public float procgenProgress = -1;
@sabresaurus
sabresaurus / AutoComponentAttribute.cs
Last active July 28, 2021 17:49
Automatic binding of component references
// MIT License
//
// Copyright (c) 2018 Sabresaurus
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@treefortress
treefortress / ParticleScaler.cs
Last active October 7, 2019 04:29
Scale Unity ParticleSystem at Runtime
using UnityEngine;
public static class ParticleExtensions
{
/// Add Extension to the native ParticleSystem class.
/// eg: myParticleSystem.Scale(2);
public static void Scale(this ParticleSystem particles, float scale, bool includeChildren = true) {
ParticleScaler.Scale(particles, scale, includeChildren);
}
@thelucre
thelucre / transparentbg-unity-webgl.jslib
Last active August 11, 2023 07:44
Transparent WebGL Rendering
// Source: http://forum.unity3d.com/threads/webgl-transparent-background.284699/#post-1880667
// Clears the WebGL context alpha so you can have a transparent Unity canvas above DOM content
// Add this .jslib to your project et voila!
var LibraryGLClear = {
glClear: function(mask)
{
if (mask == 0x00004000)
{
var v = GLctx.getParameter(GLctx.COLOR_WRITEMASK);
if (!v[0] && !v[1] && !v[2] && v[3])
@wzup
wzup / .bashrc
Last active May 17, 2023 00:49
alias for Git Bash on Windows
# create a file C:\Users\[user]\.bashrc
# add this content
# add your onw aliases or changes these ones as you like
# to make a dot (.bashrs) file in windows, create a file ".bashrs." (without extention) and save. windows will save it as ".bashrc"
alias ls='ls -alh'
alias cdnginx='cd /c/nginx && ls'
alias cdmcga='cd /c/Users/[user]/sbox/node/mcga && ls'
alias cdfood9='cd /c/Users/[user]/sbox/node/food9 && ls'
alias cdmysql='cd /c/nginx/mysql/bin && ls'