npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fucking-singletons

v0.1.0

Published

A framework of patterns for avoiding antipatterns in Unity

Downloads

3

Readme

Fucking Singletons

A framework of patterns for avoiding antipatterns in Unity

readme image

Inspired heavily (entirely) by Ryan's talk at Unite 2017, this is a framework that provides some tools that make writing better game code easier.

Background

This framework depends heavily on ScriptableObjects to make things work. As such, you should have an understanding of what those are! The best way to get that understanding is likely from this video.

API

Current version is 0.1.0

These are the "tools" that the framework provides :tada:

SOObject

Abstract class

A SOObject represents some primitive type as a scriptable object. It's effectively a data wrapper.

SOBool

A primitive wrapper, wrapping a boolean value.

SOFloat

A primitive wrapper, wrapping a float value.

SOInt

A primitive wrapper, wrapping an int value.

SOString

A primitive wrapper, wrapping a string value.

SOReference

Abstract class

A SOReference provides an abstraction layer for your systems - enabling them to work on data represented as SOObjects, or as constant values.

SOBoolReference

Abstraction representing either a SOBool or a boolean constant.

SOFloatReference

Abstraction representing either a SOFloat or a float constant.

SOIntReference

Abstraction representing either a SOInt or an int constant.

SOStringReference

Abstraction representing either a SOString or a string constant.

SOEvent<T0,T1,T2,T3>

A SOEvent represents an event that can be raised, and a collection of listeners that will be notified in the event that it is, in fact, raised.

Raise

Raises the event (optionally with parameters)

RegisterListener

Registers a listener

UnregisterListener

Unregisters a listener

SOEventListener<T0,T1,T2,T3>

A SOEventListener represents the response to a SOEvent - namely the action(s) to take when it is raised

SOSet

A SOSet represents a collection of items.

Items

Returns the child items

GetChildCount

Returns the count of the child items

Add

Adds a child item

Remove

Removes a child item

GameObjectSOSet

A set wrapper for storing GameObjects

GameObjectSOSetElement

A runtime helper for adding GameObjects to a GameObjectSOSet - this enables runtime population of a set

Metadata

Contains information about the framework (like version, editor tooling information, etc)