Skip to content

Instantly share code, notes, and snippets.

View nukadelic's full-sized avatar
☣️

Nukadelic nukadelic

☣️
View GitHub Profile
@nukadelic
nukadelic / Tween.cs
Created February 27, 2022 23:49
Unity Tweener for MonoBehaviours
using System.Collections.Generic;
using UnityEngine;
#region global component extension functions
public static class TweenEx
{
/// <summary> Main tweener fucntion </summary>
public static Tween tween( this Component comp, float duration = 1f, Tween.EaseType ease = default, float delay = 0f, bool autoStart = true )
{
@nukadelic
nukadelic / ContextMenuEditor.cs
Created September 29, 2021 23:50
Unity Context Menu Editor Window
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Reflection;
public class ContextMenuEditor : EditorWindow
{
[MenuItem("Tools/Edit Context Menu")] static void Init() => GetWindow<ContextMenuEditor>().Show();
System.Type UnityEditorMenuClass;
@nukadelic
nukadelic / FibonacciSphere.cs
Last active February 10, 2023 14:05
Fibonacci Sphere ( Unity3D )
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class FibonacciSphere : MonoBehaviour
{
[Range(0,500)] public int count = 200;
[Range(0,2f)] public float radius = 1f;
@nukadelic
nukadelic / DisableXR.cs
Created December 15, 2020 16:09
Unity Disable / Enable XR On Enter play mode via mono behaviour script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
[ExecuteInEditMode]
public class DisableXR : MonoBehaviour
{
@nukadelic
nukadelic / EditorSceneGUIOverlay.cs
Last active September 17, 2020 12:42
EditorSceneGUIOverlay
#if UNITY_EDITOR
using System.Reflection;
using UnityEditor;
using System.Linq;
using UnityEngine;
public class EditorSceneGUIOverlay : Editor
@nukadelic
nukadelic / EditorFontSize.cs
Last active April 15, 2024 14:44
Unity Editor Font Size Changer -- EditorStyles
#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Reflection;
public class EditorFontSize : EditorWindow
{
// enable resize on launch to set a default font size , using this option will disable the ability to have the window accassible
@nukadelic
nukadelic / index.php
Created March 19, 2020 09:22
PHP CDN - Upload file , list all files , delete file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport'/>
<meta name="viewport" content="width=device-width"/>
<title>PHP CDN</title>
@nukadelic
nukadelic / tensorflow_to_barracuda.py
Last active January 6, 2020 12:07
Modfied barracuda converter ( tensorflow-pb to unity-nn ) [ 0.3.2 ]
from __future__ import print_function
import numpy as np
import struct # convert from Python values and C structs
import tensorflow as tf
import re
import barracuda
from barracuda import Struct
from google.protobuf import descriptor
from google.protobuf.json_format import MessageToJson
@nukadelic
nukadelic / Dynamical Uniform Boundedness Conjecture brute force.js
Last active November 13, 2020 09:40
Dynamical Uniform Boundedness Conjecture brute force
// as seen on : https://www.youtube.com/watch?v=N92w4e-hrA4
// using : https://github.com/infusion/Fraction.js/blob/master/fraction.min.js
function makeLoop( z, c, loop_limit = 7, max_value = 1000000 )
{
var loop = [ z ];
var calc_func = ( vz, vc ) => vz.mul( vz ).add( vc );
@nukadelic
nukadelic / MLAgentsFileConfigEditor.cs
Last active September 25, 2019 17:10
Unity ML Agents File Config Editor
// Download the DLL here:
// https://www.nuget.org/packages/YamlDotNet/
// at "Download package ( ... KB )"
// browse for the lib > .Net35 folder copy paste the dll into your unity assets folder
// Note this script file must be located inside a folder named "Editor"
using System;
using System.Text;
using System.IO;