Skip to content

Instantly share code, notes, and snippets.

@shane-harper
shane-harper / appCenterUpload.sh
Created March 6, 2019 13:17
Simple AppCenter Upload Script
#!/bin/sh
owner_name="appcenter-username"
app_name="App-Name"
token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
build_path="Unity-iPhone.ipa"
destination_name="Collaborators"
release_notes="Release notes go here"
# Step 1: Create an upload resource and get an upload_url (good for 24 hours)
request_url="https://api.appcenter.ms/v0.1/apps/${owner_name}/${app_name}/release_uploads"
@shane-harper
shane-harper / LabelledEnumArrayAttribute.cs
Created December 13, 2018 11:49
Use enum values as labels on arrays use [LabelledEnumArray(typeof( ??? ))]
using System;
using UnityEngine;
/// <summary>
/// Use enum values as labels on an array
/// </summary>
/// <remarks>Should not be placed in an Editor folder</remarks>
public class LabelledEnumArrayAttribute : PropertyAttribute
{
public readonly Type EnumType;
@shane-harper
shane-harper / SceneAutoLoader.cs
Last active June 4, 2019 12:39
Auto opens a scene on Unity Editor play
using System;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
[InitializeOnLoad]
internal static class SceneAutoLoader
{
private const string MenuFolder = "Edit/Scene Auto Load/";
@shane-harper
shane-harper / MetaCopier.cs
Created November 2, 2018 15:42
A handy tool for copying Unity meta data from one asset to another (Place in Editor folder)
using System.Collections.Generic;
using System.IO;
using System.Text;
using UnityEditor;
using UnityEngine;
/// <summary>
/// Tool for copying Unity meta data directly from one file to another
/// </summary>
public class MetaCopier : EditorWindow
using System.Text;
using UnityEditor;
using UnityEngine;
public class AnimationCurveCreator : EditorWindow
{
private const string Title = "Curve Creator";
[SerializeField]
private AnimationCurve _curve = new AnimationCurve(new Keyframe(0, 0, 0, 0), new Keyframe(1, 1, 0, 1));