Skip to content

Instantly share code, notes, and snippets.

View ChrisNZL's full-sized avatar
💭
Working on Tallowmere 2.

Chris McFarland ChrisNZL

💭
Working on Tallowmere 2.
View GitHub Profile
@ChrisNZL
ChrisNZL / game_actions_655740.vdf
Created January 1, 2023 20:07
Tallowmere 2 – Steam Input IGA (In-Game Actions) File
// https://partner.steamgames.com/doc/features/steam_controller/iga_file
// 💡 each action in your VDF file must have a unique string identifier.
// In other words, if you use an action called "up" in two different action sets, this function will only ever return one of them and the other will be ignored.
// Version 2.0 of this VDF file for Tallowmere 2 --
// We are just mirroring InputDeviceButtonID where possible
"In Game Actions" {
@ChrisNZL
ChrisNZL / Platform_AndroidTV.cs
Last active December 8, 2023 10:49
Detects Android TV using Unity.
using UnityEngine;
// DERIVED FROM https://stewmcc.com/post/check-for-android-tv-in-unity/
public class Platform_AndroidTV : MonoBehaviour {
#if UNITY_ANDROID
sbyte isAndroidTV = -1; // -1 == not checked yet; 0 == false; 1 == true
using UnityEngine;
public class ThisPlatform {
// This property allows you to use ThisPlatform.IsIphoneX to determine if you should do anything special in your code when checking for iPhone X.
public static bool IsIphoneX {
get {
#if UNITY_IOS
// If testing without an iPhone X, add FORCE_IPHONEX to your Scripting Define Symbols.
@ChrisNZL
ChrisNZL / Timer.cs
Last active April 25, 2019 21:48
C# Timer class
using UnityEngine;
using System;
/* Timer class.
Example usage:
public class Mover : MonoBehaviour {
public Vector3 startPosition;
public Vector3 endPosition;