Skip to content

Instantly share code, notes, and snippets.

@fumobox
fumobox / PlateauLod2FbxImporterWindow.cs
Created April 5, 2021 22:28
PLATEAUのLOD2FBXを読むエディタ拡張
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
public sealed class PlateauLod2FbxImporterWindow : EditorWindow
{
[MenuItem("Window/PLATEAU LOD2 FBX Importer")]
public static void ShowWindow()
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEngine;
public sealed class MeshOptimizerWindow : EditorWindow
{
private GameObject _go;
[MenuItem("Window/PLATEAU Mesh Optimizer")]
using UnityEditor;
using UnityEngine;
public static class AnimationConverter
{
[MenuItem("Assets/Animation/CopyAnimationClipAsLegacy", true)]
public static bool ValidateCopyAnimationClipAsLegacy()
{
return Selection.activeObject is AnimationClip;
}
using UnityEngine;
public class BezierCurve
{
public Vector2[] ControlPoints { get; set; }
public BezierCurve(Vector2[] controlPoints)
{
ControlPoints = controlPoints;
using System;
public static class LoopBreaker
{
private static long[] _counts = new long[10];
private static long Limit = 10000;
public static void Increment(int id = 0)
{
@fumobox
fumobox / MazeModel.cs
Created February 16, 2019 16:10
MazeModel
using System;
using System.Collections;
using System.Collections.Generic;
using Random = UnityEngine.Random;
public class MazeModel
{
BlockMap _map = new BlockMap();
public BlockMap Map => _map;
@fumobox
fumobox / TemplateGenerator.cs
Created November 18, 2017 13:06
Simple class generator for Unity
using UnityEditor;
using UnityEngine;
using System.IO;
namespace MPF.Editor
{
public class TemplateGenerator: EditorWindow
{
readonly string GeneralTemplate =
"using System.Collections;" + System.Environment.NewLine +
@fumobox
fumobox / CacheManager.cs
Last active November 18, 2015 08:16
CacheManager.cs
using UnityEditor;
using UnityEngine;
using System.IO;
using System.Collections;
public static class CacheManager {
[UnityEditor.MenuItem("Cache/Clear Caches")]
public static void Clear() {
Debug.LogWarning("Delete " + Application.persistentDataPath);
@fumobox
fumobox / XPref.cs
Last active August 29, 2015 14:07
XPref.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Serialization;
using System.IO;
using System.Security.Cryptography;
public class XPref {
class Xorshift {
private var x:UInt;
private var y:UInt;
private var z:UInt;
private var w:UInt;
private var t:UInt;
public function new(x:UInt = 1234, y:UInt = 5678, z:UInt = 9876, w:UInt = 5432) {