Skip to content

Instantly share code, notes, and snippets.

View maximetinu's full-sized avatar
🌔
🔭

Miguel Medina Ballesteros maximetinu

🌔
🔭
View GitHub Profile
@m-rogalski90
m-rogalski90 / UnityThread.cs
Last active December 9, 2018 14:29
Bunch of scripts for the Unity to help with the development process
public sealed class UnityThread
: MonoBehaviour
{
#if DEBUG
[SerializeField]
#endif
private List<UnityThreadAction> m_Actions = new List<UnityThreadAction>();
void Start()
{
@harmittaa
harmittaa / CameraFocusController.cs
Last active July 21, 2023 00:49
CameraFocusController.cs for Vuforia ARCamera camera focus mode example
// full tutorial here:
// https://medium.com/@harmittaa/setting-camera-focus-mode-for-vuforia-arcamera-in-unity-6b3745297c3d
using UnityEngine;
using System.Collections;
using Vuforia;
public class CameraFocusController: MonoBehaviour {
// code from Vuforia Developer Library
@HIMISOCOOL
HIMISOCOOL / HelloOO.cs
Created July 1, 2017 22:40
Rust doesnt have inheritance but that doesnt mean you cant do the same things
using System;
namespace HelloWorld
{
abstract class Waterway
{
internal string name;
}
class Sea : Waterway
@mob-sakai
mob-sakai / RemoveEmptyFolders.cs
Last active September 22, 2023 18:33
Automatically remove empty folders in project for Unity.
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Linq;
using System;
/// <summary>
/// Remove empty folders automatically.
using UnityEditor;
using UnityEngine;
public class ReplacerWizard : ScriptableWizard
{
[SerializeField] private GameObject prefab = null;
[MenuItem("Tools/Replacer")]
static void CreateWizard()
{
@LotteMakesStuff
LotteMakesStuff / 1.md
Last active January 2, 2025 21:54
UPM: How to make a custom package

UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!


Todo

  • Modify the project manifest
  • Make a package manifest
  • Package the manifest up with some test code
  • Try it out in Unity!

@sebtoun
sebtoun / Easing.cs
Last active January 28, 2022 14:18 — forked from cjddmut/EasingFunctions.cs
Easing Functions for Unity with support for Inspector with animation preview and Animation Curve for custom easing
using System;
using UnityEngine;
[ Serializable ]
public class Easing
{
public enum EasingType
{
Curve,
Function
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
// This is only useful for spritesheets that need to be automatically sliced (Sprite Editor > Slice > Automatic)
public class AutoSpriteSlicer
{
[MenuItem("Tools/Slice Spritesheets %&s")]
using UnityEngine;
public class DistanceJoint3D : MonoBehaviour {
public Transform ConnectedRigidbody;
public bool DetermineDistanceOnStart = true;
public float Distance;
public float Spring = 0.1f;
public float Damper = 5f;
@TJHeuvel
TJHeuvel / CustomPrefabImporterEditor.cs
Last active November 9, 2019 18:30
Custom inspector window for Unity prefabs that allows you to (multi) edit them.
using UnityEditor;
using UnityEditor.Experimental.AssetImporters;
using UnityEngine;
using System.Reflection;
using System;
using System.Collections;
using System.Linq;
using Object = UnityEngine.Object;
using System.Collections.Generic;