Skip to content

Instantly share code, notes, and snippets.

col000r

Block or report user

Report or block col000r

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@col000r
col000r / manifest.json
Created Feb 11, 2019
How to add scope registries to your package manifest
View manifest.json
{
"scopedRegistries": [
{
"name": "Tools",
"url": "http://34.247.102.143:4873/",
"scopes": [
"at.blackish"
]
}
],
@col000r
col000r / package.json
Last active Jan 8, 2019
package with dependencies
View package.json
{
"name": "com.company.yourpackage",
"displayName": "Your Package's Name",
"version": "1.0.0",
"unity": "2018.3",
"description": "The description of your package",
"keywords": [ "package", "unity", "yeah" ],
"dependencies": {
"com.company.otherpackage": "1.0.5",
"com.company.thirdpackage": "2.1.0"
@col000r
col000r / package.json
Last active Jan 8, 2019
package.json
View package.json
{
"name": "com.company.yourpackage",
"displayName": "Your Package's Name",
"version": "1.0.0",
"unity": "2018.3",
"description": "The description of your package",
"keywords": [ "package", "unity", "yeah" ],
"dependencies": {}
}
@col000r
col000r / PingTest.cs
Created Sep 8, 2014
MORILD is looking for freelancers! Show me you can code by completing this little script!
View PingTest.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class PingTest : MonoBehaviour {
public List<string> urls = new List<string>() { "google.com", "http://altavista.com", "https://github.com/explore", "maps.google.com" };
void Start () {
@col000r
col000r / CameraLookAt.cs
Created Jul 8, 2014
Make a camera look at an object, make it smoothly follow its path, and don't jerk-turn around when it moves beyond 0 or 360 degrees, dammit.
View CameraLookAt.cs
using UnityEngine;
using System.Collections;
/// <summary>
/// Put this script on a camera, assign a target and the camera will always look at that target, smoothly following it.
/// </summary>
public class CameraLookAt : MonoBehaviour {
public Transform target; //Look at this
private Transform aimTarget;
@col000r
col000r / DrawLineAATest.cs
Created May 13, 2014
A translation of the code found on wikipedia to C# for use in the unity editor. (I used this to draw lines on a texture, then saved the texture as a PNG...)
View DrawLineAATest.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class DrawLineAATest : EditorWindow {
private Texture2D tex;
//http://en.wikipedia.org/wiki/Xiaolin_Wu's_line_algorithm
@col000r
col000r / AnimationCurveOutput.cs
Created Apr 1, 2014
#Unity3D Output all the AnimationCurves found on the current selection to the console, nicely formatted so they can simply be copy/pasted into your script! Introspection, baby!
View AnimationCurveOutput.cs
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
public class AnimationCurveOutput : EditorWindow {
[MenuItem("Assets/Log AnimationCurves")]
public static void LogAnimCurves() {
//Get selection
@col000r
col000r / README.md
Last active Aug 29, 2015
Unity3D + Triton Ocean + Inno Setup = Installer
View README.md

Inno Setup script for a Unity Project using Triton Ocean

This script creates an installer that puts everything Triton Ocean needs to function in the correct place and then installs the Visual C++ 2010 SP1 runtime libraries as well as the latest DirectX runtime libraries.

The script automatically checks if the correct version of the Visual C++ runtime is already installed and skips that step if it is (No thanks to me, I got the code from StackOverflow)

The DirectX runtime installer is always run. If you happen to know how to make a check and skip this step if it's not necessary, I'd love to know! (Especially since the DirectX web setup needs an online connection and installs their bing-bar bloatware on your PC unless you uncheck the box...)

Prerequisites

@col000r
col000r / PlayModeSwitch.cs
Last active Aug 29, 2015
Unity3D: Automatic Layout-switching whenever you enter/exit play-mode!
View PlayModeSwitch.cs
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
class PlayModeSwitch : EditorWindow {
static bool lastValue = false;
static PlayModeSwitch () {
if(!EditorPrefs.GetBool("AutoSwitchToggle", false)) return; //Check if feature is enabled
@col000r
col000r / CreateEmptyParented.cs
Last active Aug 29, 2015
Drop this into the Editor folder. Press Shift+Cmd/Ctrl+Alt+N to create a new GameObject that is parented to the currently selected Object. Press Cmd/Ctrl+G to group the selected GameObject into a new GameObject.
View CreateEmptyParented.cs
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
public class CreateEmptyParented : EditorWindow {
[MenuItem("GameObject/Create Empty (Parented to Selection) %&#n", false, -1)]
static void CreateEmptyParentedNow() {
List<Object> creations = new List<Object>();
You can’t perform that action at this time.