Skip to content

Instantly share code, notes, and snippets.

View dpid's full-sized avatar
🕶️
Jacked In

Damon Pidhajecky dpid

🕶️
Jacked In
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)
@dpid
dpid / Singleton.cs
Created February 22, 2018 00:37
Unity C# Generic singleton class
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public abstract class Singleton<T> : MonoBehaviour where T : Singleton<T>
{
private static T m_Instance = null;
public static T instance
{
get
@dpid
dpid / DepthMaskShadows.shader
Created October 18, 2017 23:19
A depth mask with shadows shader
Shader "FX/Matte Shadow Mask" {
Properties{
_Color("Main Color", Color) = (1,1,1,1)
_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
_Cutoff("Alpha cutoff", Range(0,1)) = 0.5
}
@dpid
dpid / DiffuseColorWithLightEstimation.shader
Last active September 21, 2017 14:06
ARCore shader for Google Blocks materials in Unity
Shader "ARCore/DiffuseColorWithLightEstimation"
{
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader
{
@dpid
dpid / TrackedPlaneRigidbody.cs
Created September 16, 2017 20:49
ARCore tracked plane rigidbody class. An experiment for adding tracked ground collision.
using System.Collections.Generic;
using UnityEngine;
using GoogleARCore;
using GoogleARCoreInternal;
public class TrackedPlaneRigidbody : MonoBehaviour
{
public bool isRenderingMesh = false;
@dpid
dpid / ScripatbleObjectUtility.cs
Created May 3, 2017 19:21
Unity C# utility class for making scriptable objects.
using UnityEngine;
using UnityEditor;
using System.IO;
public static class ScriptableObjectUtility
{
public static void CreateAsset<T>() where T : ScriptableObject
{
string path = AssetDatabase.GetAssetPath(Selection.activeObject);
@dpid
dpid / PhysicsFollower.cs
Created May 3, 2017 16:18
Unity component that follows a target transform using physics.
using UnityEngine;
using System.Collections;
public class PhysicsFollower : MonoBehaviour {
public Transform targetTransform;
public Vector3 positionOffset = Vector3.zero;
public Quaternion rotationOffset = Quaternion.identity;