Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

com.fluid.simple-singleton

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Issues
File Explorer

Advanced tools

com.fluid.simple-singleton

An automaticaly generating singleton class that uses generics and inheritnace to automate its creation.

    1.0.0latest

Version published
Maintainers
1
Yearly downloads
18,559
increased by76.79%

Weekly downloads

Readme

Source

Simple Singleton

An automatically generating singleton class that uses generics and inheritance for creation.

Usage

Simply inherit the singleton class. Note that Singleton<T> is a MonoBehavior.

using CleverCrow.Fluid.Utilities; public class MySingleton : Singleton<MySingleton> { public MyMethod () {} }

You can now call it anywhere with MySingleton.Instance.MyMethod(); at runtime. It will always return the same instance until OnDestroy is called.

Installation

Simple Singleton is used through Unity's Package Manager. In order to use it you'll need to add the following lines to your Packages/manifest.json file. After that you'll be able to visually control what specific version of Simple Singleton you're using from the package manager window in Unity. This has to be done so your Unity editor can connect to NPM's package registry.

{ "scopedRegistries": [ { "name": "NPM", "url": "https://registry.npmjs.org", "scopes": [ "com.fluid" ] } ], "dependencies": { "com.fluid.simple-singleton": "1.0.0" } }

Releases

Archives of specific versions and release notes are available on the releases page.

Nightly Builds

To access nightly builds of the develop branch that are package manager friendly, you'll need to manually edit your Packages/manifest.json as so.

{ "dependencies": { "com.fluid.simple-singleton": "https://github.com/ashblue/unity-simple-singleton.git#nightly" } }

Note that to get a newer nightly build you must delete this line and any related lock data in the manifest, let Unity rebuild, then add it back. As Unity locks the commit hash for Git urls as packages.

Development Environment

If you wish to run to run the development environment you'll need to install the latest node.js. Then run the following from the root once.

npm install

If you wish to create a build run npm run build from the root and it will populate the dist folder.

Making Commits

All commits should be made using Commitizen (which is automatically installed when running npm install). Commits are automatically compiled to version numbers on release so this is very important. PRs that don't have Commitizen based commits will be rejected.

To make a commit type the following into a terminal from the root

npm run commit

This project was generated with Oyster Package Generator.

Keywords

FAQs

What is com.fluid.simple-singleton?

An automaticaly generating singleton class that uses generics and inheritnace to automate its creation.

Is com.fluid.simple-singleton popular?

The npm package com.fluid.simple-singleton receives a total of 203 weekly downloads. As such, com.fluid.simple-singleton popularity was classified as not popular.

Is com.fluid.simple-singleton well maintained?

We found that com.fluid.simple-singleton demonstrated a not healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 30 Jun 2019
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc