Skip to content

Instantly share code, notes, and snippets.

View arkms's full-sized avatar
👨‍💻
Coding... 01101000 01100101 01101100 01101100 01101111

arkms

👨‍💻
Coding... 01101000 01100101 01101100 01101100 01101111
View GitHub Profile
@arkms
arkms / cUpdate
Created October 5, 2016 02:15
Costum Update with delays between every call
//Intervalo entre cada Update,, la ventaja es que podemos cambiar
//su valor ya sea dentro del mismo cUpdate o desde otra función.
float intervalos = 0.5f;
void Start()
{
StartCoroutine(cUpdate());
}
@arkms
arkms / DebugX
Created June 27, 2016 03:35
DebugX version 2.0
using UnityEngine;
public static class DebugX
{
// DebugX.cs Version 2.0 By ARKMS
// Hayden Scott-Baron (Dock) - http://starfruitgames.com
// Adds a number of useful Debug Draw features
public static void DrawCube(Vector3 pos, Color col, Vector3 scale, float _duration = 0f)
{
Vector3 halfScale = scale * 0.5f;
@arkms
arkms / DisableAutoMipMaps
Created June 1, 2016 03:51
Make all new texture has MipMaps disable. Remember save inside a 'Editor' folder
using UnityEngine;
using UnityEditor;
public class DisableAutoMipMaps : AssetPostprocessor
{
public void OnPreprocessTexture()
{
TextureImporter texture = assetImporter as TextureImporter;
texture.mipmapEnabled = false;
}
@arkms
arkms / Sceneview_follow
Created June 1, 2016 03:46
Make the Scene view move and follow a camara (2D)
#define AUTO_SCENEVIEW //Comentar para dejar de perseguir y poder controlar la pestaña de escena en modo Play
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class sceneview_follow : MonoBehaviour
{
#if UNITY_EDITOR && AUTO_SCENEVIEW
@arkms
arkms / BoxCollider2DAlwaysVisible
Created June 1, 2016 03:39
Make always visible a BoxCollider2D in Unity Editor.
using UnityEngine;
[ExecuteInEditMode]
public class BoxCollider2DAlwaysVisible : MonoBehaviour
{
public Color color = Color.white;
private BoxCollider2D BoxCollider;
void Start()