3140feab42
* Make Examples path check OS agnostic. * Examples path check OS agnostic. * Update Runtime.cs * Re-generate and patch back in type specific changes * Add missing UnityEngine using. * Marked as not sealed * Support the current value type as a conditional. * Nested if blocks * Use next char instead of next linefeed. * Remove debug lines. * Keep Atom Base Variable sepecfic code. * Fix position of endif * Add Raise for void type * Add void and FSM specific logic * Add is numeric conditional * Add more type specific logic * Add is Vector to generator. * Add type specific logic * Add collider type * Add color specific logic * Working on whitespace diffs * Working on whitespace diffs * remove unused test assembly * removed example nested if * test comment removed after regen * missing ValueEquals * missing ValueEquals on colliders * missing color speciifc code. * whitesapce cleanup * whitesapce cleanup * whitesapce cleanup * whitesapce cleanup * whitesapce cleanup * whitesapce cleanup * remove temp debug * Generated events now follows editoconfig. + Inline conditionals now supports white spaces. Co-authored-by: jrmacgill <jmacgill@gmail.com> Co-authored-by: Adam Ramberg <adam@mambojambostudios.com> |
||
---|---|---|
.github/ISSUE_TEMPLATE | ||
docs | ||
Examples | ||
Packages | ||
scripts | ||
website | ||
.dockerignore | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
CHANGELOG.md | ||
CHANGELOG.md.meta | ||
CONTRIBUTING.md | ||
CONTRIBUTING.md.meta | ||
docker-compose.yml | ||
Dockerfile | ||
LICENSE.md | ||
LICENSE.md.meta | ||
omnisharp.json | ||
omnisharp.json.meta | ||
package-lock.json | ||
package.json | ||
package.json.meta | ||
Packages.meta | ||
PUBLISHING.md | ||
README.md | ||
README.md.meta |
⚛️ Unity Atoms
Tiny modular pieces utilizing the power of Scriptable Objects
Influences
Unity Atoms is derived from and a continuation of Ryan Hipple's talk from Unite 2017. The original source code can be found here.
This talk by Richard Fine is a forerunner to Ryan Hipple's talk during Unite 2016.
Motivation
The general approach to building scripts in Unity often generates a code base that is monolithic. This results in that your code is cumbersome to test, non-modular and hard to debug and understand.
Unity Atoms is an open source library that aims to make your game code:
- 📦 Modular - avoid scripts and systems directly dependent on each other
- ✏️ Editable - Scriptable Objects makes it possible to make changes to your game at runtime
- 🐛 Debuggable - modular code is easier to debug than tightly coupled code
Installation
NPM
Prerequisite: Since Unity Atoms is using the Unity Package Manager (UPM) you need to use Unity version 2018.3 >=
Add the following to your manifest.json
:
{
"scopedRegistries": [
{
"name": "NPM Registry",
"url": "https://registry.npmjs.org",
"scopes": [
"com.mambojambostudios.unity-atoms-core",
"com.mambojambostudios.unity-atoms-base-atoms",
"com.mambojambostudios.unity-atoms-fsm",
"com.mambojambostudios.unity-atoms-mobile",
"com.mambojambostudios.unity-atoms-mono-hooks",
"com.mambojambostudios.unity-atoms-tags",
"com.mambojambostudios.unity-atoms-scene-mgmt",
"com.mambojambostudios.unity-atoms-ui"
]
}
],
"dependencies": {
...
"com.mambojambostudios.unity-atoms-core": "4.2.1",
"com.mambojambostudios.unity-atoms-base-atoms": "4.2.1",
"com.mambojambostudios.unity-atoms-fsm": "4.2.1",
"com.mambojambostudios.unity-atoms-mobile": "4.2.1",
"com.mambojambostudios.unity-atoms-mono-hooks": "4.2.1",
"com.mambojambostudios.unity-atoms-tags": "4.2.1",
"com.mambojambostudios.unity-atoms-scene-mgmt": "4.2.1",
"com.mambojambostudios.unity-atoms-ui": "4.2.1",
...
}
}
Note that the core and base atoms packages are mandatory while the others are optional. If you don't want a subpackage, simply remove it from your dependencies
.
OpenUPM
The package is available on the openupm registry. It's recommended to install it via openupm-cli.
# required
openupm add com.mambojambostudios.unity-atoms-core
openupm add com.mambojambostudios.unity-atoms-base-atoms
# optional
openupm add com.mambojambostudios.unity-atoms-fsm
openupm add com.mambojambostudios.unity-atoms-mobile
openupm add com.mambojambostudios.unity-atoms-mono-hooks
openupm add com.mambojambostudios.unity-atoms-tags
openupm add com.mambojambostudios.unity-atoms-scene-mgmt
openupm add com.mambojambostudios.unity-atoms-ui
Documentation
The Unity Atoms docs are now published at https://adamramberg.github.io/unity-atoms.
Blog posts
- Unity Atoms — Tiny modular pieces utilizing the power of Scriptable Objects
- Announcing Unity Atoms v2
- Unity Atoms v4 is out!
How does it work?
Read this article on Medium for a great introduction to Unity Atoms.
Looking for support?
For questions and support please join our Discord channel.
Maintainers
We are looking for more people to join the team! Contact us if you want to jump aboard.