Skip to content

Instantly share code, notes, and snippets.

View popcron's full-sized avatar

Phill popcron

View GitHub Profile
@popcron
popcron / BasicCircleImage.cs
Created April 30, 2023 20:18
Can draw a circle/square with roundedness settings per each corner
#nullable enable
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Game
{
[ExecuteAlways]
public class BasicCircleImage : MaskableGraphic
@popcron
popcron / PlayerLoopExtensions.cs
Last active September 22, 2022 05:23
Unity player loop extensions for injecting your own update loops
using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine.LowLevel;
using static UnityEngine.LowLevel.PlayerLoopSystem;
public static class PlayerLoopExtensions
{
public static Type GetParentSystemType<T>(this PlayerLoopSystem playerLoop)
{
@popcron
popcron / CustomPlayBehaviour.cs
Last active May 26, 2022 01:31
Custom code before play
using System;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
namespace blablalblalmao
{
[InitializeOnLoad]
@popcron
popcron / EditorCustomCamera.cs
Created February 9, 2019 21:53
Variable editor camera FOV
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using UnityEditor;
using UnityEngine;
namespace Popcron.UnityEditor