Skip to content

Instantly share code, notes, and snippets.

View Democide's full-sized avatar

Democide

View GitHub Profile
@Democide
Democide / science-of-well-being-notes.txt
Last active November 25, 2020 18:30
Science of Well-Being Notes
Annoying Features of the Mind
- Our intuitions about what makes us happy are often wrong
- We use reference points that might be harmful
- Hedonic adaption: We get used to good things
- We are not aware of the effect of hedonic adaption
Better Wanting
@Democide
Democide / Mez_gau-shanklink-rattlehand.txt
Last active October 26, 2020 17:30
Wildsea playtest char
@Democide
Democide / ShortcutToggleObjectActivation.cs
Last active October 23, 2021 12:04
Simple Unity script to toggle the activation state of selected game objects
using UnityEngine;
using System.Collections;
using UnityEditor;
public static class ShortcutToggleObjectActivation
{
// LEFT ALT + LEFT SHIFT + A to toggle active state of selected GameObjects
[MenuItem("Shortcuts/Toggle Selected GameObjects Active #&a")]
static void SaveGameOpenFolder()
{
@Democide
Democide / SkewedGridLayoutGroup.cs
Last active May 27, 2024 20:06
Skewed Grid Layout Group - Unity UI Extension
/// Skewed Grid Layout Group
/// ===============================
///
/// Written by Martin Nerurkar
/// - http://www.martin.nerurkar.de
/// - http://www.sharkbombs.com
///
/// You are free to moddify and use this code in your own projects
/// You are not allowed to remove this copyright notice
/// You are not allowed to resell this code, even if modified
@Democide
Democide / ReorderableListUtility.cs
Last active November 15, 2022 14:01
A simple helper class that generates a Reorderable List in Unity that can be folded out.
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
public static class ReorderableListUtility {
public static ReorderableList GetListWithFoldout(SerializedObject serializedObject, SerializedProperty property, bool draggable, bool displayHeader, bool displayAddButton, bool displayRemoveButton) {
var list = new ReorderableList(serializedObject, property, draggable, displayHeader, displayAddButton, displayRemoveButton);
list.drawHeaderCallback = (Rect rect) => {
/* To avoid performance issues caused by string constructions when logging stuff
* to the console, this script uses the custom DEBUG_LOGGING define to disable logging
*
* Replace all calls to Debug.Log etc with calls to DebugSafe.Log.
*
* When creating a non-debug build or testing the game for performance, you can disable
* the debug messages by disabling the custom define.
*/
using UnityEngine;
// LoadingScreenManager
// --------------------------------
// built by Martin Nerurkar (http://www.martin.nerurkar.de)
// for Nowhere Prophet (http://www.noprophet.com)
//
// Licensed under GNU General Public License v3.0
// http://www.gnu.org/licenses/gpl-3.0.txt
using UnityEngine;
using UnityEngine.UI;