Unclaimed Package Is this your package? Claim it to unlock full analytics and manage your listing.
Claim This Package

Install via UPM

Add to Unity Package Manager using this URL

https://www.pkglnk.dev/track/whiskey.git

README

Whiskey

Data and Events framework for Unity. ๐Ÿฅƒโšก

Project logo; A pink package on a grey background, next to the text

GitHub package.json version openupm CI Discord

Whiskey is a framework for managing data and events within Unity. It leans heavily on ScriptableObject, and is inspired by Ryan Hipple's Unite 2017 Talk. Whiskey lets game designers own and edit data definitions while programmers continue to evolve code - Whiskey brings the two together with references, to reduce merge conflicts.

Goals:

  • Create, Edit, and Visualize data within the Editor, not code.
  • Encourage decoupling, by using asset references rather than singletons.
  • Quickly swap between data constants and references without rewriting code.

Features:

Installing

This package supports openupm - you can install it using the following command:

openupm add com.faster-games.whiskey

Or by adding directly to your manifest.json:

Note: You may also use specific versions by appending #{version} where version is a Release tag - e.g. #v1.2.0.

dependencies: {
	...
	"com.faster-games.whiskey": "git+https://github.com/faster-games/whiskey.git"
}

Or by using Package Manager to "Add a package from Git URL", using the following url:

https://github.com/faster-games/whiskey.git

Documentation

Manual ๐Ÿ“– | Scripting API ๐Ÿ”Ž

Quickstart

Disclaimer: By nature, Whiskey isn't easy to demonstrate. As such, this may not be as "quick" as you'd expect! ๐Ÿ˜…

  • Right click in the Project Window select: Create, Whiskey, Boxes, Int
  • Name the created data instance
  • Select the data instance
  • Edit the data in the Inspector Window
  • Right click in the Project Window select: Create, C# Script
  • Name the created script IntTestBehaviour
  • Edit the script, adding the following:
using FasterGames.Whiskey.Boxes;
using UnityEngine;

public class IntTestBehaviour : MonoBehaviour
{
    public Ref<int> intRef;

    private void Start()
    {
        Debug.Log(intRef.Value);
    }
}
  • Right click in the Hierarchy Window select: Create Empty
  • Name the created object
  • Select the object in the Hierarchy Window, then in the Inspector Window select Add Component and search for IntTestBehaviour, selecting the first result (which should be the script you created above)
  • Note the Int Ref field is displayed, by default it is a Direct reference. A direct reference is effectively a hard coded value.
  • Select the Direct dropdown, and change it to Boxed. Note the field changes, allowing you to drag and drop an object reference, and showing an additional dropdown field.
  • Ensure the additional dropdown field is set to BoxedInt, which will allow the editor to more accurately assist you in selecting the object.
  • Click the object reference field, and select the data instance you created above.
  • You have now made your first data reference using Whiskey. Run the code, and note that the value stored in your data instance is logged by the IntTestBehaviour script on Start.

๐Ÿš€๐Ÿš€๐Ÿš€ Thanks for bearing with us! There's a lot of features in Whiskey, this quickstart only demonstrates one. To learn more, see The manual.

Supporting the project

If this project saved you some time, and you'd like to see it continue to be invested in, consider buying me a coffee. โ˜• I do this full-time, and every little bit helps! ๐Ÿ’™

Total Installs
0
Last 30 days
Unique IPs
0
Approximate users

Installs Over Time

Operating Systems

No data yet

Top Countries

No data yet

Git Versions

No data yet

Embed Install Badge

Add an install count badge to your README

Style
Preview
pkglnk installs badge
Markdown
[![pkglnk installs](https://www.pkglnk.dev/badge/whiskey.svg?style=pkglnk)](https://www.pkglnk.dev/pkg/whiskey)
HTML
<a href="https://www.pkglnk.dev/pkg/whiskey"><img src="https://www.pkglnk.dev/badge/whiskey.svg?style=pkglnk" alt="pkglnk installs"></a>

Comments

No comments yet. Be the first!