This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEditor.Build; | |
using UnityEditor.Build.Reporting; | |
namespace BrunoMikoski.Framework.BuildTools | |
{ | |
public sealed class RidiculousFastBuild : IPostprocessBuildWithReport | |
{ | |
int IOrderedCallback.callbackOrder => 1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE DONT put in an editor folder! | |
using UnityEngine; | |
public class AutohookAttribute : PropertyAttribute | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BrunoMikoski.Pahtfinding.Grid; | |
using UnityEngine; | |
namespace BrunoMikoski.Pahtfinding.Fill | |
{ | |
public sealed class FillController : MonoBehaviour | |
{ | |
[SerializeField] | |
private float mimumValueAsBlock = 0.5f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace BrunoMikoski.Pahtfinding.Grid | |
{ | |
public sealed class GridController : MonoBehaviour | |
{ | |
[SerializeField] | |
private int gridSizeX; | |
public int GridSizeX | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vector2 movePos; | |
if (RectTransformUtility.ScreenPointToLocalPointInRectangle( | |
targetCanvas.transform as RectTransform, | |
Input.mousePosition, camera, | |
out movePos)) | |
{ | |
Vector3 mousePos = targetCanvas.transform.TransformPoint(movePos); | |
cursorRectTransform.position = mousePos; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEditor.AnimatedValues; | |
using UnityEditorInternal; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
[CustomEditor(typeof (Object), true, isFallback = true)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Returns a position on the edge of the screen | |
/// </summary> | |
/// <param name="horizontal">0 being left, and 1 being right</param> | |
/// <param name="vertical">0 being botton, and 1 being top of the screen</param> | |
/// <param name="horizontalPadding">Padding from the screen, 0 means on screen, and 0.1 will be 10% off the screen</param> | |
/// <param name="verticalPadding"> </param> | |
/// <returns></returns> | |
public Vector3 GetOffScreenPosition(float horizontal, | |
float vertical, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <summary> | |
/// Mono singleton. From http://wiki.unity3d.com/index.php?title=Singleton#Generic_Based_Singleton_for_MonoBehaviours | |
/// </summary> | |
public abstract class MonoSingleton<T> : MonoBehaviour where T : MonoSingleton<T> | |
{ | |
private static T m_Instance = null; | |
public static T Instance | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Simple pooling for Unity. | |
/// Author: Martin "quill18" Glaude ([email protected]) | |
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267 | |
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
/// UPDATES: | |
/// 2015-04-16: Changed Pool to use a Stack generic. | |
/// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
[RequireComponent(typeof(Collider))] | |
/// <summary> | |
/// General purpose trigger volume system | |
/// | |
/// </summary> | |
/// <author>Bruno Mikoski</author> |
NewerOlder