Skip to content

Instantly share code, notes, and snippets.

View robinnorth's full-sized avatar
:octocat:

Robin North robinnorth

:octocat:
View GitHub Profile
@dpid
dpid / how-to-notarize-unity-for-macos.md
Last active December 6, 2023 20:42
How to notarize a Unity build for MacOs 10.15 Catalina

How to notarize a Unity build for macOs 10.15 Catalina

As of January 2020, all apps running on macOs 10.15 Catalina are required to be notarized. For Unity games distributed outside the Mac App Store, such as with Steam, the notarization process is done post build using a series of Xcode command line tools.

Prerequisites

  • a Mac that is compatible with macOs 10.15 Catalina :
    • MacBook (2015 or newer)
    • MacBook Air (2012 or newer)
  • MacBook Pro (2012 or newer)
@pyjamads
pyjamads / AutoExpandGridLayoutGroup.cs
Last active December 29, 2022 10:07
A Unity UI Auto expanding grid layout group, that automatically changes column and row count - adapted from collin_patrick's AutoExpandGridLayoutGroup https://forum.unity.com/threads/solved-how-to-make-grid-layout-group-cell-size-x-auto-expand.448534/
namespace UnityEngine.UI
{
[AddComponentMenu("Layout/Auto Expand Grid Layout Group", 152)]
public class AutoExpandGridLayoutGroup : LayoutGroup
{
public enum Corner { UpperLeft = 0, UpperRight = 1, LowerLeft = 2, LowerRight = 3 }
public enum Axis { Horizontal = 0, Vertical = 1 }
public enum Constraint { Flexible = 0, FixedColumnCount = 1, FixedRowCount = 2 }
[SerializeField]
@JohannesMP
JohannesMP / LICENSE
Last active March 9, 2024 11:26
[Unity3D] A Reliable, user-friendly way to reference SceneAssets by script.
/*******************************************************************************
* Don't Be a Jerk: The Open Source Software License.
* Adapted from: https://github.com/evantahler/Dont-be-a-Jerk
*******************************************************************************
* _I_ am the software author - JohannesMP on Github.
* _You_ are the user of this software. You might be a _we_, and that's OK!
*
* This is free, open source software. I will never charge you to use,
* license, or obtain this software. Doing so would make me a jerk.
*
@SeanMcTex
SeanMcTex / PinToSafeArea.cs
Last active March 2, 2024 07:27
Restrict Unity UI to an iPhone X or other Mobile Device's Safe Area
using UnityEngine;
/// <summary>
/// Resizes a UI element with a RectTransform to respect the safe areas of the current device.
/// This is particularly useful on an iPhone X, where we have to avoid the notch and the screen
/// corners.
///
/// The easiest way to use it is to create a root Canvas object, attach this script to a game object called "SafeAreaContainer"
/// that is the child of the root canvas, and then layout the UI elements within the SafeAreaContainer, which
/// will adjust size appropriately for the current device./// </summary>
@almaris
almaris / UGuiTextToTextMeshPro.cs
Last active January 28, 2019 10:07 — forked from Naphier/UGuiTextToTextMeshPro.cs
Unity3D Editor Tool to convert Unity GUI Text objects to Text Mesh Pro Text Objects
using UnityEngine;
using UnityEditor;
using UnityEngine.UI;
using TMPro;
using TMPro.EditorUtilities;
//original gist at https://gist.github.com/Naphier/df8b56b8b879b6f33ec4eea8e98840b9
public class UGuiTextToTextMeshPro : Editor
{
[MenuItem("GameObject/UI/Convert To Text Mesh Pro", false, 4000)]
//Attach to player object
using UnityEngine;
using UnityEngine.Networking;
using System.Collections;
public class Voice : NetworkBehaviour
{
int lastSample;
AudioClip c;
@n0mimono
n0mimono / YouTubeLiveController.cs
Created February 12, 2018 06:10
Unity script example for YouTube Live Streaming API
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System;
using System.Net;
using System.Text.RegularExpressions;
using UnityEngine;
using UnityEngine.Networking;
using SimpleJSON;
@benjibee
benjibee / scrape.js
Created February 10, 2018 13:19
A little script to import starred places saved as geoJSON data from Google Maps. Could be better. Works.
// This script is meant to import Google Maps starred places into
// another Google account.
// Given a geoJSON file of Google Maps starred places (places.json)
// exported by Google takeout (account backup) this script should
// open each place URL and manually click save.
// Upon first run, it's best to stop it and manually login to your
// Google account otherwise you'll run into a non-verified device
// issue. Run again and it should continue through with problems.
@simonbroggi
simonbroggi / BuildAutomation.cs
Last active March 14, 2024 06:01
Build mutliple Unity applications for multiple platforms with one click
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class BuildAutomation {
public struct BuildTargetAndGroup {
public BuildTargetGroup group;
public BuildTarget target;
@ChrisMcKee
ChrisMcKee / PredicatableGuid.cs
Last active April 19, 2024 08:49
Namespaced Deterministic Guid - RFC 4122 dotnetcore
using System;
using System.Security.Cryptography;
using System.Text;
namespace Utility
{
/// <summary>
/// Helper methods for working with <see cref="Guid"/>.
/// </summary>
public static class GuidUtility