Various docs fixes

This commit is contained in:
AdamRamberg 2019-10-15 23:20:05 +02:00
parent 35782c3d95
commit afcb782fd6
19 changed files with 113 additions and 39 deletions

View File

@ -0,0 +1,3 @@
# Unity Atoms - Core
Check out the online documentation [here](https://adamramberg.github.io/unity-atoms/).

View File

@ -1,7 +1,6 @@
fileFormatVersion: 2
guid: abc9988f2c68348f5bb04478d404a0d2
folderAsset: yes
DefaultImporter:
guid: 3161691677b4c41699005f2d9ccfc5ea
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:

View File

@ -0,0 +1,3 @@
# Unity Atoms - Mobile
Check out the online documentation [here](https://adamramberg.github.io/unity-atoms/).

View File

@ -1,7 +1,6 @@
fileFormatVersion: 2
guid: 15b56e85cd0854e62b09cfdd8668d89b
folderAsset: yes
DefaultImporter:
guid: becbf09239b984e7c8ad8e8c745f4092
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:

View File

@ -0,0 +1,3 @@
# Unity Atoms - Scene Mgmt
Check out the online documentation [here](https://adamramberg.github.io/unity-atoms/).

View File

@ -1,7 +1,6 @@
fileFormatVersion: 2
guid: 0f49058558a2d4d4bb753c735ce0dead
folderAsset: yes
DefaultImporter:
guid: 74c0a86571f294ef6ab6a34c609b50f2
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:

View File

@ -0,0 +1,3 @@
# Unity Atoms - Tags
Check out the online documentation [here](https://adamramberg.github.io/unity-atoms/).

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 37b85c9d525a841f69abfc917b5b97f3
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,3 @@
# Unity Atoms - Mobile
Check out the online documentation [here](https://adamramberg.github.io/unity-atoms/).

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 689e6983278814abc9f9ba25795685e2
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5,13 +5,24 @@ using UnityAtoms;
namespace UnityAtoms.UI
{
/// <summary>
/// A MonoBehaviour that you can add to a `CanvasGroup` and makes it transition based on a `StringVariable` value.
///
/// **TODO**: Add support for differnt transitions. Maybe integrate with DOTween?
/// </summary>
[AddComponentMenu("Unity Atoms/UI/Container")]
public class UIContainer : MonoBehaviour, IAtomListener<string>
{
/// <summary>
/// Variable that we listens to.
/// </summary>
[FormerlySerializedAs("UIStateVariable")]
[SerializeField]
private StringVariable _UIStateVariable = null;
/// <summary>
/// A list of states that this `UIContainer` will be visible for.
/// </summary>
[FormerlySerializedAs("VisibleForStates")]
[SerializeField]
private List<StringConstant> _visibleForStates = null;
@ -21,6 +32,10 @@ namespace UnityAtoms.UI
StateNameChanged(_UIStateVariable.Value);
}
/// <summary>
/// Handler for when the state is changed.
/// </summary>
/// <param name="stateName"></param>
public void OnEventRaised(string stateName)
{
StateNameChanged(stateName);

View File

@ -9,8 +9,11 @@
- API
- [UnityAtoms](./api/unityatoms.md)
- [UnityAtoms.Editor](./api/unityatoms.editor.md)
- [UnityAtoms.Tags](./api/unityatoms.tags.md)
- [UnityAtoms.Mobile](./api/unityatoms.mobile.md)
- [UnityAtoms.Mobile.Editor](./api/unityatoms.mobile.editor.md)
- [UnityAtoms.SceneMgmt](./api/unityatoms.scenemgmt.md)
- [UnityAtoms.SceneMgmt.Editor](./api/unityatoms.scenemgmt.editor.md)
- [UnityAtoms.Tags](./api/unityatoms.tags.md)
- Subpackages
- [Mobile](./subpackages/mobile.md)
- [SceneMgmt](./subpackages/scene-mgmt.md)

36
docs/api/unityatoms.ui.md Normal file
View File

@ -0,0 +1,36 @@
---
id: unityatoms.ui
title: UnityAtoms.UI
hide_title: true
sidebar_label: UnityAtoms.UI
---
# Namespace - `UnityAtoms.UI`
## `UIContainer`
A MonoBehaviour that you can add to a `CanvasGroup` and makes it transition based on a `StringVariable` value. **TODO**: Add support for differnt transitions. Maybe integrate with DOTween?
### Variables
#### `_UIStateVariable`
Variable that we listens to.
---
#### `_visibleForStates`
A list of states that this `UIContainer` will be visible for.
### Methods
#### `OnEventRaised(System.String)`
Handler for when the state is changed.
##### Parameters
- `stateName` - undefined
---

View File

@ -1,10 +0,0 @@
---
id: variables
title: Variables
hide_title: true
sidebar_label: Variables
---
# Variables
[**TODO**]

View File

@ -7,8 +7,4 @@ sidebar_label: Scene Mgmt
# Unity Atoms / Scene Mgmt
Unity Atoms to manage your scenes.
## API
[**TODO**]
Unity Atoms to manage your scenes. See the [API](../api/unityatoms.scenemgmt) for more info.

View File

@ -7,8 +7,4 @@ sidebar_label: Tags
# Unity Atoms / Tags
A replacement to Unity´s tags based on Unity Atoms.
## API
[**TODO**]
A replacement to Unity´s tags based on Unity Atoms. See the [API](../api/unityatoms.tags) for more info.

View File

@ -7,8 +7,4 @@ sidebar_label: UI
# Unity Atoms / UI
UI system using Unity Atoms.
## API
[**TODO**]
UI system using Unity Atoms. Still a very early WIP. See the [API](../api/unityatoms.ui) for more info.

View File

@ -13,17 +13,29 @@
"title": "UnityAtoms",
"sidebar_label": "UnityAtoms"
},
"api/unityatoms.mobile.editor": {
"title": "UnityAtoms.Mobile.Editor",
"sidebar_label": "UnityAtoms.Mobile.Editor"
},
"api/unityatoms.mobile": {
"title": "UnityAtoms.Mobile",
"sidebar_label": "UnityAtoms.Mobile"
},
"api/unityatoms.scenemgmt.editor": {
"title": "UnityAtoms.SceneMgmt.Editor",
"sidebar_label": "UnityAtoms.SceneMgmt.Editor"
},
"api/unityatoms.scenemgmt": {
"title": "UnityAtoms.SceneMgmt",
"sidebar_label": "UnityAtoms.SceneMgmt"
},
"api/unityatoms.tags": {
"title": "UnityAtoms.Tags",
"sidebar_label": "UnityAtoms.Tags"
},
"api/variables": {
"title": "Variables",
"sidebar_label": "Variables"
"api/unityatoms.ui": {
"title": "UnityAtoms.UI",
"sidebar_label": "UnityAtoms.UI"
},
"introduction/basic-tutorial": {
"title": "Basic tutorial",

View File

@ -10,8 +10,12 @@
"API Reference": [
"api/unityatoms",
"api/unityatoms.editor",
"api/unityatoms.mobile",
"api/unityatoms.mobile.editor",
"api/unityatoms.scenemgmt",
"api/unityatoms.scenemgmt.editor",
"api/unityatoms.tags",
"api/unityatoms.mobile"
"api/unityatoms.ui"
],
"Subpackages": [
"subpackages/mobile",