Skip to content

Instantly share code, notes, and snippets.

@gmanny
gmanny / OptionJsonConverter.cs
Last active May 17, 2022 15:54
JsonConverter for LanguageExt.Option which serializes empty Options as nulls.
using System;
using System.Collections.Concurrent;
using System.Linq;
using System.Reflection;
using LanguageExt;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
public class OptionJsonConverter : JsonConverter
{
@JohannesDeml
JohannesDeml / EditPrefabInScene.cs
Last active May 17, 2023 04:40 — forked from ulrikdamm/EditPrefab.cs
Unity editor script for better editing of prefabs. Put in Assets/Editor.
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine.SceneManagement;
// From https://gist.github.com/JohannesDeml/5802473b569718c9c86de906b7039aec
// Original https://gist.github.com/ulrikdamm/338392c3b0900de225ec6dd10864cab4
// Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser).
// This opens an empty scene with your prefab where you can edit it.
// Put this script in your project as Assets/Editor/EditPrefab.cs