Skip to content

Instantly share code, notes, and snippets.

@DGoodayle
DGoodayle / VectorRangeAttribute.cs
Last active October 13, 2022 21:18
Limit a Vector2 within a certain range like a boss.
using UnityEngine;
using UnityEditor;
/*
Vector Range Attribute by Just a Pixel (Danny Goodayle @DGoodayle) - http://www.justapixel.co.uk
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@DGoodayle
DGoodayle / ExtendedComponentReodering.cs
Last active April 17, 2016 08:00
Move to Top, Move to Bottom on components - Just put this in your Editor folder!
using UnityEngine;
using UnityEditor;
/*
Extended Component Reodering by Just a Pixel (Danny Goodayle) - http://www.justapixel.co.uk
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@DGoodayle
DGoodayle / QuadTreeTest.cs
Last active June 9, 2023 10:59
Quadtree in Unity
using UnityEngine;
using System.Collections;
public class QuadTreeTest : MonoBehaviour {
public class TestObject : IQuadTreeObject{
private Vector3 m_vPosition;
public TestObject(Vector3 position){
m_vPosition = position;
}
public Vector2 GetPosition(){
@DGoodayle
DGoodayle / RadialLayout.cs
Created September 16, 2015 13:48
Radial Layouts in Unity
using UnityEngine;
using UnityEngine.UI;
/*
Radial Layout Group by Just a Pixel (Danny Goodayle) - http://www.justapixel.co.uk
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell