This is the Node.js server I wrote to get Patreon and Ko-fi donation notifications streamed into my Monzo bank accounts feed. If you want to run your own instance, this script is designed to be run on Google Firebase Functions so you don't even need to manage a proper server! Deploy this function to firebase and then supply the functions URLs to Patreon/Kofi's webhook APIs, pretty simple!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Unity.Collections; | |
using Unity.Collections.LowLevel.Unsafe; | |
using Unity.Mathematics; | |
using UnityEngine; | |
public class NativeMesh : IDisposable | |
{ | |
public NativeArray<float3> VertexBuffer; | |
public NativeArray<float3> NormalBuffer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using System.Threading; | |
using UnityEngine; | |
// Usage Example | |
// position message string color fontsize | |
// SegmentFont.Print(new Vector2(0,0), "Message you wanna print", Color.green, 0.2f); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class CoroutineRunner : MonoBehaviour | |
{ | |
public static void RunCoroutine(IEnumerator coroutine) | |
{ | |
var go = new GameObject("runner"); | |
DontDestroyOnLoad(go); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Reflection; | |
public class EditorCoroutineRunner | |
{ | |
[MenuItem("Window/Lotte's Coroutine Runner: Demo")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Put me in an editor folder! | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
using UnityEditor; | |
using UnityEditor.EditorTools; | |
using UnityEngine; | |
[EditorTool("PhysicsDrop Tool", typeof(Rigidbody))] | |
public class PhysicsTool : EditorTool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE DONT put in an editor folder | |
using UnityEngine; | |
public class ReadOnlyAttribute : PropertyAttribute { } |
UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!
Todo
- Modify the project manifest
- Make a package manifest
- Package the manifest up with some test code
- Try it out in Unity!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE DONT put in an editor folder | |
using UnityEngine; | |
public class MinMaxAttribute : PropertyAttribute | |
{ | |
public float MinLimit = 0; | |
public float MaxLimit = 1; | |
public bool ShowEditRange; | |
public bool ShowDebugValues; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE DONT put in an editor folder | |
using UnityEngine; | |
public class StatsBarAttribute : PropertyAttribute | |
{ | |
public string valueMax; | |
public StatsBarColor color; | |
public StatsBarAttribute(string valueMax = null, StatsBarColor color = StatsBarColor.Red) |
OlderNewer