Skip to content

Instantly share code, notes, and snippets.

View Smaths's full-sized avatar

Eric Smaths

View GitHub Profile
@Smaths
Smaths / Vector234Extensions
Created August 9, 2023 15:24
Vector234 Extensions
public static class Vector234Extensions
{
// Vector2
public static Vector2 SetX(this Vector2 aVec, float aXValue)
{
aVec.x = aXValue;
return aVec;
}
public static Vector2 SetY(this Vector2 aVec, float aYValue)
{
@Smaths
Smaths / Singleton.cs
Last active September 26, 2023 06:52
Unity Singleton
using UnityEngine;
namespace Utilities
{
/// <summary>
/// Singleton class
/// </summary>
/// <typeparam name="T">Type of the singleton</typeparam>
public abstract class Singleton<T> : MonoBehaviour where T : Singleton<T>
{
@Smaths
Smaths / AssemblyInfo.cs
Last active November 2, 2016 22:03
Xam.Media Help
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AppName.Droid")]
[assembly: AssemblyDescription("")]