Skip to content

Instantly share code, notes, and snippets.

View feranmii's full-sized avatar

Feranmi Oladosu feranmii

View GitHub Profile
@mdb1
mdb1 / DelayAppearanceModifier.swift
Last active March 11, 2023 20:11
DelayAppearanceModifier
struct DelayAppearanceModifier: ViewModifier {
var animation: Animation
var delay: TimeInterval
var offset: CGSize
@State private var isShown: Bool = false
func body(content: Content) -> some View {
content
.opacity(isShown ? 1 : 0)
.offset(x: isShown ? 0 : offset.width, y: isShown ? 0 : offset.height)
@alexanderameye
alexanderameye / SceneSwitcherToolbarOverlay.cs
Last active December 1, 2023 22:37
A small scene switcher utility for Unity
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.Overlays;
using UnityEditor.SceneManagement;
using UnityEditor.Toolbars;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UIElements;
using UnityEditor;
using UnityEngine;
/// <summary>
/// This is a simple Editor Tool to create a divider for the Editor Hierarchy.
/// You can do this using ALT + D Keys
/// You can also go to Tools -> Hierarchy Divider
/// </summary>
public class HierarchyDividerEditor : ScriptableWizard
{
@LotteMakesStuff
LotteMakesStuff / Colors.cs
Created April 6, 2017 23:45
Trying to set Colours from code but need something better than the few that unity provide and dont wanna mess around with colour values for ages? Colors is your friend!!!
using UnityEngine;
public class Colors
{
// NOTE: The follwing color names come from the CSS3 specification, Section 4.3 Extended Color Keywords
// http://www.w3.org/TR/css3-color/#svg-color
public static readonly Color AliceBlue = new Color32(240,248,255,255);
public static readonly Color AntiqueWhite = new Color32(250,235,215,255);
public static readonly Color Aqua= new Color32(0,255,255,255);