Skip to content

Instantly share code, notes, and snippets.

Avatar

Johan Klokkhammer Helsing johanhelsing

View GitHub Profile
@favoyang
favoyang / BuildAddressables.cs
Last active January 4, 2023 07:40
Build addressable bundles when clicking the build button
View BuildAddressables.cs
/// <summary>
/// The script gives you choice to whether to build addressable bundles when clicking the build button.
/// For custom build script, call PreExport method yourself.
/// For cloud build, put BuildAddressablesProcessor.PreExport as PreExport command.
/// Discussion: https://forum.unity.com/threads/how-to-trigger-build-player-content-when-build-unity-project.689602/
///
/// License: The MIT License https://opensource.org/licenses/MIT
/// </summary>
using UnityEditor;
using UnityEditor.AddressableAssets;
@tomkail
tomkail / ExtendedScriptableObjectDrawer.cs
Last active February 2, 2023 10:58
Displays the fields of a ScriptableObject in the inspector
View ExtendedScriptableObjectDrawer.cs
// Developed by Tom Kail at Inkle
// Released under the MIT Licence as held at https://opensource.org/licenses/MIT
// Must be placed within a folder named "Editor"
using System;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
View gist:2c7851c78c5de14c80b1
# Report removal
reports: 10
action: remove
modmail: The above item has been automatically removed due to receiving at least 2 reports. Please verify that this action was correct.
comment: This post has been removed due to receiving too many reports from users. The mods have been messaged and will reapprove if this removal was inappropriate.
---
@gaearon
gaearon / ClassNameMixin.js
Last active March 23, 2018 17:18
BEM in React
View ClassNameMixin.js
'use strict';
var React = require('react'),
classSet = require('react/lib/cx'),
_ = require('underscore');
var ClassNameMixin = {
propTypes: {
className: React.PropTypes.string,
context: React.PropTypes.string
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active February 5, 2023 01:48
GLSL Noise Algorithms
View GLSL-Noise.md

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);
}