2018-10-30 15:05:06 -04:00
# ⚛️ Unity Atoms
2020-01-23 14:48:42 -05:00
[![openupm ](https://img.shields.io/npm/v/com.mambojambostudios.unity-atoms-core?label=core@openupm®istry_uri=https://package.openupm.com )](https://openupm.com/packages/com.mambojambostudios.unity-atoms-core/)
2020-03-01 20:26:06 -05:00
[![openupm ](https://img.shields.io/npm/v/com.mambojambostudios.unity-atoms-base-atoms?label=core@openupm®istry_uri=https://package.openupm.com )](https://openupm.com/packages/com.mambojambostudios.unity-atoms-base-atoms/)
2020-01-23 14:48:42 -05:00
[![openupm ](https://img.shields.io/npm/v/com.mambojambostudios.unity-atoms-mobile?label=mobile®istry_uri=https://package.openupm.com )](https://openupm.com/packages/com.mambojambostudios.unity-atoms-mobile/)
[![openupm ](https://img.shields.io/npm/v/com.mambojambostudios.unity-atoms-mono-hooks?label=mono-hooks®istry_uri=https://package.openupm.com )](https://openupm.com/packages/com.mambojambostudios.unity-atoms-mono-hooks/)
[![openupm ](https://img.shields.io/npm/v/com.mambojambostudios.unity-atoms-tags?label=tags®istry_uri=https://package.openupm.com )](https://openupm.com/packages/com.mambojambostudios.unity-atoms-tags/)
[![openupm ](https://img.shields.io/npm/v/com.mambojambostudios.unity-atoms-scene-mgmt?label=scene-mgmt®istry_uri=https://package.openupm.com )](https://openupm.com/packages/com.mambojambostudios.unity-atoms-scene-mgmt/)
[![openupm ](https://img.shields.io/npm/v/com.mambojambostudios.unity-atoms-ui?label=ui®istry_uri=https://package.openupm.com )](https://openupm.com/packages/com.mambojambostudios.unity-atoms-ui/)
2019-10-03 17:05:26 -04:00
_Tiny modular pieces utilizing the power of Scriptable Objects_
2018-11-16 06:49:57 -05:00
2018-10-30 15:55:37 -04:00
## Influences
2019-10-03 17:05:26 -04:00
2019-11-28 13:35:59 -05:00
Unity Atoms is derived from and a continuation of Ryan Hipple's [talk ](https://www.youtube.com/watch?v=raQ3iHhE_Kk&t=2787s ) from Unite 2017. The original source code can be found [here ](https://github.com/roboryantron/Unite2017 ).
2018-10-30 15:05:06 -04:00
2018-11-04 04:00:06 -05:00
[This ](https://www.youtube.com/watch?v=6vmRwLYWNRo&t=738s ) talk by Richard Fine is a forerunner to Ryan Hipple's talk during Unite 2016.
2018-10-30 15:05:06 -04:00
2018-10-30 15:55:37 -04:00
## Motivation
2019-10-03 17:05:26 -04:00
2018-10-30 15:19:10 -04:00
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.
2019-10-03 17:05:26 -04:00
Unity Atoms is an open source library that aims to make your game code:
2018-10-30 15:19:10 -04:00
2019-10-03 17:05:26 -04:00
- 📦 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_
2018-10-30 15:19:10 -04:00
2019-04-05 09:22:33 -04:00
## Installation
2020-01-23 14:48:42 -05:00
### NPM
2019-10-03 17:05:26 -04:00
_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",
2020-03-01 20:26:06 -05:00
"com.mambojambostudios.unity-atoms-base-atoms",
2019-10-03 17:05:26 -04:00
"com.mambojambostudios.unity-atoms-mobile",
2019-10-15 19:43:51 -04:00
"com.mambojambostudios.unity-atoms-mono-hooks",
2019-10-03 17:05:26 -04:00
"com.mambojambostudios.unity-atoms-tags",
"com.mambojambostudios.unity-atoms-scene-mgmt",
"com.mambojambostudios.unity-atoms-ui"
]
}
],
"dependencies": {
2019-03-17 18:43:20 -04:00
...
2020-03-01 20:26:06 -05:00
"com.mambojambostudios.unity-atoms-core": "4.0.0",
"com.mambojambostudios.unity-atoms-base-atoms": "4.0.0",
"com.mambojambostudios.unity-atoms-mobile": "4.0.0",
"com.mambojambostudios.unity-atoms-mono-hooks": "4.0.0",
"com.mambojambostudios.unity-atoms-tags": "4.0.0",
"com.mambojambostudios.unity-atoms-scene-mgmt": "4.0.0",
"com.mambojambostudios.unity-atoms-ui": "4.0.0",
2019-04-05 09:22:33 -04:00
...
2019-10-03 17:05:26 -04:00
}
}
```
2018-10-30 16:23:40 -04:00
2020-03-01 20:26:06 -05:00
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` .
2018-10-30 16:23:40 -04:00
2020-01-23 14:48:42 -05:00
### OpenUPM
The package is available on the [openupm registry ](https://openupm.com ). It's recommended to install it via [openupm-cli ](https://github.com/openupm/openupm-cli ).
```
# required
openupm add com.mambojambostudios.unity-atoms-core
# optional
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
```
2019-10-03 17:05:26 -04:00
## Documentation
2018-10-30 15:55:37 -04:00
2019-10-03 17:05:26 -04:00
The Unity Atoms docs are now published at **https://adamramberg.github.io/unity-atoms** .
2018-10-30 15:55:37 -04:00
2020-03-02 14:17:45 -05:00
### Blog posts
- [Unity Atoms — Tiny modular pieces utilizing the power of Scriptable Objects ](https://medium.com/@adamramberg/unity-atoms-tiny-modular-pieces-utilizing-the-power-of-scriptable-objects-e8add1b95201 )
- [Announcing Unity Atoms v2 ](https://medium.com/@adamramberg/announcing-unity-atoms-v2-1719ef3e587e )
2019-10-03 17:05:26 -04:00
## How does it work?
2019-04-11 03:44:07 -04:00
2019-10-03 17:05:26 -04:00
Read [this ](https://medium.com/@adamramberg/unity-atoms-tiny-modular-pieces-utilizing-the-power-of-scriptable-objects-e8add1b95201 ) article on Medium for a great introduction to Unity Atoms.
2019-10-17 07:02:04 -04:00
2019-11-03 11:50:45 -05:00
## Looking for support?
For questions and support please join our [Discord channel ](https://discord.gg/W4yd7E7 ).
2019-10-18 11:37:12 -04:00
## Maintainers
2019-10-17 07:02:04 -04:00
- [AdamRamberg ](https://github.com/AdamRamberg )
- [soraphis ](https://github.com/soraphis )
We are looking for more people to join the team! Contact us if you want to jump aboard.