Merge branch 'canary'

This commit is contained in:
Adam Ramberg 2023-07-22 19:18:58 +02:00
commit 1d3d3f8607
65 changed files with 7783 additions and 14026 deletions

View File

@ -6,6 +6,28 @@
💅 = Polish
🚀 = New features
# 4.4.6 (July 22, 2023)
## 🐛 Bug fixes
- [#359](https://github.com/unity-atoms/unity-atoms/pull/359) Vector2/3 reference not properly showing ([@soraphis](https://github.com/soraphis))
- [#369](https://github.com/unity-atoms/unity-atoms/pull/369) Removed OnDisable method, to fix #349 ([@soraphis](https://github.com/soraphis))
- [#364](https://github.com/unity-atoms/unity-atoms/pull/364) Fix: #363 enum property did not return int value, but index ([@soraphis](https://github.com/soraphis))
- [#362](https://github.com/unity-atoms/unity-atoms/pull/362) Fix: corrected IEquatable implementation check ([@soraphis](https://github.com/soraphis))
- [#371](https://github.com/unity-atoms/unity-atoms/pull/371) Prevent null reference exceptions in editor when using non-serializable types ([@soraphis](https://github.com/soraphis))
- [#373](https://github.com/unity-atoms/unity-atoms/pull/373) Call base impl of ImplSpecificSetup() in FSM instancer ([@AdamRamberg](https://github.com/AdamRamberg))
- [#386](https://github.com/unity-atoms/unity-atoms/pull/386) FiniteStateMachineMonoHook unload fix ([@soraphis](https://github.com/soraphis))
- [#389](https://github.com/unity-atoms/unity-atoms/pull/389) Fixes syncgameobjecttolist adding object multiple times ([@soraphis](https://github.com/soraphis))
- [#409](https://github.com/unity-atoms/unity-atoms/pull/409) FIX: Using TextField in AssetGenerator does not work as expected ([@soraphis](https://github.com/soraphis))
- [#403](https://github.com/unity-atoms/unity-atoms/pull/403) fix: Event Replay Buffer not cleared when domain reload disabled ([@soraphis](https://github.com/soraphis))
## 📝 Documentation
- [#413](https://github.com/unity-atoms/unity-atoms/pull/413) Adding Documentation ([@soraphis](https://github.com/soraphis) and [@AdamRamberg](https://github.com/AdamRamberg))
- [#411](https://github.com/unity-atoms/unity-atoms/pull/411) Remove generated API docs ([@AdamRamberg](https://github.com/AdamRamberg))
## 💅 Polish
- [994026f](https://github.com/unity-atoms/unity-atoms/commit/994026fb7e74f0436c188f8e9c4e8050a4b2e639) Added input-system shield to README ([@AdamRamberg](https://github.com/AdamRamberg))
- [#317](https://github.com/unity-atoms/unity-atoms/pull/317) Set event name suggestion on Variable Changed event creation ([@ThimoDEV](https://github.com/ThimoDEV))
# 4.4.5 (May 9, 2022)
## 🐛 Bug fixes

View File

@ -5,7 +5,6 @@ _Here is a check list for publishing a new version:_
- [] Checkout the canary branch and make sure `CHANGELOG.md` is up to date.
- [] Update the version number in all `package.json` files (on the root and in all the `Packages/<PackageName>/package.json`)
- [] Update the root `README.md` file with the correct version. Also update the version in `docs/introduction/installation.md`.
- [] From the root run `npm run generate:docs` to make sure all API documentation is up to date.
- [] Commit and push your changes to the canary branch.
- [] Merge the canary branch into the master branch.
- [] Publish a new version of the website.

View File

@ -4,7 +4,7 @@ using UnityEngine.Assertions;
namespace UnityAtoms.BaseAtoms
{
/// <summary>
/// Adds a GameObject to a GameObject Value List on OnEnable and removes it on OnDestroy.
/// Adds a GameObject to a GameObject Value List on Start and removes it on OnDestroy.
/// </summary>
[AddComponentMenu("Unity Atoms/MonoBehaviour Helpers/Sync GameObject To List")]
[EditorIcon("atom-icon-delicate")]
@ -13,7 +13,7 @@ namespace UnityAtoms.BaseAtoms
[SerializeField]
private GameObjectValueList _list = default;
void OnEnable()
void Start()
{
Assert.IsNotNull(_list);
_list.Add(gameObject);

View File

@ -1,7 +1,7 @@
{
"name": "com.unity-atoms.unity-atoms-base-atoms",
"displayName": "Unity Atoms Base Atoms",
"version": "4.4.5",
"version": "4.4.6",
"unity": "2018.3",
"description": "Base set of Atoms based on Unity Atoms Core.",
"keywords": [
@ -22,6 +22,6 @@
"dependencies": {
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity-atoms.unity-atoms-core": "4.4.5"
"com.unity-atoms.unity-atoms-core": "4.4.6"
}
}

View File

@ -35,7 +35,10 @@ namespace UnityAtoms.Editor
}
}
return EditorGUI.GetPropertyHeight(property.FindPropertyRelative(usageData.PropertyName), label);
var innerProperty = property.FindPropertyRelative(usageData.PropertyName);
return innerProperty == null ?
EditorGUIUtility.singleLineHeight :
EditorGUI.GetPropertyHeight(innerProperty, label);
}
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
@ -56,6 +59,7 @@ namespace UnityAtoms.Editor
// Calculate rect for configuration button
Rect buttonRect = new Rect(position);
buttonRect.yMin += _popupStyle.margin.top;
buttonRect.yMax = buttonRect.yMin + EditorGUIUtility.singleLineHeight;
buttonRect.width = _popupStyle.fixedWidth + _popupStyle.margin.right;
position.xMin = buttonRect.xMax;
@ -70,15 +74,26 @@ namespace UnityAtoms.Editor
var usageTypePropertyName = GetUsages(property)[newUsageValue].PropertyName;
var usageTypeProperty = property.FindPropertyRelative(usageTypePropertyName);
if (usageTypePropertyName == "_value")
if (usageTypeProperty == null)
{
EditorGUI.PropertyField(usageTypeProperty.hasChildren ? originalPosition : position, usageTypeProperty, GUIContent.none, true);
EditorGUI.LabelField(position, "[Non serialized value]");
}
else
{
EditorGUI.PropertyField(position, usageTypeProperty, GUIContent.none);
}
var expanded = usageTypeProperty.isExpanded;
usageTypeProperty.isExpanded = true;
var valueFieldHeight = EditorGUI.GetPropertyHeight(usageTypeProperty, label);
usageTypeProperty.isExpanded = expanded;
if (usageTypePropertyName == "_value" && (valueFieldHeight > EditorGUIUtility.singleLineHeight + 2))
{
EditorGUI.PropertyField(originalPosition, usageTypeProperty, GUIContent.none, true);
}
else
{
EditorGUI.PropertyField(position, usageTypeProperty, GUIContent.none);
}
}
if (EditorGUI.EndChangeCheck())
property.serializedObject.ApplyModifiedProperties();

View File

@ -151,10 +151,12 @@ namespace UnityAtoms.Editor
{
if (GUI.Button(restRect, "Create"))
{
drawerData.NameOfNewAtom = "";
drawerData.UserClickedToCreateAtom = true;
EditorGUI.FocusTextInControl(NAMING_FIELD_CONTROL_NAME);
var baseAtomName = AtomNameUtils.CleanPropertyName(property.name) + typeof(T).Name;
var atomName = property.GetParent() is BaseAtom parentAtom ? parentAtom.name + baseAtomName : baseAtomName;
drawerData.NameOfNewAtom = AtomNameUtils.CreateUniqueName(atomName);
}
}
}

View File

@ -19,16 +19,22 @@ namespace UnityAtoms.Editor
var inner = new SerializedObject(property.objectReferenceValue);
var valueProp = inner.FindProperty("_value");
var width = GetPreviewSpace(valueProp.type);
Rect previewRect = new Rect(position);
previewRect.width = GetPreviewSpace(valueProp.type);
previewRect.width = GetPreviewSpace(valueProp?.type);
position.xMin = previewRect.xMax;
int indent = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
EditorGUI.BeginDisabledGroup(true);
EditorGUI.PropertyField(previewRect, valueProp, GUIContent.none, false);
if (valueProp != null)
{
EditorGUI.PropertyField(previewRect, valueProp, GUIContent.none, false);
}
else
{
EditorGUI.LabelField(previewRect, "[Non serialized value]");
}
EditorGUI.EndDisabledGroup();
position.x = position.x + 6f;

View File

@ -16,8 +16,6 @@ namespace UnityAtoms.Editor
private TypeSelectorDropdown typeSelectorDropdown;
private SerializedProperty fullQualifiedName;
private SerializedProperty typeNamespace;
private SerializedProperty baseType;
private SerializedProperty generatedOptions;
private static bool safeSearch = true;
@ -26,8 +24,6 @@ namespace UnityAtoms.Editor
{
// Find Properties.
fullQualifiedName = serializedObject.FindProperty(nameof(AtomGenerator.FullQualifiedName));
typeNamespace = serializedObject.FindProperty(nameof(AtomGenerator.Namespace));
baseType = serializedObject.FindProperty(nameof(AtomGenerator.BaseType));
generatedOptions = serializedObject.FindProperty(nameof(AtomGenerator.GenerationOptions));
// Check if the current type is unsafe.
@ -90,8 +86,6 @@ namespace UnityAtoms.Editor
serializedObject.Update();
fullQualifiedName.stringValue = selectedType.AssemblyQualifiedName;
typeNamespace.stringValue = selectedType.Namespace;
baseType.stringValue = selectedType.Name;
serializedObject.ApplyModifiedProperties();
});
@ -251,7 +245,14 @@ namespace UnityAtoms.Editor
parent.AddChild(dropdownItem);
// Use Hash instead of id! If 2 AdvancedDropdownItems have the same name, they will generate the same id (stupid, I know). To ensure searching for a unique identifier, we use the hash instead.
idTypePairs.Add(dropdownItem.GetHashCode(), type);
if(!idTypePairs.TryGetValue(dropdownItem.GetHashCode(), out var preExistingType))
{
idTypePairs.Add(dropdownItem.GetHashCode(), type);
}
else if(preExistingType.FullName != type.FullName) // type already exists, but it might be just the type itself (e.g. happens for me when using a ECS project)
{
Debug.LogError($"Could not add '{type.FullName}' to list, because it had a hash collision with: {idTypePairs[dropdownItem.GetHashCode()].FullName}");
}
}
}

View File

@ -13,10 +13,27 @@ namespace UnityAtoms.Editor
{
private bool _lockedInitialValue = true;
private bool _onEnableTriggerSectionVisible = true;
private void DrawPotentiallyUnserializablePropertyField(SerializedProperty property, bool drawWarningWhenUnserializable = false)
{
if (property == null)
{
if (drawWarningWhenUnserializable)
{
EditorGUILayout.HelpBox("Can't display values because the type is not serializable! You can still use this type, but won't be able to show values in the Editor.", MessageType.Warning);
}
}
else
{
EditorGUILayout.PropertyField(property, true);
}
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(serializedObject.FindProperty("_developerDescription"));
EditorGUILayout.Space();
@ -24,7 +41,7 @@ namespace UnityAtoms.Editor
EditorGUILayout.BeginHorizontal();
EditorGUI.BeginDisabledGroup(_lockedInitialValue && EditorApplication.isPlayingOrWillChangePlaymode);
EditorGUILayout.PropertyField(serializedObject.FindProperty("_initialValue"), true);
DrawPotentiallyUnserializablePropertyField(serializedObject.FindProperty("_initialValue"), drawWarningWhenUnserializable: true);
EditorGUI.EndDisabledGroup();
if (EditorApplication.isPlaying)
{
@ -36,7 +53,7 @@ namespace UnityAtoms.Editor
using (new EditorGUI.DisabledGroupScope(!EditorApplication.isPlaying))
{
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(serializedObject.FindProperty("_value"), true);
DrawPotentiallyUnserializablePropertyField(serializedObject.FindProperty("_value"));
if (EditorGUI.EndChangeCheck() && target is AtomBaseVariable atomTarget)
{
try
@ -48,8 +65,8 @@ namespace UnityAtoms.Editor
{
atomTarget.BaseValue = (double)(float)value;
}
//Ulong is deserialized to System32 Int.
else if(typeof(T) == typeof(ulong))
//Ulong is deserialized to System32 Int.
else if (typeof(T) == typeof(ulong))
{
atomTarget.BaseValue = (ulong)(int)value;
}
@ -71,7 +88,7 @@ namespace UnityAtoms.Editor
EditorGUI.BeginDisabledGroup(true);
EditorGUILayout.PropertyField(serializedObject.FindProperty("_oldValue"), true);
DrawPotentiallyUnserializablePropertyField(serializedObject.FindProperty("_oldValue"));
EditorGUI.EndDisabledGroup();
const int raiseButtonWidth = 52;

View File

@ -54,7 +54,7 @@ namespace UnityAtoms.Editor
case SerializedPropertyType.String: return property.stringValue;
case SerializedPropertyType.Color: return property.colorValue;
case SerializedPropertyType.LayerMask: return (LayerMask)property.intValue;
case SerializedPropertyType.Enum: return property.enumValueIndex;
case SerializedPropertyType.Enum: return property.intValue;
case SerializedPropertyType.Vector2: return property.vector2Value;
case SerializedPropertyType.Vector3: return property.vector3Value;
case SerializedPropertyType.Vector4: return property.vector4Value;

View File

@ -11,8 +11,8 @@ namespace UnityAtoms.Editor
public class AtomGenerator : ScriptableObject
{
[TextArea] public string FullQualifiedName;
public string Namespace;
public string BaseType;
public string Namespace => string.IsNullOrWhiteSpace(FullQualifiedName) ? "" : Type.GetType(FullQualifiedName)?.Namespace;
public string BaseType => string.IsNullOrWhiteSpace(FullQualifiedName) ? "" : Type.GetType(FullQualifiedName)?.Name;
public int GenerationOptions;
@ -31,7 +31,7 @@ namespace UnityAtoms.Editor
{
var type = Type.GetType($"{FullQualifiedName}");
if (type == null) throw new TypeLoadException($"Type could not be found ({FullQualifiedName})");
var isValueTypeEquatable = type.GetInterfaces().Contains(typeof(IEquatable<>));
var isValueTypeEquatable = typeof(IEquatable<>).MakeGenericType(type).IsAssignableFrom(type);
var baseTypeAccordingNested = type.FullName.Replace('+', '.');

View File

@ -0,0 +1,26 @@
using System.Text.RegularExpressions;
using UnityEditor;
namespace UnityAtoms.Editor
{
public static class AtomNameUtils
{
public static string CleanPropertyName(string propertyName)
{
string cleanedProperty = propertyName;
if (Regex.Match(cleanedProperty, @"[a-zA-Z]").Success)
{
var index = Regex.Match(cleanedProperty, @"[a-zA-Z]").Index;
cleanedProperty = cleanedProperty[index].ToString().ToUpper() + cleanedProperty.Substring(index + 1);
}
return cleanedProperty;
}
public static string CreateUniqueName(string atomName)
{
var results = AssetDatabase.FindAssets(atomName);
return results.Length > 0 ? $"{atomName} ({results.Length})" : atomName;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1ff1110ec6aeba04e91c0f91cd32d49c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,6 +1,9 @@
using System;
using System.Linq;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;
namespace UnityAtoms
@ -35,17 +38,53 @@ namespace UnityAtoms
private Queue<T> _replayBuffer = new Queue<T>();
#if UNITY_EDITOR
/// <summary>
/// Set of all AtomVariable instances in editor.
/// </summary>
private static HashSet<AtomEvent<T>> _instances = new HashSet<AtomEvent<T>>();
#endif
private void OnEnable()
{
#if UNITY_EDITOR
if (EditorSettings.enterPlayModeOptionsEnabled)
{
_instances.Add(this);
EditorApplication.playModeStateChanged -= HandlePlayModeStateChange;
EditorApplication.playModeStateChanged += HandlePlayModeStateChange;
}
#endif
}
#if UNITY_EDITOR
private static void HandlePlayModeStateChange(PlayModeStateChange state)
{
if (state == PlayModeStateChange.ExitingEditMode)
{
foreach (var instance in _instances)
{
instance._replayBuffer.Clear();
instance.UnregisterAll();
}
}
else if (state == PlayModeStateChange.EnteredPlayMode)
{
foreach (var instance in _instances)
{
instance._replayBuffer.Clear();
instance.UnregisterAll();
}
}
}
#endif
private void OnDisable()
{
// Clear all delegates when exiting play mode
if (_onEvent != null)
{
var invocationList = _onEvent.GetInvocationList();
foreach (var d in invocationList)
{
_onEvent -= (Action<T>)d;
}
}
UnregisterAll();
}
/// <summary>

View File

@ -47,7 +47,6 @@ namespace UnityAtoms
[SerializeField]
[FormerlySerializedAs("Changed")]
private E1 _changed;
private bool _changedInstantiatedAtRuntime;
public E1 Changed
{
get
@ -67,7 +66,6 @@ namespace UnityAtoms
[SerializeField]
[FormerlySerializedAs("ChangedWithHistory")]
private E2 _changedWithHistory;
private bool _changedWithHistoryInstantiatedAtRuntime;
public E2 ChangedWithHistory
{
get
@ -156,11 +154,6 @@ namespace UnityAtoms
#endif
}
private void OnDisable()
{
if (_changedInstantiatedAtRuntime) _changed = null;
if (_changedWithHistoryInstantiatedAtRuntime) _changedWithHistory = null;
}
/// <summary>
/// Set initial values
@ -169,9 +162,6 @@ namespace UnityAtoms
{
_oldValue = InitialValue;
_value = InitialValue;
_changedInstantiatedAtRuntime = false;
_changedWithHistoryInstantiatedAtRuntime = false;
}
/// <summary>
@ -188,7 +178,7 @@ namespace UnityAtoms
}
if (_triggerChangedWithHistoryOnOnEnable)
{
if(ChangedWithHistory == null)
if (ChangedWithHistory == null)
GetOrCreateEvent<E2>();
var pair = default(P);
@ -390,7 +380,6 @@ namespace UnityAtoms
{
_changed = ScriptableObject.CreateInstance<E1>();
_changed.name = $"{(String.IsNullOrWhiteSpace(name) ? "" : $"{name}_")}ChangedEvent_Runtime_{typeof(E1)}";
_changedInstantiatedAtRuntime = true;
}
return _changed as E;
@ -401,7 +390,6 @@ namespace UnityAtoms
{
_changedWithHistory = ScriptableObject.CreateInstance<E2>();
_changedWithHistory.name = $"{(String.IsNullOrWhiteSpace(name) ? "" : $"{name}_")}ChangedWithHistoryEvent_Runtime_{typeof(E2)}";
_changedWithHistoryInstantiatedAtRuntime = true;
}
return _changedWithHistory as E;

View File

@ -1,7 +1,7 @@
{
"name": "com.unity-atoms.unity-atoms-core",
"displayName": "Unity Atoms Core",
"version": "4.4.5",
"version": "4.4.6",
"unity": "2018.3",
"description": "Tiny modular pieces utilizing the power of Scriptable Objects",
"keywords": [

View File

@ -28,6 +28,7 @@ namespace UnityAtoms.FSM
{
((FiniteStateMachine)_inMemoryCopy).CompleteCurrentTransition = Instantiate(((FiniteStateMachine)Base).CompleteCurrentTransition);
}
base.ImplSpecificSetup();
}
}
}

View File

@ -14,6 +14,7 @@ namespace UnityAtoms.FSM
{
GameObject go = new GameObject("FiniteStateMachineUpdateHook");
_instance = go.AddComponent<FiniteStateMachineMonoHook>();
DontDestroyOnLoad(go);
}
return _instance;

View File

@ -1,7 +1,7 @@
{
"name": "com.unity-atoms.unity-atoms-fsm",
"displayName": "Unity Atoms FSM",
"version": "4.4.5",
"version": "4.4.6",
"unity": "2018.3",
"description": "Simple FSM using Unity Atoms.",
"keywords": [
@ -20,7 +20,7 @@
"/Documentation.meta"
],
"dependencies": {
"com.unity-atoms.unity-atoms-core": "4.4.5",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.5"
"com.unity-atoms.unity-atoms-core": "4.4.6",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.6"
}
}

View File

@ -1,7 +1,7 @@
{
"name": "com.unity-atoms.unity-atoms-input-system",
"displayName": "Unity Atoms Input System",
"version": "4.4.5",
"version": "4.4.6",
"unity": "2018.3",
"description": "Unity Atoms with Unity's Input System.",
"keywords": [
@ -18,8 +18,8 @@
"/Editor.meta"
],
"dependencies": {
"com.unity-atoms.unity-atoms-core": "4.4.5",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.5",
"com.unity-atoms.unity-atoms-core": "4.4.6",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.6",
"com.unity.inputsystem": "1.0.1"
}
}

View File

@ -1,7 +1,7 @@
{
"name": "com.unity-atoms.unity-atoms-mobile",
"displayName": "Unity Atoms Mobile",
"version": "4.4.5",
"version": "4.4.6",
"unity": "2018.3",
"description": "Unity Atoms for your mobile project.",
"keywords": [
@ -20,7 +20,7 @@
"/Documentation.meta"
],
"dependencies": {
"com.unity-atoms.unity-atoms-core": "4.4.5",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.5"
"com.unity-atoms.unity-atoms-core": "4.4.6",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.6"
}
}

View File

@ -1,7 +1,7 @@
{
"name": "com.unity-atoms.unity-atoms-mono-hooks",
"displayName": "Unity Atoms Mono Hooks",
"version": "4.4.5",
"version": "4.4.6",
"unity": "2018.3",
"description": "Hook into Unity's lifecycle methods with Atom Events.",
"keywords": [
@ -21,7 +21,7 @@
],
"dependencies": {
"com.unity.ugui": "1.0.0",
"com.unity-atoms.unity-atoms-core": "4.4.5",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.5"
"com.unity-atoms.unity-atoms-core": "4.4.6",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.6"
}
}

View File

@ -1,7 +1,7 @@
{
"name": "com.unity-atoms.unity-atoms-scene-mgmt",
"displayName": "Unity Atoms Scene Mgmt",
"version": "4.4.5",
"version": "4.4.6",
"unity": "2018.3",
"description": "Unity Atoms to manage your scenes.",
"keywords": [
@ -20,7 +20,7 @@
"/Documentation.meta"
],
"dependencies": {
"com.unity-atoms.unity-atoms-core": "4.4.5",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.5"
"com.unity-atoms.unity-atoms-core": "4.4.6",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.6"
}
}

View File

@ -1,7 +1,7 @@
{
"name": "com.unity-atoms.unity-atoms-tags",
"displayName": "Unity Atoms Tags",
"version": "4.4.5",
"version": "4.4.6",
"unity": "2018.3",
"description": "A replacement to Unity´s tags based on Unity Atoms.",
"keywords": [
@ -18,7 +18,7 @@
"/Documentation.meta"
],
"dependencies": {
"com.unity-atoms.unity-atoms-core": "4.4.5",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.5"
"com.unity-atoms.unity-atoms-core": "4.4.6",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.6"
}
}

View File

@ -1,7 +1,7 @@
{
"name": "com.unity-atoms.unity-atoms-ui",
"displayName": "Unity Atoms UI",
"version": "4.4.5",
"version": "4.4.6",
"unity": "2018.3",
"description": "UI system using Unity Atoms.",
"keywords": [
@ -18,7 +18,7 @@
"/Documentation.meta"
],
"dependencies": {
"com.unity-atoms.unity-atoms-core": "4.4.5",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.5"
"com.unity-atoms.unity-atoms-core": "4.4.6",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.6"
}
}

View File

@ -8,6 +8,7 @@
[![openupm](https://img.shields.io/npm/v/com.unity-atoms.unity-atoms-tags?label=tags&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.unity-atoms.unity-atoms-tags/)
[![openupm](https://img.shields.io/npm/v/com.unity-atoms.unity-atoms-scene-mgmt?label=scene-mgmt&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.unity-atoms.unity-atoms-scene-mgmt/)
[![openupm](https://img.shields.io/npm/v/com.unity-atoms.unity-atoms-ui?label=ui&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.unity-atoms.unity-atoms-ui/)
[![openupm](https://img.shields.io/npm/v/com.unity-atoms.unity-atoms-input-system?label=input-system&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.unity-atoms.unity-atoms-input-system/)
_Tiny modular pieces utilizing the power of Scriptable Objects_
@ -56,15 +57,15 @@ Add the following to your `manifest.json` (which is located under your project l
],
"dependencies": {
...
"com.unity-atoms.unity-atoms-core": "4.4.5",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.5",
"com.unity-atoms.unity-atoms-fsm": "4.4.5",
"com.unity-atoms.unity-atoms-mobile": "4.4.5",
"com.unity-atoms.unity-atoms-mono-hooks": "4.4.5",
"com.unity-atoms.unity-atoms-tags": "4.4.5",
"com.unity-atoms.unity-atoms-scene-mgmt": "4.4.5",
"com.unity-atoms.unity-atoms-ui": "4.4.5",
"com.unity-atoms.unity-atoms-input-system": "4.4.5",
"com.unity-atoms.unity-atoms-core": "4.4.6",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.6",
"com.unity-atoms.unity-atoms-fsm": "4.4.6",
"com.unity-atoms.unity-atoms-mobile": "4.4.6",
"com.unity-atoms.unity-atoms-mono-hooks": "4.4.6",
"com.unity-atoms.unity-atoms-tags": "4.4.6",
"com.unity-atoms.unity-atoms-scene-mgmt": "4.4.6",
"com.unity-atoms.unity-atoms-ui": "4.4.6",
"com.unity-atoms.unity-atoms-input-system": "4.4.6",
...
}
}

View File

@ -2,12 +2,14 @@
- Introduction
- [Installation](./introduction/installation.md)
- [Overview and philosopy](./introduction/overview.md)
- [Philosophy](./introduction/philosophy.md)
- [Overview](./introduction/overview.md)
- [Preferences](./introduction/preferences.md)
- [FAQ](./introduction/faq.md)
- Tutorials
- [Creating Atoms](./tutorials/creating-atoms.md)
- [Variables](./tutorials/variables.md)
- [Variable Pre Change Transformers](./tutorials/variable-transformers.md)
- [Events](./tutorials/events.md)
- [Listeners](./tutorials/listeners.md)
- [Actions](./tutorials/actions.md)
@ -18,21 +20,6 @@
- [Conditions](./tutorials/conditions.md)
- [Advanced example](./tutorials/advanced-example.md)
- [Usage with UniRX](./tutorials/unirx.md)
- API
- [UnityAtoms](./api/unityatoms.md)
- [UnityAtoms.Editor](./api/unityatoms.editor.md)
- [UnityAtoms.BaseAtoms](./api/unityatoms.baseatoms.md)
- [UnityAtoms.BaseAtoms.Editor](./api/unityatoms.baseatoms.editor.md)
- [UnityAtoms.FSM](./api/unityatoms.fsm.md)
- [UnityAtoms.FSM.Editor](./api/unityatoms.fsm.editor.md)
- [UnityAtoms.InputSystem](./api/unityatoms.inputsystem.md)
- [UnityAtoms.InputSystem.Editor](./api/unityatoms.inputsystem.editor.md)
- [UnityAtoms.Mobile](./api/unityatoms.mobile.md)
- [UnityAtoms.Mobile.Editor](./api/unityatoms.mobile.editor.md)
- [UnityAtoms.MonoHooks](./api/unityatoms.monohooks.md)
- [UnityAtoms.SceneMgmt](./api/unityatoms.scenemgmt.md)
- [UnityAtoms.SceneMgmt.Editor](./api/unityatoms.scenemgmt.editor.md)
- [UnityAtoms.Tags](./api/unityatoms.tags.md)
- Subpackages
- [BaseAtoms](./subpackages/base-atoms.md)
- [FSM](./subpackages/fsm.md)

View File

@ -1,836 +0,0 @@
---
id: unityatoms.baseatoms.editor
title: UnityAtoms.BaseAtoms.Editor
hide_title: true
sidebar_label: UnityAtoms.BaseAtoms.Editor
---
# Namespace - `UnityAtoms.BaseAtoms.Editor`
## `AtomCollectionReferenceDrawer`
A custom property drawer for AtomCollectionReference. Makes it possible to choose between a Collection or a Collection Instancer.
---
## `AtomListDrawer`
A custom property drawer for AtomBaseVariableList.
---
## `AtomListReferenceDrawer`
A custom property drawer for AtomListReference. Makes it possible to choose between a List or a List Instancer.
---
## `SerializableDictionaryDrawer`3`
A custom property drawer for SerializableDictionary.
---
## `StringReferenceAtomBaseVariableDictionaryDrawer`
SerializableDictionary property drawer for type <StringReference, AtomBaseVariable>. Inherits from `SerializableDictionaryDrawer<StringReference, AtomBaseVariable, StringReferenceAtomBaseVariableDictionary>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `BoolConstantDrawer`
Constant property drawer of type `bool`. Inherits from `AtomDrawer<BoolConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DConstantDrawer`
Constant property drawer of type `Collider2D`. Inherits from `AtomDrawer<Collider2DConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderConstantDrawer`
Constant property drawer of type `Collider`. Inherits from `AtomDrawer<ColliderConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DConstantDrawer`
Constant property drawer of type `Collision2D`. Inherits from `AtomDrawer<Collision2DConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionConstantDrawer`
Constant property drawer of type `Collision`. Inherits from `AtomDrawer<CollisionConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColorConstantDrawer`
Constant property drawer of type `Color`. Inherits from `AtomDrawer<ColorConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `DoubleConstantDrawer`
Constant property drawer of type `double`. Inherits from `AtomDrawer<DoubleConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `FloatConstantDrawer`
Constant property drawer of type `float`. Inherits from `AtomDrawer<FloatConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `GameObjectConstantDrawer`
Constant property drawer of type `GameObject`. Inherits from `AtomDrawer<GameObjectConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `IntConstantDrawer`
Constant property drawer of type `int`. Inherits from `AtomDrawer<IntConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `QuaternionConstantDrawer`
Constant property drawer of type `Quaternion`. Inherits from `AtomDrawer<QuaternionConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `StringConstantDrawer`
Constant property drawer of type `string`. Inherits from `AtomDrawer<StringConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector2ConstantDrawer`
Constant property drawer of type `Vector2`. Inherits from `AtomDrawer<Vector2Constant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector3ConstantDrawer`
Constant property drawer of type `Vector3`. Inherits from `AtomDrawer<Vector3Constant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `AtomBaseVariableBaseEventReferenceDrawer`
A custom property drawer for AtomBaseVariable BaseEventReferences. Makes it possible to choose between an Event, Event Instancer, Collection Added, Collection Removed, List Added, List Removed, Collection Instancer Added, Collection Instancer Removed, List Instancer Added or List Instancer Removed.
---
## `VoidBaseEventReferenceDrawer`
A custom property drawer for Void BaseEventReferences. Makes it possible to choose between an Event, Event Instancer, Collection Cleared, List Cleared, Collection Instancer Cleared or List Instancer Cleared.
---
## `AtomBaseVariableEventDrawer`
Event property drawer of type `AtomBaseVariable`. Inherits from `AtomDrawer<AtomBaseVariableEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `BoolEventDrawer`
Event property drawer of type `bool`. Inherits from `AtomDrawer<BoolEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `BoolPairEventDrawer`
Event property drawer of type `BoolPair`. Inherits from `AtomDrawer<BoolPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DEventDrawer`
Event property drawer of type `Collider2D`. Inherits from `AtomDrawer<Collider2DEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DPairEventDrawer`
Event property drawer of type `Collider2DPair`. Inherits from `AtomDrawer<Collider2DPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderEventDrawer`
Event property drawer of type `Collider`. Inherits from `AtomDrawer<ColliderEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderPairEventDrawer`
Event property drawer of type `ColliderPair`. Inherits from `AtomDrawer<ColliderPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DEventDrawer`
Event property drawer of type `Collision2D`. Inherits from `AtomDrawer<Collision2DEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DPairEventDrawer`
Event property drawer of type `Collision2DPair`. Inherits from `AtomDrawer<Collision2DPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionEventDrawer`
Event property drawer of type `Collision`. Inherits from `AtomDrawer<CollisionEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionPairEventDrawer`
Event property drawer of type `CollisionPair`. Inherits from `AtomDrawer<CollisionPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColorEventDrawer`
Event property drawer of type `Color`. Inherits from `AtomDrawer<ColorEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColorPairEventDrawer`
Event property drawer of type `ColorPair`. Inherits from `AtomDrawer<ColorPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `DoubleEventDrawer`
Event property drawer of type `double`. Inherits from `AtomDrawer<DoubleEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `DoublePairEventDrawer`
Event property drawer of type `DoublePair`. Inherits from `AtomDrawer<DoublePairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `FloatEventDrawer`
Event property drawer of type `float`. Inherits from `AtomDrawer<FloatEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `FloatPairEventDrawer`
Event property drawer of type `FloatPair`. Inherits from `AtomDrawer<FloatPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `GameObjectEventDrawer`
Event property drawer of type `GameObject`. Inherits from `AtomDrawer<GameObjectEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `GameObjectPairEventDrawer`
Event property drawer of type `GameObjectPair`. Inherits from `AtomDrawer<GameObjectPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `IntEventDrawer`
Event property drawer of type `int`. Inherits from `AtomDrawer<IntEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `IntPairEventDrawer`
Event property drawer of type `IntPair`. Inherits from `AtomDrawer<IntPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `QuaternionEventDrawer`
Event property drawer of type `Quaternion`. Inherits from `AtomDrawer<QuaternionEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `QuaternionPairEventDrawer`
Event property drawer of type `QuaternionPair`. Inherits from `AtomDrawer<QuaternionPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `StringEventDrawer`
Event property drawer of type `string`. Inherits from `AtomDrawer<StringEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `StringPairEventDrawer`
Event property drawer of type `StringPair`. Inherits from `AtomDrawer<StringPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector2EventDrawer`
Event property drawer of type `Vector2`. Inherits from `AtomDrawer<Vector2Event>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector2PairEventDrawer`
Event property drawer of type `Vector2Pair`. Inherits from `AtomDrawer<Vector2PairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector3EventDrawer`
Event property drawer of type `Vector3`. Inherits from `AtomDrawer<Vector3Event>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector3PairEventDrawer`
Event property drawer of type `Vector3Pair`. Inherits from `AtomDrawer<Vector3PairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `VoidEventDrawer`
Event property drawer of type `Void`. Inherits from `AtomDrawer<VoidEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `BoolValueListDrawer`
Value List property drawer of type `bool`. Inherits from `AtomDrawer<BoolValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DValueListDrawer`
Value List property drawer of type `Collider2D`. Inherits from `AtomDrawer<Collider2DValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderValueListDrawer`
Value List property drawer of type `Collider`. Inherits from `AtomDrawer<ColliderValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DValueListDrawer`
Value List property drawer of type `Collision2D`. Inherits from `AtomDrawer<Collision2DValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionValueListDrawer`
Value List property drawer of type `Collision`. Inherits from `AtomDrawer<CollisionValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColorValueListDrawer`
Value List property drawer of type `Color`. Inherits from `AtomDrawer<ColorValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `DoubleValueListDrawer`
Value List property drawer of type `double`. Inherits from `AtomDrawer<DoubleValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `FloatValueListDrawer`
Value List property drawer of type `float`. Inherits from `AtomDrawer<FloatValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `GameObjectValueListDrawer`
Value List property drawer of type `GameObject`. Inherits from `AtomDrawer<GameObjectValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `IntValueListDrawer`
Value List property drawer of type `int`. Inherits from `AtomDrawer<IntValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `QuaternionValueListDrawer`
Value List property drawer of type `Quaternion`. Inherits from `AtomDrawer<QuaternionValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `StringValueListDrawer`
Value List property drawer of type `string`. Inherits from `AtomDrawer<StringValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector2ValueListDrawer`
Value List property drawer of type `Vector2`. Inherits from `AtomDrawer<Vector2ValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector3ValueListDrawer`
Value List property drawer of type `Vector3`. Inherits from `AtomDrawer<Vector3ValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `BoolVariableDrawer`
Variable property drawer of type `bool`. Inherits from `AtomDrawer<BoolVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DVariableDrawer`
Variable property drawer of type `Collider2D`. Inherits from `AtomDrawer<Collider2DVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderVariableDrawer`
Variable property drawer of type `Collider`. Inherits from `AtomDrawer<ColliderVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DVariableDrawer`
Variable property drawer of type `Collision2D`. Inherits from `AtomDrawer<Collision2DVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionVariableDrawer`
Variable property drawer of type `Collision`. Inherits from `AtomDrawer<CollisionVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColorVariableDrawer`
Variable property drawer of type `Color`. Inherits from `AtomDrawer<ColorVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `DoubleVariableDrawer`
Variable property drawer of type `double`. Inherits from `AtomDrawer<DoubleVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `FloatVariableDrawer`
Variable property drawer of type `float`. Inherits from `AtomDrawer<FloatVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `GameObjectVariableDrawer`
Variable property drawer of type `GameObject`. Inherits from `AtomDrawer<GameObjectVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `IntVariableDrawer`
Variable property drawer of type `int`. Inherits from `AtomDrawer<IntVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `QuaternionVariableDrawer`
Variable property drawer of type `Quaternion`. Inherits from `AtomDrawer<QuaternionVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `StringVariableDrawer`
Variable property drawer of type `string`. Inherits from `AtomDrawer<StringVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector2VariableDrawer`
Variable property drawer of type `Vector2`. Inherits from `AtomDrawer<Vector2Variable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector3VariableDrawer`
Variable property drawer of type `Vector3`. Inherits from `AtomDrawer<Vector3Variable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `AtomBaseVariableEventInstancerEditor`
Event property drawer of type `AtomBaseVariable`. Inherits from `AtomEventInstancerEditor<AtomBaseVariable, AtomBaseVariableEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `BoolEventInstancerEditor`
Event property drawer of type `bool`. Inherits from `AtomEventInstancerEditor<bool, BoolEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DEventInstancerEditor`
Event property drawer of type `Collider2D`. Inherits from `AtomEventInstancerEditor<Collider2D, Collider2DEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderEventInstancerEditor`
Event property drawer of type `Collider`. Inherits from `AtomEventInstancerEditor<Collider, ColliderEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColorEventInstancerEditor`
Event property drawer of type `Color`. Inherits from `AtomEventInstancerEditor<Color, ColorEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `FloatEventInstancerEditor`
Event property drawer of type `float`. Inherits from `AtomEventInstancerEditor<float, FloatEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `GameObjectEventInstancerEditor`
Event property drawer of type `GameObject`. Inherits from `AtomEventInstancerEditor<GameObject, GameObjectEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `IntEventInstancerEditor`
Event property drawer of type `int`. Inherits from `AtomEventInstancerEditor<int, IntEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `StringEventInstancerEditor`
Event property drawer of type `string`. Inherits from `AtomEventInstancerEditor<string, StringEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector2EventInstancerEditor`
Event property drawer of type `Vector2`. Inherits from `AtomEventInstancerEditor<Vector2, Vector2Event>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector3EventInstancerEditor`
Event property drawer of type `Vector3`. Inherits from `AtomEventInstancerEditor<Vector3, Vector3Event>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `VoidEventInstancerEditor`
Event property drawer of type `Void`. Inherits from `AtomEventInstancerEditor<Void, VoidEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `AtomBaseVariableEventEditor`
Event property drawer of type `AtomBaseVariable`. Inherits from `AtomEventEditor<AtomBaseVariable, AtomBaseVariableEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `BoolEventEditor`
Event property drawer of type `bool`. Inherits from `AtomEventEditor<bool, BoolEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `BoolPairEventEditor`
Event property drawer of type `BoolPair`. Inherits from `AtomEventEditor<BoolPair, BoolPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DEventEditor`
Event property drawer of type `Collider2D`. Inherits from `AtomEventEditor<Collider2D, Collider2DEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DPairEventEditor`
Event property drawer of type `Collider2DPair`. Inherits from `AtomEventEditor<Collider2DPair, Collider2DPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderEventEditor`
Event property drawer of type `Collider`. Inherits from `AtomEventEditor<Collider, ColliderEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderPairEventEditor`
Event property drawer of type `ColliderPair`. Inherits from `AtomEventEditor<ColliderPair, ColliderPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DEventEditor`
Event property drawer of type `Collision2D`. Inherits from `AtomEventEditor<Collision2D, Collision2DEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DPairEventEditor`
Event property drawer of type `Collision2DPair`. Inherits from `AtomEventEditor<Collision2DPair, Collision2DPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionEventEditor`
Event property drawer of type `Collision`. Inherits from `AtomEventEditor<Collision, CollisionEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionPairEventEditor`
Event property drawer of type `CollisionPair`. Inherits from `AtomEventEditor<CollisionPair, CollisionPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColorEventEditor`
Event property drawer of type `Color`. Inherits from `AtomEventEditor<Color, ColorEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColorPairEventEditor`
Event property drawer of type `ColorPair`. Inherits from `AtomEventEditor<ColorPair, ColorPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `DoubleEventEditor`
Event property drawer of type `double`. Inherits from `AtomEventEditor<double, DoubleEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `DoublePairEventEditor`
Event property drawer of type `DoublePair`. Inherits from `AtomEventEditor<DoublePair, DoublePairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `FloatEventEditor`
Event property drawer of type `float`. Inherits from `AtomEventEditor<float, FloatEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `FloatPairEventEditor`
Event property drawer of type `FloatPair`. Inherits from `AtomEventEditor<FloatPair, FloatPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `GameObjectEventEditor`
Event property drawer of type `GameObject`. Inherits from `AtomEventEditor<GameObject, GameObjectEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `GameObjectPairEventEditor`
Event property drawer of type `GameObjectPair`. Inherits from `AtomEventEditor<GameObjectPair, GameObjectPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `IntEventEditor`
Event property drawer of type `int`. Inherits from `AtomEventEditor<int, IntEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `IntPairEventEditor`
Event property drawer of type `IntPair`. Inherits from `AtomEventEditor<IntPair, IntPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `QuaternionEventEditor`
Event property drawer of type `Quaternion`. Inherits from `AtomEventEditor<Quaternion, QuaternionEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `QuaternionPairEventEditor`
Event property drawer of type `QuaternionPair`. Inherits from `AtomEventEditor<QuaternionPair, QuaternionPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `StringEventEditor`
Event property drawer of type `string`. Inherits from `AtomEventEditor<string, StringEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `StringPairEventEditor`
Event property drawer of type `StringPair`. Inherits from `AtomEventEditor<StringPair, StringPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector2EventEditor`
Event property drawer of type `Vector2`. Inherits from `AtomEventEditor<Vector2, Vector2Event>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector2PairEventEditor`
Event property drawer of type `Vector2Pair`. Inherits from `AtomEventEditor<Vector2Pair, Vector2PairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector3EventEditor`
Event property drawer of type `Vector3`. Inherits from `AtomEventEditor<Vector3, Vector3Event>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Vector3PairEventEditor`
Event property drawer of type `Vector3Pair`. Inherits from `AtomEventEditor<Vector3Pair, Vector3PairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `VoidEventEditor`
Event property drawer of type `Void`. Inherits from `AtomEventEditor<Void, VoidEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ClampBaseEditor`
Base class for a custom editor for Clamp Functions.
---
## `ClampFloatEditor`
Custom editor for ClampFloat.
---
## `ClampIntEditor`
Custom editor for ClampInt.
---
## `BoolVariableEditor`
Variable Inspector of type `bool`. Inherits from `AtomVariableEditor`
---
## `Collider2DVariableEditor`
Variable Inspector of type `Collider2D`. Inherits from `AtomVariableEditor`
---
## `ColliderVariableEditor`
Variable Inspector of type `Collider`. Inherits from `AtomVariableEditor`
---
## `Collision2DVariableEditor`
Variable Inspector of type `Collision2D`. Inherits from `AtomVariableEditor`
---
## `CollisionVariableEditor`
Variable Inspector of type `Collision`. Inherits from `AtomVariableEditor`
---
## `ColorVariableEditor`
Variable Inspector of type `Color`. Inherits from `AtomVariableEditor`
---
## `DoubleVariableEditor`
Variable Inspector of type `double`. Inherits from `AtomVariableEditor`
---
## `FloatVariableEditor`
Variable Inspector of type `float`. Inherits from `AtomVariableEditor`
---
## `GameObjectVariableEditor`
Variable Inspector of type `GameObject`. Inherits from `AtomVariableEditor`
---
## `IntVariableEditor`
Variable Inspector of type `int`. Inherits from `AtomVariableEditor`
---
## `QuaternionVariableEditor`
Variable Inspector of type `Quaternion`. Inherits from `AtomVariableEditor`
---
## `StringVariableEditor`
Variable Inspector of type `string`. Inherits from `AtomVariableEditor`
---
## `Vector2VariableEditor`
Variable Inspector of type `Vector2`. Inherits from `AtomVariableEditor`
---
## `Vector3VariableEditor`
Variable Inspector of type `Vector3`. Inherits from `AtomVariableEditor`
---

File diff suppressed because it is too large Load Diff

View File

@ -1,296 +0,0 @@
---
id: unityatoms.editor
title: UnityAtoms.Editor
hide_title: true
sidebar_label: UnityAtoms.Editor
---
# Namespace - `UnityAtoms.Editor`
## `AtomBaseReferenceDrawer`
A custom property drawer for References (Events and regular). Makes it possible to reference a resources (Variable or Event) through multiple options.
---
## `AtomDrawer<T>`
#### Type Parameters
- `T` - The type of Atom the property drawer should apply to.
The base Unity Atoms property drawer. Makes it possible to create and add a new Atom via Unity's inspector. Only availble in `UNITY_2018_3_OR_NEWER`.
---
## `AtomEventReferenceDrawer`
A custom property drawer for Event References. Makes it possible to choose between an Event, Event Instancer, Variable or a Variable Instancer.
---
## `AtomListAttributeDrawer`
A custom property drawer for properties using the `AtomList` attribute.
---
## `AtomReferenceDrawer`
A custom property drawer for References. Makes it possible to choose between a Value, Variable, Constant or a Variable Instancer.
---
## `ReadOnlyDrawer`
Make property read only by using the abbtribute `[ReadOnly]`. Solution taken from: https://answers.unity.com/questions/489942/how-to-make-a-readonly-property-in-inspector.html
---
## `AtomEventInstancerEditor<T,E>`
#### Type Parameters
- `T` - The type of this event..
- `E` - Event of type T.
Custom editor for Events. Adds the possiblity to raise an Event from Unity's Inspector.
---
## `AtomEventEditor<T,E>`
#### Type Parameters
- `T` - The type of this event..
- `E` - Event of type T.
Custom editor for Events. Adds the possiblity to raise an Event from Unity's Inspector.
---
## `AtomVariableEditor`2`
Custom editor for Variables. Provides a better user workflow and indicates when which variables can be edited
---
## `AtomReceipe`
Internal module class that holds that regarding an Atom type.
---
## `AtomType`
Internal module class that holds that regarding an Atom type.
---
## `AtomTypes`
Internal static class holding predefined static `AtomType`s.
### Variables
#### `ALL_ATOM_TYPES`
Containes all common atom types that are usually generated for a type.
---
#### `DEPENDENCY_GRAPH`
Graph explaining all the dependencies between Atoms.
---
## `Generator`
Generator that generates new Atom types based on the input data. Used by the `GeneratorEditor`. Only availble in `UNITY_2019_1_OR_NEWER`.
### Methods
#### `Generate(UnityAtoms.Editor.AtomReceipe,System.String,System.String[],System.Collections.Generic.List{System.String},System.Collections.Generic.Dictionary{System.String,System.String})`
Generate new Atoms based on the input data.
##### Parameters
- `valueType` - The type of Atom to generate.abstract Eg. double, byte, MyStruct, MyClass.
- `baseWritePath` - Base write path (relative to the Asset folder) where the Atoms are going to be written to.
- `isEquatable` - Is the `type` provided implementing `IEquatable`?
- `atomTypesToGenerate` - A list of `AtomType`s to be generated.
- `typeNamespace` - If the `type` provided is defined under a namespace, provide that namespace here.
- `subUnityAtomsNamespace` - By default the Atoms that gets generated will be under the namespace `UnityAtoms`. If you for example like it to be under `UnityAtoms.MyNamespace` you would then enter `MyNamespace` in this field.
##### Examples
```cs
namespace MyNamespace
{
public struct MyStruct
{
public string Text;
public int Number;
}
}
var generator = new Generator();
generator.Generate("MyStruct", "", false, new List<AtomType>() { AtomTypes.ACTION }, "MyNamespace", ""); // Generates an Atom Action of type MyStruct
```
---
#### `RemoveDuplicateNamespaces(System.String)`
Removes duplicate namespaces, given content from a template.
##### Parameters
- `template` - The content template to remove namespace from.
##### Returns
A copy of `content`, but without duplicate namespaces.
---
## `GeneratorEditor`
Editor class for the `Generator`. Use it via the top window bar at _Tools / Unity Atoms / Generator_. Only availble in `UNITY_2019_1_OR_NEWER`.
### Methods
#### `Init`
Create the editor window.
---
#### `AddAtomTypeToGenerate(UnityAtoms.Editor.AtomType)`
Add provided `AtomType` to the list of Atom types to be generated.
##### Parameters
- `atomType` - The `AtomType` to be added.
---
#### `RemoveAtomTypeToGenerate(UnityAtoms.Editor.AtomType)`
Remove provided `AtomType` from the list of Atom types to be generated.
##### Parameters
- `atomType` - The `AtomType` to be removed.
---
#### `SetWarningText(UnityAtoms.Editor.AtomType,System.Collections.Generic.List{UnityAtoms.Editor.AtomType})`
Set and display warning text in the editor.
##### Parameters
- `atomType` - `AtomType` to generate the warning for.
- `disabledDeps` - List of disabled deps.
---
#### `OnEnable`
Called when editor is enabled.
---
#### `CreateDivider`
Helper method to create a divider.
##### Returns
The divider (`VisualElement`) created.
---
#### `CreateAtomTypeToGenerateToggleRow(UnityAtoms.Editor.AtomType)`
Helper to create toogle row for a specific `AtomType`.
##### Parameters
- `atomType` - The provided `AtomType`.
##### Returns
A new toggle row (`VisualElement`).
---
## `RegenereateAllAtoms`
Internal utility class to regenerate all Atoms. Reachable via top menu bar and `Tools/Unity Atoms/Regenerate All Atoms`.
### Methods
#### `Regenereate`
Create the editor window.
---
## `Templating`
Internal class used for templating when generating new Atoms using the `Generator`.
### Methods
#### `ResolveConditionals(System.String,System.Collections.Generic.List{System.String})`
Resolve conditionals from the provided tempalte.
##### Parameters
- `template` - Template to resolve the conditionals from.
- `trueConditions` - A list of conditionals that are `true`.
##### Returns
A new template string resolved and based on the provided `template`.
---
#### `ResolveVariables(System.Collections.Generic.Dictionary{System.String,System.String},System.String)`
Resolve variables in the provided string.
##### Parameters
- `templateVariables` - Dictionay mapping template variables and their resolutions.
- `toResolve` - The string to resolve.
##### Returns
A new template string resolved and based on the provided `toResolve` string.
---
## `EditorIconPostProcessor`
Postprocessor that processes all scripts using the EditorIcon attribute and assigns the matching icon guid (matching the icon query name) to the script's meta. It's a very simple solution (and very hacky), but works really great.
### Methods
#### `OnPostprocessAllAssets(System.String[],System.String[],System.String[],System.String[])`
Called when new assets are imported, deleted or moved.
##### Parameters
- `importedAssets` - Imported assets.
- `deletedAssets` - Deleted assets.
- `movedAssets` - Moved assets.
- `movedFromAssetPaths` - Moved from asset paths.
---

View File

@ -1,44 +0,0 @@
---
id: unityatoms.fsm.editor
title: UnityAtoms.FSM.Editor
hide_title: true
sidebar_label: UnityAtoms.FSM.Editor
---
# Namespace - `UnityAtoms.FSM.Editor`
## `FiniteStateMachineReferenceDrawer`
A custom property drawer for FiniteStateMachineReference. Makes it possible to choose between a FSM or a FSM Instancer.
---
## `FSMTransitionDataBaseEventReferenceDrawer`
A custom property drawer for References. Makes it possible to choose between a value, Variable, Constant or a Variable Instancer.
---
## `FSMTransitionDataEventDrawer`
Event property drawer of type `FSMTransitionData`. Inherits from `AtomDrawer<FSMTransitionDataEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `FiniteStateMachineEditor`
Custom property drawer for type `FiniteStateMachine`.
---
## `FiniteStateMachineInstancerEditor`
Custom property drawer for type `FiniteStateMachineInstancer`.
---
## `FSMTransitionDataEventEditor`
Event property drawer of type `FSMTransitionData`. Inherits from `AtomEventEditor<FSMTransitionData, FSMTransitionDataEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---

View File

@ -1,230 +0,0 @@
---
id: unityatoms.fsm
title: UnityAtoms.FSM
hide_title: true
sidebar_label: UnityAtoms.FSM
---
# Namespace - `UnityAtoms.FSM`
## `FSMTransitionDataAction`
Action of type `FSMTransitionData`. Inherits from `AtomAction<FSMTransitionData>`.
---
## `FSMTransitionDataBaseEventReferenceListener`
Event Reference Listener of type `FSMTransitionData`. Inherits from `AtomEventReferenceListener<FSMTransitionData, FSMTransitionDataEvent, FSMTransitionDataBaseEventReference, FSMTransitionDataUnityEvent>`.
---
## `FSMTransitionDataBaseEventReferenceUsage`
Different Event Reference usages.
---
## `FSMTransitionDataBaseEventReference`
Event Reference of type `FSMTransitionData`. Inherits from `AtomBaseEventReference<FSMTransitionData, FSMTransitionDataEvent, FSMTransitionDataEventInstancer>`.
### Variables
#### `_fsm`
Takes event from this FiniteStateMachine if `Usage` is set to `FSM`.
---
#### `_fsmInstancer`
Takes event from this FiniteStateMachineInstancer if `Usage` is set to `FSM Instancer`.
### Properties
#### `Event`
Get the value for the Reference.
---
## `FSMTransitionDataEventInstancer`
Event Instancer of type `FSMTransitionData`. Inherits from `AtomEventInstancer<FSMTransitionData, FSMTransitionDataEvent>`.
---
## `FSMTransitionDataEvent`
Event of type `FSMTransitionData`. Inherits from `AtomEvent<FSMTransitionData>`.
---
## `FiniteStateMachine`
This is an implementation of an FSM in Unity Atoms. It is build using a set of states and a set of transitions. A set can only change through dispatching commands defined by the transitions.
### Variables
#### `_currentFlatValue`
The value in this state machine, disregarding a "deeper" values in a sub machine.
### Properties
#### `Value`
Get or set current value of this FSM. If a sub FSM is having the current state, then its state will be returned. Using the setter is the same thing as calling `Dispatch`.
---
#### `IsTransitioning`
Gets a boolean value indicating if the state machine is currently transitioning.
### Methods
#### `OnUpdate(System.Action{System.Single,System.String},UnityEngine.GameObject)`
Calls the handler on every Update.
##### Parameters
- `handler` - The handler to called.
- `gameObject` - The gameObject where this handler is setup.
---
#### `OnFixedUpdate(System.Action{System.Single,System.String},UnityEngine.GameObject)`
Calls the handler on every FixedUpdate.
##### Parameters
- `handler` - The handler to called.
- `gameObject` - The gameObject where this hook is setup.
---
#### `DispatchWhen(System.String,System.Func{System.String,System.Boolean},UnityEngine.GameObject)`
Defines a command that is going to automatically be dispatched when the condition provided is met.
---
#### `OnStateCooldown(System.String,System.Action{System.String},UnityEngine.GameObject)`
Called on every state cooldown.
##### Parameters
- `state` - The state where we want to do something on the cool down.
- `handler` - Handler to be called on cooldown.
- `gameObject` - The gameObject where this hook is setup.
---
#### `Reset(System.Boolean)`
Reset the state machine
##### Parameters
- `shouldTriggerEvents` - Should we trigger Change Events.
---
#### `Dispatch(System.String)`
Dispatches a new command to the FiniteStateMachine, invoking any necessary transitions.
##### Parameters
- `command` - undefined
---
## `FiniteStateMachineInstancer`
Takes a base FSM and creates an in memory copy of it on OnEnable. Removes the FSM on OnDestroy.
### Variables
#### `_fsmBase`
The variable that the in memory copy will be based on when created at runtime.
---
## `FiniteStateMachineMonoHook`
Needed By FiniteStateMachine in order to gain access to some of the Unity life cycle methods.
---
## `FiniteStateMachineReferenceUsage`
Different usages of the FSM reference.
---
## `FiniteStateMachineReference`
Reference of type `FiniteStateMachine`. Inherits from `AtomBaseReference`.
### Variables
#### `_fsm`
Variable used if `Usage` is set to `FSM`.
---
#### `_fsmInstancer`
Variable Instancer used if `Usage` is set to `FSM_INSTANCER`.
### Properties
#### `Machine`
Get the value for the Reference.
---
## `FSMState`
Class representing a state in the FSM.
---
## `FSMStateListWrapper`
Needed in order to use our custom property drawer for states in the FSM.
---
## `FSMTransitionData`
A struct representing a transition in a FSM.
---
## `Transition`
Controls a transition from a FromState to a ToState.
---
## `TransitionListWrapper`
Needed in order to use our custom property drawer for transitions in the FSM.
---
## `FSMTransitionDataUnityEvent`
None generic Unity Event of type `FSMTransitionData`. Inherits from `UnityEvent<FSMTransitionData>`.
---

View File

@ -1,32 +0,0 @@
---
id: unityatoms.inputsystem.editor
title: UnityAtoms.InputSystem.Editor
hide_title: true
sidebar_label: UnityAtoms.InputSystem.Editor
---
# Namespace - `UnityAtoms.InputSystem.Editor`
## `InputAction_CallbackContextEventDrawer`
Event property drawer of type `InputAction.CallbackContext`. Inherits from `AtomDrawer<InputAction_CallbackContextEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `PlayerInputEventDrawer`
Event property drawer of type `PlayerInput`. Inherits from `AtomDrawer<PlayerInputEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `InputAction_CallbackContextEventEditor`
Event property drawer of type `InputAction.CallbackContext`. Inherits from `AtomEventEditor<InputAction.CallbackContext, InputAction_CallbackContextEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `PlayerInputEventEditor`
Event property drawer of type `PlayerInput`. Inherits from `AtomEventEditor<PlayerInput, PlayerInputEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---

View File

@ -1,56 +0,0 @@
---
id: unityatoms.inputsystem
title: UnityAtoms.InputSystem
hide_title: true
sidebar_label: UnityAtoms.InputSystem
---
# Namespace - `UnityAtoms.InputSystem`
## `InputAction_CallbackContextAction`
Action of type `InputAction.CallbackContext`. Inherits from `AtomAction<InputAction.CallbackContext>`.
---
## `PlayerInputAction`
Action of type `PlayerInput`. Inherits from `AtomAction<PlayerInput>`.
---
## `InputAction_CallbackContextEventInstancer`
Event Instancer of type `InputAction.CallbackContext`. Inherits from `AtomEventInstancer<InputAction.CallbackContext, InputAction_CallbackContextEvent>`.
---
## `PlayerInputEventInstancer`
Event Instancer of type `PlayerInput`. Inherits from `AtomEventInstancer<PlayerInput, PlayerInputEvent>`.
---
## `InputAction_CallbackContextEvent`
Event of type `InputAction.CallbackContext`. Inherits from `AtomEvent<InputAction.CallbackContext>`.
---
## `PlayerInputEvent`
Event of type `PlayerInput`. Inherits from `AtomEvent<PlayerInput>`.
---
## `InputAction_CallbackContextUnityEvent`
None generic Unity Event of type `InputAction.CallbackContext`. Inherits from `UnityEvent<InputAction.CallbackContext>`.
---
## `PlayerInputUnityEvent`
None generic Unity Event of type `PlayerInput`. Inherits from `UnityEvent<PlayerInput>`.
---

File diff suppressed because it is too large Load Diff

View File

@ -1,56 +0,0 @@
---
id: unityatoms.mobile.editor
title: UnityAtoms.Mobile.Editor
hide_title: true
sidebar_label: UnityAtoms.Mobile.Editor
---
# Namespace - `UnityAtoms.Mobile.Editor`
## `TouchUserInputConstantDrawer`
Constant property drawer of type `TouchUserInput`. Inherits from `AtomDrawer<TouchUserInputConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `TouchUserInputEventDrawer`
Event property drawer of type `TouchUserInput`. Inherits from `AtomDrawer<TouchUserInputEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `TouchUserInputPairEventDrawer`
Event property drawer of type `TouchUserInputPair`. Inherits from `AtomDrawer<TouchUserInputPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `TouchUserInputValueListDrawer`
Value List property drawer of type `TouchUserInput`. Inherits from `AtomDrawer<TouchUserInputValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `TouchUserInputVariableDrawer`
Variable property drawer of type `TouchUserInput`. Inherits from `AtomDrawer<TouchUserInputVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `TouchUserInputEventEditor`
Event property drawer of type `TouchUserInput`. Inherits from `AtomEventEditor<TouchUserInput, TouchUserInputEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `TouchUserInputPairEventEditor`
Event property drawer of type `TouchUserInputPair`. Inherits from `AtomEventEditor<TouchUserInputPair, TouchUserInputPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `TouchUserInputVariableEditor`
Variable Inspector of type `TouchUserInput`. Inherits from `AtomVariableEditor`
---

View File

@ -1,299 +0,0 @@
---
id: unityatoms.mobile
title: UnityAtoms.Mobile
hide_title: true
sidebar_label: UnityAtoms.Mobile
---
# Namespace - `UnityAtoms.Mobile`
## `TouchUserInputAction`
Action of type `TouchUserInput`. Inherits from `AtomAction<TouchUserInput>`.
---
## `TouchUserInputPairAction`
Action of type `TouchUserInputPair`. Inherits from `AtomAction<TouchUserInputPair>`.
---
## `UpdateTouchUserInput`
Updates the `TouchUserInputVariable` on every Update tick. Meant to be called every Update.
### Variables
#### `TouchUserInputVariable`
The `TouchUserInputVariable` to update.
### Methods
#### `Do`
Update the `TouchUserInputVariable`.abstract Call this on every Update tick.
---
## `SetTouchUserInputVariableValue`
Set variable value Action of type `TouchUserInput`. Inherits from `SetVariableValue<TouchUserInput, TouchUserInputPair, TouchUserInputVariable, TouchUserInputConstant, TouchUserInputReference, TouchUserInputEvent, TouchUserInputPairEvent, TouchUserInputVariableInstancer>`.
---
## `TouchUserInputCondition`
Condition of type `TouchUserInput`. Inherits from `AtomCondition<TouchUserInput>`.
---
## `TouchUserInputConstant`
Constant of type `TouchUserInput`. Inherits from `AtomBaseVariable<TouchUserInput>`.
---
## `TouchUserInputEventInstancer`
Event Instancer of type `TouchUserInput`. Inherits from `AtomEventInstancer<TouchUserInput, TouchUserInputEvent>`.
---
## `TouchUserInputPairEventInstancer`
Event Instancer of type `TouchUserInputPair`. Inherits from `AtomEventInstancer<TouchUserInputPair, TouchUserInputPairEvent>`.
---
## `TouchUserInputEventReferenceListener`
Event Reference Listener of type `TouchUserInput`. Inherits from `AtomEventReferenceListener<TouchUserInput, TouchUserInputEvent, TouchUserInputEventReference, TouchUserInputUnityEvent>`.
---
## `TouchUserInputPairEventReferenceListener`
Event Reference Listener of type `TouchUserInputPair`. Inherits from `AtomEventReferenceListener<TouchUserInputPair, TouchUserInputPairEvent, TouchUserInputPairEventReference, TouchUserInputPairUnityEvent>`.
---
## `TouchUserInputEventReference`
Event Reference of type `TouchUserInput`. Inherits from `AtomEventReference<TouchUserInput, TouchUserInputVariable, TouchUserInputEvent, TouchUserInputVariableInstancer, TouchUserInputEventInstancer>`.
---
## `TouchUserInputPairEventReference`
Event Reference of type `TouchUserInputPair`. Inherits from `AtomEventReference<TouchUserInputPair, TouchUserInputVariable, TouchUserInputPairEvent, TouchUserInputVariableInstancer, TouchUserInputPairEventInstancer>`.
---
## `TouchUserInputEvent`
Event of type `TouchUserInput`. Inherits from `AtomEvent<TouchUserInput>`.
---
## `TouchUserInputPairEvent`
Event of type `TouchUserInputPair`. Inherits from `AtomEvent<TouchUserInputPair>`.
---
## `TouchUserInputTouchUserInputFunction`
Function x 2 of type `TouchUserInput`. Inherits from `AtomFunction<TouchUserInput, TouchUserInput>`.
---
## `TouchUserInputPair`
IPair of type `<TouchUserInput>`. Inherits from `IPair<TouchUserInput>`.
---
## `TouchUserInputReference`
Reference of type `TouchUserInput`. Inherits from `EquatableAtomReference<TouchUserInput, TouchUserInputPair, TouchUserInputConstant, TouchUserInputVariable, TouchUserInputEvent, TouchUserInputPairEvent, TouchUserInputTouchUserInputFunction, TouchUserInputVariableInstancer, AtomCollection, AtomList>`.
---
## `SyncTouchUserInputVariableInstancerToCollection`
Adds Variable Instancer's Variable of type TouchUserInput to a Collection or List on OnEnable and removes it on OnDestroy.
---
## `TouchUserInput`
Module class holding data for touch user input.
### Variables
#### `InputState`
Current input state.
---
#### `InputPos`
Current input position.
---
#### `InputPosLastFrame`
Input position last frame.
---
#### `InputPosLastDown`
Input position last time the user pressed down.
### Properties
#### `InputWorldPos`
The input position in world space.
---
#### `InputWorldPosLastFrame`
The input position in world space from last frame.
---
#### `InputWorldPosLastDown`
Input position last time the user pressed down in world space.
### Methods
#### `#ctor(UnityAtoms.Mobile.TouchUserInput.State,UnityEngine.Vector2,UnityEngine.Vector2,UnityEngine.Vector2)`
Create a `TouchUserInput` class.
##### Parameters
- `inputState` - Initial input state.
- `inputPos` - Initial input position.
- `inputPosLastFrame` - Initial input position last frame.
- `inputPosLastDown` - Initial input position last time the user pressed down.
---
#### `Equals(UnityAtoms.Mobile.TouchUserInput)`
Determine if 2 `TouchUserInput` are equal.
##### Parameters
- `other` - The other `TouchUserInput` to compare with.
##### Returns
`true` if equal, otherwise `false`.
---
#### `Equals(System.Object)`
Determine if 2 `TouchUserInput` are equal comparing against another `object`.
##### Parameters
- `obj` - The other `object` to compare with.
##### Returns
`true` if equal, otherwise `false`.
---
#### `GetHashCode`
`GetHashCode()` in order to implement `IEquatable<TouchUserInput>`
##### Returns
An unique hashcode for the current value.
---
#### `op_Equality(UnityAtoms.Mobile.TouchUserInput,UnityAtoms.Mobile.TouchUserInput)`
Equality operator
##### Parameters
- `touch1` - First `TouchUserInput`.
- `touch2` - Other `TouchUserInput`.
##### Returns
`true` if equal, otherwise `false`.
---
#### `op_Inequality(UnityAtoms.Mobile.TouchUserInput,UnityAtoms.Mobile.TouchUserInput)`
Inequality operator
##### Parameters
- `touch1` - First `TouchUserInput`.
- `touch2` - Other `TouchUserInput`.
##### Returns
`true` if they are not equal, otherwise `false`.
---
## `TouchUserInput.State`
Enum for different touch user input states.
---
## `TouchUserInputPairUnityEvent`
None generic Unity Event of type `TouchUserInputPair`. Inherits from `UnityEvent<TouchUserInputPair>`.
---
## `TouchUserInputTouchUserInputUnityEvent`
None generic Unity Event x 2 of type `TouchUserInput`. Inherits from `UnityEvent<TouchUserInput, TouchUserInput>`.
---
## `TouchUserInputUnityEvent`
None generic Unity Event of type `TouchUserInput`. Inherits from `UnityEvent<TouchUserInput>`.
---
## `TouchUserInputValueList`
Value List of type `TouchUserInput`. Inherits from `AtomValueList<TouchUserInput, TouchUserInputEvent>`.
---
## `TouchUserInputVariableInstancer`
Variable Instancer of type `TouchUserInput`. Inherits from `AtomVariableInstancer<TouchUserInputVariable, TouchUserInputPair, TouchUserInput, TouchUserInputEvent, TouchUserInputPairEvent, TouchUserInputTouchUserInputFunction>`.
---
## `TouchUserInputVariable`
Variable of type `TouchUserInput`. Inherits from `EquatableAtomVariable<TouchUserInput, TouchUserInputPair, TouchUserInputEvent, TouchUserInputPairEvent, TouchUserInputTouchUserInputFunction>`.
---

View File

@ -1,200 +0,0 @@
---
id: unityatoms.monohooks.editor
title: UnityAtoms.MonoHooks.Editor
hide_title: true
sidebar_label: UnityAtoms.MonoHooks.Editor
---
# Namespace - `UnityAtoms.MonoHooks.Editor`
## `Collider2DGameObjectConstantDrawer`
Constant property drawer of type `Collider2DGameObject`. Inherits from `AtomDrawer<Collider2DGameObjectConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderGameObjectConstantDrawer`
Constant property drawer of type `ColliderGameObject`. Inherits from `AtomDrawer<ColliderGameObjectConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DGameObjectConstantDrawer`
Constant property drawer of type `Collision2DGameObject`. Inherits from `AtomDrawer<Collision2DGameObjectConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionGameObjectConstantDrawer`
Constant property drawer of type `CollisionGameObject`. Inherits from `AtomDrawer<CollisionGameObjectConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DGameObjectEventDrawer`
Event property drawer of type `Collider2DGameObject`. Inherits from `AtomDrawer<Collider2DGameObjectEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DGameObjectPairEventDrawer`
Event property drawer of type `Collider2DGameObjectPair`. Inherits from `AtomDrawer<Collider2DGameObjectPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderGameObjectEventDrawer`
Event property drawer of type `ColliderGameObject`. Inherits from `AtomDrawer<ColliderGameObjectEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderGameObjectPairEventDrawer`
Event property drawer of type `ColliderGameObjectPair`. Inherits from `AtomDrawer<ColliderGameObjectPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DGameObjectEventDrawer`
Event property drawer of type `Collision2DGameObject`. Inherits from `AtomDrawer<Collision2DGameObjectEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DGameObjectPairEventDrawer`
Event property drawer of type `Collision2DGameObjectPair`. Inherits from `AtomDrawer<Collision2DGameObjectPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionGameObjectEventDrawer`
Event property drawer of type `CollisionGameObject`. Inherits from `AtomDrawer<CollisionGameObjectEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionGameObjectPairEventDrawer`
Event property drawer of type `CollisionGameObjectPair`. Inherits from `AtomDrawer<CollisionGameObjectPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DGameObjectValueListDrawer`
Value List property drawer of type `Collider2DGameObject`. Inherits from `AtomDrawer<Collider2DGameObjectValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderGameObjectValueListDrawer`
Value List property drawer of type `ColliderGameObject`. Inherits from `AtomDrawer<ColliderGameObjectValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DGameObjectValueListDrawer`
Value List property drawer of type `Collision2DGameObject`. Inherits from `AtomDrawer<Collision2DGameObjectValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionGameObjectValueListDrawer`
Value List property drawer of type `CollisionGameObject`. Inherits from `AtomDrawer<CollisionGameObjectValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DGameObjectVariableDrawer`
Variable property drawer of type `Collider2DGameObject`. Inherits from `AtomDrawer<Collider2DGameObjectVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderGameObjectVariableDrawer`
Variable property drawer of type `ColliderGameObject`. Inherits from `AtomDrawer<ColliderGameObjectVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DGameObjectVariableDrawer`
Variable property drawer of type `Collision2DGameObject`. Inherits from `AtomDrawer<Collision2DGameObjectVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionGameObjectVariableDrawer`
Variable property drawer of type `CollisionGameObject`. Inherits from `AtomDrawer<CollisionGameObjectVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DGameObjectEventEditor`
Event property drawer of type `Collider2DGameObject`. Inherits from `AtomEventEditor<Collider2DGameObject, Collider2DGameObjectEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DGameObjectPairEventEditor`
Event property drawer of type `Collider2DGameObjectPair`. Inherits from `AtomEventEditor<Collider2DGameObjectPair, Collider2DGameObjectPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderGameObjectEventEditor`
Event property drawer of type `ColliderGameObject`. Inherits from `AtomEventEditor<ColliderGameObject, ColliderGameObjectEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `ColliderGameObjectPairEventEditor`
Event property drawer of type `ColliderGameObjectPair`. Inherits from `AtomEventEditor<ColliderGameObjectPair, ColliderGameObjectPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DGameObjectEventEditor`
Event property drawer of type `Collision2DGameObject`. Inherits from `AtomEventEditor<Collision2DGameObject, Collision2DGameObjectEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collision2DGameObjectPairEventEditor`
Event property drawer of type `Collision2DGameObjectPair`. Inherits from `AtomEventEditor<Collision2DGameObjectPair, Collision2DGameObjectPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionGameObjectEventEditor`
Event property drawer of type `CollisionGameObject`. Inherits from `AtomEventEditor<CollisionGameObject, CollisionGameObjectEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `CollisionGameObjectPairEventEditor`
Event property drawer of type `CollisionGameObjectPair`. Inherits from `AtomEventEditor<CollisionGameObjectPair, CollisionGameObjectPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `Collider2DGameObjectVariableEditor`
Variable Inspector of type `Collider2DGameObject`. Inherits from `AtomVariableEditor`
---
## `ColliderGameObjectVariableEditor`
Variable Inspector of type `ColliderGameObject`. Inherits from `AtomVariableEditor`
---
## `Collision2DGameObjectVariableEditor`
Variable Inspector of type `Collision2DGameObject`. Inherits from `AtomVariableEditor`
---
## `CollisionGameObjectVariableEditor`
Variable Inspector of type `CollisionGameObject`. Inherits from `AtomVariableEditor`
---

View File

@ -1,788 +0,0 @@
---
id: unityatoms.monohooks
title: UnityAtoms.MonoHooks
hide_title: true
sidebar_label: UnityAtoms.MonoHooks
---
# Namespace - `UnityAtoms.MonoHooks`
## `Collider2DGameObjectAction`
Action of type `Collider2DGameObject`. Inherits from `AtomAction<Collider2DGameObject>`.
---
## `Collider2DGameObjectPairAction`
Action of type `Collider2DGameObjectPair`. Inherits from `AtomAction<Collider2DGameObjectPair>`.
---
## `ColliderGameObjectAction`
Action of type `ColliderGameObject`. Inherits from `AtomAction<ColliderGameObject>`.
---
## `ColliderGameObjectPairAction`
Action of type `ColliderGameObjectPair`. Inherits from `AtomAction<ColliderGameObjectPair>`.
---
## `Collision2DGameObjectAction`
Action of type `Collision2DGameObject`. Inherits from `AtomAction<Collision2DGameObject>`.
---
## `Collision2DGameObjectPairAction`
Action of type `Collision2DGameObjectPair`. Inherits from `AtomAction<Collision2DGameObjectPair>`.
---
## `CollisionGameObjectAction`
Action of type `CollisionGameObject`. Inherits from `AtomAction<CollisionGameObject>`.
---
## `CollisionGameObjectPairAction`
Action of type `CollisionGameObjectPair`. Inherits from `AtomAction<CollisionGameObjectPair>`.
---
## `SetCollider2DGameObjectVariableValue`
Set variable value Action of type `Collider2DGameObject`. Inherits from `SetVariableValue<Collider2DGameObject, Collider2DGameObjectPair, Collider2DGameObjectVariable, Collider2DGameObjectConstant, Collider2DGameObjectReference, Collider2DGameObjectEvent, Collider2DGameObjectPairEvent, Collider2DGameObjectVariableInstancer>`.
---
## `SetColliderGameObjectVariableValue`
Set variable value Action of type `ColliderGameObject`. Inherits from `SetVariableValue<ColliderGameObject, ColliderGameObjectPair, ColliderGameObjectVariable, ColliderGameObjectConstant, ColliderGameObjectReference, ColliderGameObjectEvent, ColliderGameObjectPairEvent, ColliderGameObjectVariableInstancer>`.
---
## `SetCollision2DGameObjectVariableValue`
Set variable value Action of type `Collision2DGameObject`. Inherits from `SetVariableValue<Collision2DGameObject, Collision2DGameObjectPair, Collision2DGameObjectVariable, Collision2DGameObjectConstant, Collision2DGameObjectReference, Collision2DGameObjectEvent, Collision2DGameObjectPairEvent, Collision2DGameObjectVariableInstancer>`.
---
## `SetCollisionGameObjectVariableValue`
Set variable value Action of type `CollisionGameObject`. Inherits from `SetVariableValue<CollisionGameObject, CollisionGameObjectPair, CollisionGameObjectVariable, CollisionGameObjectConstant, CollisionGameObjectReference, CollisionGameObjectEvent, CollisionGameObjectPairEvent, CollisionGameObjectVariableInstancer>`.
---
## `Collider2DGameObjectCondition`
Condition of type `Collider2DGameObject`. Inherits from `AtomCondition<Collider2DGameObject>`.
---
## `ColliderGameObjectCondition`
Condition of type `ColliderGameObject`. Inherits from `AtomCondition<ColliderGameObject>`.
---
## `Collision2DGameObjectCondition`
Condition of type `Collision2DGameObject`. Inherits from `AtomCondition<Collision2DGameObject>`.
---
## `CollisionGameObjectCondition`
Condition of type `CollisionGameObject`. Inherits from `AtomCondition<CollisionGameObject>`.
---
## `Collider2DGameObjectConstant`
Constant of type `Collider2DGameObject`. Inherits from `AtomBaseVariable<Collider2DGameObject>`.
---
## `ColliderGameObjectConstant`
Constant of type `ColliderGameObject`. Inherits from `AtomBaseVariable<ColliderGameObject>`.
---
## `Collision2DGameObjectConstant`
Constant of type `Collision2DGameObject`. Inherits from `AtomBaseVariable<Collision2DGameObject>`.
---
## `CollisionGameObjectConstant`
Constant of type `CollisionGameObject`. Inherits from `AtomBaseVariable<CollisionGameObject>`.
---
## `Collider2DGameObjectEventInstancer`
Event Instancer of type `Collider2DGameObject`. Inherits from `AtomEventInstancer<Collider2DGameObject, Collider2DGameObjectEvent>`.
---
## `Collider2DGameObjectPairEventInstancer`
Event Instancer of type `Collider2DGameObjectPair`. Inherits from `AtomEventInstancer<Collider2DGameObjectPair, Collider2DGameObjectPairEvent>`.
---
## `ColliderGameObjectEventInstancer`
Event Instancer of type `ColliderGameObject`. Inherits from `AtomEventInstancer<ColliderGameObject, ColliderGameObjectEvent>`.
---
## `ColliderGameObjectPairEventInstancer`
Event Instancer of type `ColliderGameObjectPair`. Inherits from `AtomEventInstancer<ColliderGameObjectPair, ColliderGameObjectPairEvent>`.
---
## `Collision2DGameObjectEventInstancer`
Event Instancer of type `Collision2DGameObject`. Inherits from `AtomEventInstancer<Collision2DGameObject, Collision2DGameObjectEvent>`.
---
## `Collision2DGameObjectPairEventInstancer`
Event Instancer of type `Collision2DGameObjectPair`. Inherits from `AtomEventInstancer<Collision2DGameObjectPair, Collision2DGameObjectPairEvent>`.
---
## `CollisionGameObjectEventInstancer`
Event Instancer of type `CollisionGameObject`. Inherits from `AtomEventInstancer<CollisionGameObject, CollisionGameObjectEvent>`.
---
## `CollisionGameObjectPairEventInstancer`
Event Instancer of type `CollisionGameObjectPair`. Inherits from `AtomEventInstancer<CollisionGameObjectPair, CollisionGameObjectPairEvent>`.
---
## `Collider2DGameObjectEventReferenceListener`
Event Reference Listener of type `Collider2DGameObject`. Inherits from `AtomEventReferenceListener<Collider2DGameObject, Collider2DGameObjectEvent, Collider2DGameObjectEventReference, Collider2DGameObjectUnityEvent>`.
---
## `Collider2DGameObjectPairEventReferenceListener`
Event Reference Listener of type `Collider2DGameObjectPair`. Inherits from `AtomEventReferenceListener<Collider2DGameObjectPair, Collider2DGameObjectPairEvent, Collider2DGameObjectPairEventReference, Collider2DGameObjectPairUnityEvent>`.
---
## `ColliderGameObjectEventReferenceListener`
Event Reference Listener of type `ColliderGameObject`. Inherits from `AtomEventReferenceListener<ColliderGameObject, ColliderGameObjectEvent, ColliderGameObjectEventReference, ColliderGameObjectUnityEvent>`.
---
## `ColliderGameObjectPairEventReferenceListener`
Event Reference Listener of type `ColliderGameObjectPair`. Inherits from `AtomEventReferenceListener<ColliderGameObjectPair, ColliderGameObjectPairEvent, ColliderGameObjectPairEventReference, ColliderGameObjectPairUnityEvent>`.
---
## `Collision2DGameObjectEventReferenceListener`
Event Reference Listener of type `Collision2DGameObject`. Inherits from `AtomEventReferenceListener<Collision2DGameObject, Collision2DGameObjectEvent, Collision2DGameObjectEventReference, Collision2DGameObjectUnityEvent>`.
---
## `Collision2DGameObjectPairEventReferenceListener`
Event Reference Listener of type `Collision2DGameObjectPair`. Inherits from `AtomEventReferenceListener<Collision2DGameObjectPair, Collision2DGameObjectPairEvent, Collision2DGameObjectPairEventReference, Collision2DGameObjectPairUnityEvent>`.
---
## `CollisionGameObjectEventReferenceListener`
Event Reference Listener of type `CollisionGameObject`. Inherits from `AtomEventReferenceListener<CollisionGameObject, CollisionGameObjectEvent, CollisionGameObjectEventReference, CollisionGameObjectUnityEvent>`.
---
## `CollisionGameObjectPairEventReferenceListener`
Event Reference Listener of type `CollisionGameObjectPair`. Inherits from `AtomEventReferenceListener<CollisionGameObjectPair, CollisionGameObjectPairEvent, CollisionGameObjectPairEventReference, CollisionGameObjectPairUnityEvent>`.
---
## `Collider2DGameObjectEventReference`
Event Reference of type `Collider2DGameObject`. Inherits from `AtomEventReference<Collider2DGameObject, Collider2DGameObjectVariable, Collider2DGameObjectEvent, Collider2DGameObjectVariableInstancer, Collider2DGameObjectEventInstancer>`.
---
## `Collider2DGameObjectPairEventReference`
Event Reference of type `Collider2DGameObjectPair`. Inherits from `AtomEventReference<Collider2DGameObjectPair, Collider2DGameObjectVariable, Collider2DGameObjectPairEvent, Collider2DGameObjectVariableInstancer, Collider2DGameObjectPairEventInstancer>`.
---
## `ColliderGameObjectEventReference`
Event Reference of type `ColliderGameObject`. Inherits from `AtomEventReference<ColliderGameObject, ColliderGameObjectVariable, ColliderGameObjectEvent, ColliderGameObjectVariableInstancer, ColliderGameObjectEventInstancer>`.
---
## `ColliderGameObjectPairEventReference`
Event Reference of type `ColliderGameObjectPair`. Inherits from `AtomEventReference<ColliderGameObjectPair, ColliderGameObjectVariable, ColliderGameObjectPairEvent, ColliderGameObjectVariableInstancer, ColliderGameObjectPairEventInstancer>`.
---
## `Collision2DGameObjectEventReference`
Event Reference of type `Collision2DGameObject`. Inherits from `AtomEventReference<Collision2DGameObject, Collision2DGameObjectVariable, Collision2DGameObjectEvent, Collision2DGameObjectVariableInstancer, Collision2DGameObjectEventInstancer>`.
---
## `Collision2DGameObjectPairEventReference`
Event Reference of type `Collision2DGameObjectPair`. Inherits from `AtomEventReference<Collision2DGameObjectPair, Collision2DGameObjectVariable, Collision2DGameObjectPairEvent, Collision2DGameObjectVariableInstancer, Collision2DGameObjectPairEventInstancer>`.
---
## `CollisionGameObjectEventReference`
Event Reference of type `CollisionGameObject`. Inherits from `AtomEventReference<CollisionGameObject, CollisionGameObjectVariable, CollisionGameObjectEvent, CollisionGameObjectVariableInstancer, CollisionGameObjectEventInstancer>`.
---
## `CollisionGameObjectPairEventReference`
Event Reference of type `CollisionGameObjectPair`. Inherits from `AtomEventReference<CollisionGameObjectPair, CollisionGameObjectVariable, CollisionGameObjectPairEvent, CollisionGameObjectVariableInstancer, CollisionGameObjectPairEventInstancer>`.
---
## `Collider2DGameObjectEvent`
Event of type `Collider2DGameObject`. Inherits from `AtomEvent<Collider2DGameObject>`.
---
## `Collider2DGameObjectPairEvent`
Event of type `Collider2DGameObjectPair`. Inherits from `AtomEvent<Collider2DGameObjectPair>`.
---
## `ColliderGameObjectEvent`
Event of type `ColliderGameObject`. Inherits from `AtomEvent<ColliderGameObject>`.
---
## `ColliderGameObjectPairEvent`
Event of type `ColliderGameObjectPair`. Inherits from `AtomEvent<ColliderGameObjectPair>`.
---
## `Collision2DGameObjectEvent`
Event of type `Collision2DGameObject`. Inherits from `AtomEvent<Collision2DGameObject>`.
---
## `Collision2DGameObjectPairEvent`
Event of type `Collision2DGameObjectPair`. Inherits from `AtomEvent<Collision2DGameObjectPair>`.
---
## `CollisionGameObjectEvent`
Event of type `CollisionGameObject`. Inherits from `AtomEvent<CollisionGameObject>`.
---
## `CollisionGameObjectPairEvent`
Event of type `CollisionGameObjectPair`. Inherits from `AtomEvent<CollisionGameObjectPair>`.
---
## `Collider2DGameObjectCollider2DGameObjectFunction`
Function x 2 of type `Collider2DGameObject`. Inherits from `AtomFunction<Collider2DGameObject, Collider2DGameObject>`.
---
## `ColliderGameObjectColliderGameObjectFunction`
Function x 2 of type `ColliderGameObject`. Inherits from `AtomFunction<ColliderGameObject, ColliderGameObject>`.
---
## `Collision2DGameObjectCollision2DGameObjectFunction`
Function x 2 of type `Collision2DGameObject`. Inherits from `AtomFunction<Collision2DGameObject, Collision2DGameObject>`.
---
## `CollisionGameObjectCollisionGameObjectFunction`
Function x 2 of type `CollisionGameObject`. Inherits from `AtomFunction<CollisionGameObject, CollisionGameObject>`.
---
## `Collider2DHook`
Base class for all `MonoHook`s of type `Collider2D`.
### Properties
#### `EventWithGameObject`
Event including a GameObject reference.
---
## `ColliderHook`
Base class for all `MonoHook`s of type `Collider`.
### Properties
#### `EventWithGameObject`
Event including a GameObject reference.
---
## `Collision2DHook`
Base class for all `MonoHook`s of type `Collision2D`.
### Properties
#### `EventWithGameObject`
Event including a GameObject reference.
---
## `CollisionHook`
Base class for all `MonoHook`s of type `Collision`.
### Properties
#### `EventWithGameObject`
Event including a GameObject reference.
---
## `MonoHook<E,EV,F>`
#### Type Parameters
- `E` - Event of type `AtomEvent<EV>`
- `EV` - Event value type
- `F` - Function type `AtomFunction<GameObject, GameObject>`
Generic base class for all Mono Hooks.
### Variables
#### `_selectGameObjectReference`
Selector function for the Event `EventWithGameObjectReference`. Makes it possible to for example select the parent GameObject and pass that a long to the `EventWithGameObjectReference`.
### Properties
#### `Event`
The Event
---
## `OnAwakeHook`
Mono Hook for [`Awake`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.Awake.html).
### Variables
#### `_listener`
Listener
---
#### `_gameObjectListener`
Listener with GameObject reference
---
## `OnButtonClickHook`
Mono Hook for On Button Click
---
## `OnCollision2DHook`
Mono Hook for [`OnCollisionEnter2D`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnCollisionEnter2D.html), [`OnCollisionExit2D`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnCollisionExit2D.html) and [`OnCollisionStay2D`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnCollisionStay2D.html)
### Variables
#### `_collisionOnEnter`
Set to true if Event should be triggered on `OnCollisionEnter2D`
---
#### `_collisionOnExit`
Set to true if Event should be triggered on `OnCollisionExit2D`
---
#### `_collisionOnStay`
Set to true if Event should be triggered on `OnCollisionStay2D`
---
## `OnCollisionHook`
Mono Hook for [`OnCollisionEnter`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnCollisionEnter.html), [`OnCollisionExit`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnCollisionExit.html) and [`OnCollisionStay`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnCollisionStay.html)
### Variables
#### `_collisionOnEnter`
Set to true if Event should be triggered on `OnCollisionEnter`
---
#### `_collisionOnExit`
Set to true if Event should be triggered on `OnCollisionExit`
---
#### `_collisionOnStay`
Set to true if Event should be triggered on `OnCollisionStay`
---
## `OnDestroyHook`
Mono Hook for [`OnDestroy`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnDestroy.html)
---
## `OnFixedUpdateHook`
Mono Hook for [`FixedUpdate`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.FixedUpdate.html)
---
## `OnLateUpdateHook`
Mono Hook for [`LateUpdate`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.LateUpdate.html)
---
## `OnPointerDownHook`
Mono Hook for `OnPointerDown`
---
## `OnStartHook`
Mono Hook for [`Start`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.Start.html)
---
## `OnTrigger2DHook`
Mono Hook for [`OnTriggerEnter2D`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerEnter2D.html), [`OnTriggerExit2D`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerExit2D.html) and [`OnTriggerStay2D`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerStay2D.html)
### Variables
#### `_triggerOnEnter`
Set to true if Event should be triggered on `OnTriggerEnter2D`
---
#### `_triggerOnExit`
Set to true if Event should be triggered on `OnTriggerExit2D`
---
#### `_triggerOnStay`
Set to true if Event should be triggered on `OnTriggerStay2D`
---
## `OnTriggerHook`
Mono Hook for [`OnTriggerEnter`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerEnter.html), [`OnTriggerExit`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerExit.html) and [`OnTriggerStay`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerStay.html)
### Variables
#### `_triggerOnEnter`
Set to true if Event should be triggered on `OnTriggerEnter`
---
#### `_triggerOnExit`
Set to true if Event should be triggered on `OnTriggerExit`
---
#### `_triggerOnStay`
Set to true if Event should be triggered on `OnTriggerStay`
---
## `OnUpdateHook`
Mono Hook for [`Update`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.Update.html)
---
## `VoidHook`
Base class for all `MonoHook`s of type `AtomEventBase`.
### Variables
#### `_event`
The Event
---
#### `_eventWithGameObjectReference`
Event including a GameObject reference.
---
#### `_selectGameObjectReference`
Selector function for the Event `EventWithGameObjectReference`. Makes it possible to for example select the parent GameObject and pass that a long to the `EventWithGameObjectReference`.
---
## `Collider2DGameObjectPair`
IPair of type `<Collider2DGameObject>`. Inherits from `IPair<Collider2DGameObject>`.
---
## `ColliderGameObjectPair`
IPair of type `<ColliderGameObject>`. Inherits from `IPair<ColliderGameObject>`.
---
## `Collision2DGameObjectPair`
IPair of type `<Collision2DGameObject>`. Inherits from `IPair<Collision2DGameObject>`.
---
## `CollisionGameObjectPair`
IPair of type `<CollisionGameObject>`. Inherits from `IPair<CollisionGameObject>`.
---
## `Collider2DGameObjectReference`
Reference of type `Collider2DGameObject`. Inherits from `EquatableAtomReference<Collider2DGameObject, Collider2DGameObjectPair, Collider2DGameObjectConstant, Collider2DGameObjectVariable, Collider2DGameObjectEvent, Collider2DGameObjectPairEvent, Collider2DGameObjectCollider2DGameObjectFunction, Collider2DGameObjectVariableInstancer, AtomCollection, AtomList>`.
---
## `ColliderGameObjectReference`
Reference of type `ColliderGameObject`. Inherits from `EquatableAtomReference<ColliderGameObject, ColliderGameObjectPair, ColliderGameObjectConstant, ColliderGameObjectVariable, ColliderGameObjectEvent, ColliderGameObjectPairEvent, ColliderGameObjectColliderGameObjectFunction, ColliderGameObjectVariableInstancer, AtomCollection, AtomList>`.
---
## `Collision2DGameObjectReference`
Reference of type `Collision2DGameObject`. Inherits from `EquatableAtomReference<Collision2DGameObject, Collision2DGameObjectPair, Collision2DGameObjectConstant, Collision2DGameObjectVariable, Collision2DGameObjectEvent, Collision2DGameObjectPairEvent, Collision2DGameObjectCollision2DGameObjectFunction, Collision2DGameObjectVariableInstancer, AtomCollection, AtomList>`.
---
## `CollisionGameObjectReference`
Reference of type `CollisionGameObject`. Inherits from `EquatableAtomReference<CollisionGameObject, CollisionGameObjectPair, CollisionGameObjectConstant, CollisionGameObjectVariable, CollisionGameObjectEvent, CollisionGameObjectPairEvent, CollisionGameObjectCollisionGameObjectFunction, CollisionGameObjectVariableInstancer, AtomCollection, AtomList>`.
---
## `SyncCollider2DGameObjectVariableInstancerToCollection`
Adds Variable Instancer's Variable of type Collider2DGameObject to a Collection or List on OnEnable and removes it on OnDestroy.
---
## `SyncColliderGameObjectVariableInstancerToCollection`
Adds Variable Instancer's Variable of type ColliderGameObject to a Collection or List on OnEnable and removes it on OnDestroy.
---
## `SyncCollision2DGameObjectVariableInstancerToCollection`
Adds Variable Instancer's Variable of type Collision2DGameObject to a Collection or List on OnEnable and removes it on OnDestroy.
---
## `SyncCollisionGameObjectVariableInstancerToCollection`
Adds Variable Instancer's Variable of type CollisionGameObject to a Collection or List on OnEnable and removes it on OnDestroy.
---
## `Collider2DGameObjectPairUnityEvent`
None generic Unity Event of type `Collider2DGameObjectPair`. Inherits from `UnityEvent<Collider2DGameObjectPair>`.
---
## `Collider2DGameObjectUnityEvent`
None generic Unity Event of type `Collider2DGameObject`. Inherits from `UnityEvent<Collider2DGameObject>`.
---
## `ColliderGameObjectPairUnityEvent`
None generic Unity Event of type `ColliderGameObjectPair`. Inherits from `UnityEvent<ColliderGameObjectPair>`.
---
## `ColliderGameObjectUnityEvent`
None generic Unity Event of type `ColliderGameObject`. Inherits from `UnityEvent<ColliderGameObject>`.
---
## `Collision2DGameObjectPairUnityEvent`
None generic Unity Event of type `Collision2DGameObjectPair`. Inherits from `UnityEvent<Collision2DGameObjectPair>`.
---
## `Collision2DGameObjectUnityEvent`
None generic Unity Event of type `Collision2DGameObject`. Inherits from `UnityEvent<Collision2DGameObject>`.
---
## `CollisionGameObjectPairUnityEvent`
None generic Unity Event of type `CollisionGameObjectPair`. Inherits from `UnityEvent<CollisionGameObjectPair>`.
---
## `CollisionGameObjectUnityEvent`
None generic Unity Event of type `CollisionGameObject`. Inherits from `UnityEvent<CollisionGameObject>`.
---
## `Collider2DGameObjectValueList`
Value List of type `Collider2DGameObject`. Inherits from `AtomValueList<Collider2DGameObject, Collider2DGameObjectEvent>`.
---
## `ColliderGameObjectValueList`
Value List of type `ColliderGameObject`. Inherits from `AtomValueList<ColliderGameObject, ColliderGameObjectEvent>`.
---
## `Collision2DGameObjectValueList`
Value List of type `Collision2DGameObject`. Inherits from `AtomValueList<Collision2DGameObject, Collision2DGameObjectEvent>`.
---
## `CollisionGameObjectValueList`
Value List of type `CollisionGameObject`. Inherits from `AtomValueList<CollisionGameObject, CollisionGameObjectEvent>`.
---
## `Collider2DGameObjectVariableInstancer`
Variable Instancer of type `Collider2DGameObject`. Inherits from `AtomVariableInstancer<Collider2DGameObjectVariable, Collider2DGameObjectPair, Collider2DGameObject, Collider2DGameObjectEvent, Collider2DGameObjectPairEvent, Collider2DGameObjectCollider2DGameObjectFunction>`.
---
## `ColliderGameObjectVariableInstancer`
Variable Instancer of type `ColliderGameObject`. Inherits from `AtomVariableInstancer<ColliderGameObjectVariable, ColliderGameObjectPair, ColliderGameObject, ColliderGameObjectEvent, ColliderGameObjectPairEvent, ColliderGameObjectColliderGameObjectFunction>`.
---
## `Collision2DGameObjectVariableInstancer`
Variable Instancer of type `Collision2DGameObject`. Inherits from `AtomVariableInstancer<Collision2DGameObjectVariable, Collision2DGameObjectPair, Collision2DGameObject, Collision2DGameObjectEvent, Collision2DGameObjectPairEvent, Collision2DGameObjectCollision2DGameObjectFunction>`.
---
## `CollisionGameObjectVariableInstancer`
Variable Instancer of type `CollisionGameObject`. Inherits from `AtomVariableInstancer<CollisionGameObjectVariable, CollisionGameObjectPair, CollisionGameObject, CollisionGameObjectEvent, CollisionGameObjectPairEvent, CollisionGameObjectCollisionGameObjectFunction>`.
---
## `Collider2DGameObjectVariable`
Variable of type `Collider2DGameObject`. Inherits from `EquatableAtomVariable<Collider2DGameObject, Collider2DGameObjectPair, Collider2DGameObjectEvent, Collider2DGameObjectPairEvent, Collider2DGameObjectCollider2DGameObjectFunction>`.
---
## `ColliderGameObjectVariable`
Variable of type `ColliderGameObject`. Inherits from `EquatableAtomVariable<ColliderGameObject, ColliderGameObjectPair, ColliderGameObjectEvent, ColliderGameObjectPairEvent, ColliderGameObjectColliderGameObjectFunction>`.
---
## `Collision2DGameObjectVariable`
Variable of type `Collision2DGameObject`. Inherits from `EquatableAtomVariable<Collision2DGameObject, Collision2DGameObjectPair, Collision2DGameObjectEvent, Collision2DGameObjectPairEvent, Collision2DGameObjectCollision2DGameObjectFunction>`.
---
## `CollisionGameObjectVariable`
Variable of type `CollisionGameObject`. Inherits from `EquatableAtomVariable<CollisionGameObject, CollisionGameObjectPair, CollisionGameObjectEvent, CollisionGameObjectPairEvent, CollisionGameObjectCollisionGameObjectFunction>`.
---

View File

@ -1,62 +0,0 @@
---
id: unityatoms.scenemgmt.editor
title: UnityAtoms.SceneMgmt.Editor
hide_title: true
sidebar_label: UnityAtoms.SceneMgmt.Editor
---
# Namespace - `UnityAtoms.SceneMgmt.Editor`
## `SceneFieldDrawer`
Customer property drawer for `SceneField`.
---
## `SceneFieldConstantDrawer`
Constant property drawer of type `SceneField`. Inherits from `AtomDrawer<SceneFieldConstant>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `SceneFieldEventDrawer`
Event property drawer of type `SceneField`. Inherits from `AtomDrawer<SceneFieldEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `SceneFieldPairEventDrawer`
Event property drawer of type `SceneFieldPair`. Inherits from `AtomDrawer<SceneFieldPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `SceneFieldValueListDrawer`
Value List property drawer of type `SceneField`. Inherits from `AtomDrawer<SceneFieldValueList>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `SceneFieldVariableDrawer`
Variable property drawer of type `SceneField`. Inherits from `AtomDrawer<SceneFieldVariable>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `SceneFieldEventEditor`
Event property drawer of type `SceneField`. Inherits from `AtomEventEditor<SceneField, SceneFieldEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `SceneFieldPairEventEditor`
Event property drawer of type `SceneFieldPair`. Inherits from `AtomEventEditor<SceneFieldPair, SceneFieldPairEvent>`. Only availble in `UNITY_2019_1_OR_NEWER`.
---
## `SceneFieldVariableEditor`
Variable Inspector of type `SceneField`. Inherits from `AtomVariableEditor`
---

View File

@ -1,298 +0,0 @@
---
id: unityatoms.scenemgmt
title: UnityAtoms.SceneMgmt
hide_title: true
sidebar_label: UnityAtoms.SceneMgmt
---
# Namespace - `UnityAtoms.SceneMgmt`
## `ChangeScene`
Action to change scene.
### Variables
#### `_sceneName`
Scene to change to.
### Methods
#### `Do`
Change the scene.
---
## `QuitApplication`
Action to quit the application.
### Methods
#### `Do`
Do quit the apllication.
---
## `SceneFieldAction`
Action of type `SceneField`. Inherits from `AtomAction<SceneField>`.
---
## `SceneFieldPairAction`
Action of type `SceneFieldPair`. Inherits from `AtomAction<SceneFieldPair>`.
---
## `SetSceneFieldVariableValue`
Set variable value Action of type `SceneField`. Inherits from `SetVariableValue<SceneField, SceneFieldPair, SceneFieldVariable, SceneFieldConstant, SceneFieldReference, SceneFieldEvent, SceneFieldPairEvent, SceneFieldVariableInstancer>`.
---
## `SceneFieldCondition`
Condition of type `SceneField`. Inherits from `AtomCondition<SceneField>`.
---
## `SceneFieldConstant`
Constant of type `SceneField`. Inherits from `AtomBaseVariable<SceneField>`.
---
## `SceneFieldEventInstancer`
Event Instancer of type `SceneField`. Inherits from `AtomEventInstancer<SceneField, SceneFieldEvent>`.
---
## `SceneFieldPairEventInstancer`
Event Instancer of type `SceneFieldPair`. Inherits from `AtomEventInstancer<SceneFieldPair, SceneFieldPairEvent>`.
---
## `SceneFieldEventReferenceListener`
Event Reference Listener of type `SceneField`. Inherits from `AtomEventReferenceListener<SceneField, SceneFieldEvent, SceneFieldEventReference, SceneFieldUnityEvent>`.
---
## `SceneFieldPairEventReferenceListener`
Event Reference Listener of type `SceneFieldPair`. Inherits from `AtomEventReferenceListener<SceneFieldPair, SceneFieldPairEvent, SceneFieldPairEventReference, SceneFieldPairUnityEvent>`.
---
## `SceneFieldEventReference`
Event Reference of type `SceneField`. Inherits from `AtomEventReference<SceneField, SceneFieldVariable, SceneFieldEvent, SceneFieldVariableInstancer, SceneFieldEventInstancer>`.
---
## `SceneFieldPairEventReference`
Event Reference of type `SceneFieldPair`. Inherits from `AtomEventReference<SceneFieldPair, SceneFieldVariable, SceneFieldPairEvent, SceneFieldVariableInstancer, SceneFieldPairEventInstancer>`.
---
## `SceneFieldEvent`
Event of type `SceneField`. Inherits from `AtomEvent<SceneField>`.
---
## `SceneFieldPairEvent`
Event of type `SceneFieldPair`. Inherits from `AtomEvent<SceneFieldPair>`.
---
## `SceneFieldSceneFieldFunction`
Function x 2 of type `SceneField`. Inherits from `AtomFunction<SceneField, SceneField>`.
---
## `SceneFieldPair`
IPair of type `<SceneField>`. Inherits from `IPair<SceneField>`.
---
## `SceneFieldReference`
Reference of type `SceneField`. Inherits from `EquatableAtomReference<SceneField, SceneFieldPair, SceneFieldConstant, SceneFieldVariable, SceneFieldEvent, SceneFieldPairEvent, SceneFieldSceneFieldFunction, SceneFieldVariableInstancer, AtomCollection, AtomList>`.
---
## `SyncSceneFieldVariableInstancerToCollection`
Adds Variable Instancer's Variable of type SceneField to a Collection or List on OnEnable and removes it on OnDestroy.
---
## `SceneField`
Struct to hold data about a scene.
### Variables
#### `_sceneAsset`
The scene asset.
---
#### `_sceneName`
Name of the scene.
---
#### `_scenePath`
Path to the scene asset.
---
#### `_buildIndex`
Build index.
### Properties
#### `SceneName`
Scene name as a property.
---
#### `ScenePath`
Scene path as a property.
---
#### `BuildIndex`
Build index as a property.
---
#### `SceneAsset`
Scene asset as a property.
### Methods
#### `Equals(UnityAtoms.SceneMgmt.SceneField)`
Checks for equality between 2 `SceneField`s.
##### Parameters
- `other` - The other `SceneFiled` to compare with.
##### Returns
`true` if they are equal, otherwise `false`.
---
#### `Equals(System.Object)`
Checks for equality using `object`s.
##### Parameters
- `other` - The other scene field as an `object` to compare with.
##### Returns
`true` if they are equal, otherwise `false`.
---
#### `GetHashCode`
Get an unique hash code for this `SceneField`.
##### Returns
An unique hash.
---
#### `op_Equality(UnityAtoms.SceneMgmt.SceneField,UnityAtoms.SceneMgmt.SceneField)`
Equal operator.
##### Parameters
- `sf1` - The first `SceneField` to compare.
- `sf2` - The second `SceneField` to compare.
##### Returns
`true` if eqaul, otherwise `false`.
---
#### `op_Inequality(UnityAtoms.SceneMgmt.SceneField,UnityAtoms.SceneMgmt.SceneField)`
None equality operator.
##### Parameters
- `sf1` - The first `SceneField` to compare.
- `sf2` - The second `SceneField` to compare.
##### Returns
`true` if not eqaul, otherwise `false`.
---
## `SceneFieldPairUnityEvent`
None generic Unity Event of type `SceneFieldPair`. Inherits from `UnityEvent<SceneFieldPair>`.
---
## `SceneFieldSceneFieldUnityEvent`
None generic Unity Event x 2 of type `SceneField`. Inherits from `UnityEvent<SceneField, SceneField>`.
---
## `SceneFieldUnityEvent`
None generic Unity Event of type `SceneField`. Inherits from `UnityEvent<SceneField>`.
---
## `SceneFieldValueList`
Value List of type `SceneField`. Inherits from `AtomValueList<SceneField, SceneFieldEvent>`.
---
## `SceneFieldVariableInstancer`
Variable Instancer of type `SceneField`. Inherits from `AtomVariableInstancer<SceneFieldVariable, SceneFieldPair, SceneField, SceneFieldEvent, SceneFieldPairEvent, SceneFieldSceneFieldFunction>`.
---
## `SceneFieldVariable`
Variable of type `SceneField`. Inherits from `EquatableAtomVariable<SceneField, SceneFieldPair, SceneFieldEvent, SceneFieldPairEvent, SceneFieldSceneFieldFunction>`.
---

View File

@ -1,251 +0,0 @@
---
id: unityatoms.tags
title: UnityAtoms.Tags
hide_title: true
sidebar_label: UnityAtoms.Tags
---
# Namespace - `UnityAtoms.Tags`
## `AtomTags`
A MonoBehaviour that adds tags the Unity Atoms way to a GameObject.
### Properties
#### `Tags`
Get the tags associated with this GameObject as `StringConstants` in a `ReadOnlyList<T>`.
### Methods
#### `HasTag(System.String)`
Check if the tag provided is associated with this `GameObject`.
##### Parameters
- `tag` - undefined
##### Returns
`true` if the tag exists, otherwise `false`.
---
#### `RemoveTag(System.String)`
Remove a tag from this `GameObject`.
##### Parameters
- `tag` - The tag to remove as a `string`
---
#### `FindByTag(System.String)`
Find first `GameObject` that has the tag provided.
##### Parameters
- `tag` - The tag that the `GameObject` that you search for will have.
##### Returns
The first `GameObject` with the provided tag found. If no `GameObject`is found, it returns `null`.
---
#### `FindAllByTag(System.String)`
Find all `GameObject`s that have the tag provided.
##### Parameters
- `tag` - The tag that the `GameObject`s that you search for will have.
##### Returns
An array of `GameObject`s with the provided tag. If not found it returns `null`.
---
#### `FindAllByTagNoAlloc(System.String,System.Collections.Generic.List{UnityEngine.GameObject})`
Find all `GameObject`s that have the tag provided. Mutates the output `List<GameObject>` and adds the `GameObject`s found to it.
##### Parameters
- `tag` - The tag that the `GameObject`s that you search for will have.
- `output` - A `List<GameObject>` that this method will clear and add the `GameObject`s found to.
---
#### `GetTagsForGameObject(UnityEngine.GameObject)`
A faster alternative to `gameObject.GetComponen<UATags>()`.
##### Returns
Returns the `UATags` component. Returns `null` if the `GameObject` does not have a `UATags` component or if the `GameObject` is disabled.
---
#### `GetTags(UnityEngine.GameObject)`
Retrieves all tags for a given `GameObject`. A faster alternative to `gameObject.GetComponen<UATags>().Tags`.
##### Parameters
- `go` - The `GameObject` to check for tags.
##### Returns
A `ReadOnlyList<T>` of tags stored as `StringContant`s. Returns `null` if the `GameObject` does not have any tags or if the `GameObject` is disabled.
---
## `GameObjectExtensions`
`GameObject` extensions related to tags in Unity Atoms.
### Methods
#### `GetTags(UnityEngine.GameObject)`
Retrieves all tags for a given `GameObject`. A faster alternative to `gameObject.GetComponen<UATags>().Tags`.
##### Parameters
- `go` - This `GameObject`
##### Returns
A `ReadOnlyList<T>` of tags stored as `StringContant`s. Returns `null` if the `GameObject` does not have any tags or if the `GameObject` is disabled.
---
#### `HasTag(UnityEngine.GameObject,System.String)`
Check if the tag provided is associated with this `GameObject`.
##### Parameters
- `go` - This `GameObject`
- `tag` - The tag to search for.
##### Returns
`true` if the tag exists, otherwise `false`.
---
#### `HasAnyTag(UnityEngine.GameObject,System.Collections.Generic.List{System.String})`
Check if any of the tags provided are associated with this `GameObject`.
##### Parameters
- `go` - This `GameObject`
- `tags` - The tags to search for.
##### Returns
`true` if any of the tags exist, otherwise `false`.
---
## `ReadOnlyList<T>`
#### Type Parameters
- `T` - The type of the list items.
This is an `IList` without everything that could mutate the it.
### Properties
#### `Count`
Get the number of elements contained in the `ReadOnlyList<T>`.
##### Examples
```cs
var readOnlyList = new ReadOnlyList<int>(new List<int>() { 1, 2, 3 });
Debug.Log(readOnlyList.Count); // Outputs: 3
```
---
#### `IsReadOnly`
Determines if the `ReadOnlyList<T>` is read only or not.
---
#### `Item(System.Int32)`
Get the element at the specified index.
### Methods
#### `#ctor(list)`
Creates a new class of the `ReadOnlyList<T>` class.
##### Parameters
- `list` - The `IList<T>` to initialize the `ReadOnlyList<T>` with.
---
#### `GetEnumerator`
Implements `GetEnumerator()` of `IEnumerable<T>`
##### Returns
The list's `IEnumerator<T>`.
---
#### `Contains(item)`
Determines whether an element is in the `ReadOnlyList<T>`.
##### Parameters
- `item` - The item to check if it exists in the `ReadOnlyList<T>`.
##### Returns
`true` if item is found in the `ReadOnlyList<T>`; otherwise, `false`.
---
#### `IndexOf(item)`
Searches for the specified object and returns the index of its first occurrence in a one-dimensional array.
##### Parameters
- `item` - The one-dimensional array to search.
##### Returns
The index of the first occurrence of value in array, if found; otherwise, the lower bound of the array minus 1.
---
#### `CopyTo(array,arrayIndex)`
Copies all the elements of the current one-dimensional array to the specified one-dimensional array starting at the specified destination array index. The index is specified as a 32-bit integer.
##### Parameters
- `array` - The one-dimensional array that is the destination of the elements copied from the current array.
- `arrayIndex` - A 32-bit integer that represents the index in array at which copying begins.
---

View File

@ -1,36 +0,0 @@
---
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
#### `_currentUIState`
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

@ -35,15 +35,15 @@ Add the following to your `manifest.json`:
],
"dependencies": {
...
"com.unity-atoms.unity-atoms-core": "4.4.5",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.5",
"com.unity-atoms.unity-atoms-fsm": "4.4.5",
"com.unity-atoms.unity-atoms-mobile": "4.4.5",
"com.unity-atoms.unity-atoms-mono-hooks": "4.4.5",
"com.unity-atoms.unity-atoms-tags": "4.4.5",
"com.unity-atoms.unity-atoms-scene-mgmt": "4.4.5",
"com.unity-atoms.unity-atoms-ui": "4.4.5",
"com.unity-atoms.unity-atoms-input-system": "4.4.5",
"com.unity-atoms.unity-atoms-core": "4.4.6",
"com.unity-atoms.unity-atoms-base-atoms": "4.4.6",
"com.unity-atoms.unity-atoms-fsm": "4.4.6",
"com.unity-atoms.unity-atoms-mobile": "4.4.6",
"com.unity-atoms.unity-atoms-mono-hooks": "4.4.6",
"com.unity-atoms.unity-atoms-tags": "4.4.6",
"com.unity-atoms.unity-atoms-scene-mgmt": "4.4.6",
"com.unity-atoms.unity-atoms-ui": "4.4.6",
"com.unity-atoms.unity-atoms-input-system": "4.4.6",
...
}
}
@ -101,4 +101,4 @@ To dive right in, create your first Atom using any of the available techniques m
## Learn more
Go to [Overview and philosopy](./overview.md) to learn more about Unity Atoms and how to tune in to the correct mindset when using them.
Go to [overview ](./overview.md) to learn more about Unity Atoms and how to tune in to the correct mindset when using them.

View File

@ -1,17 +1,17 @@
---
id: overview
title: Overview and philosopy
title: Overview
hide_title: true
sidebar_label: Overview and philosopy
sidebar_label: Overview
---
# Overview and philosopy
# Overview
This chapter outlines the theoretical concepts behind Unity Atoms. This knowledge helps you better understand a new way of thinking about data and state in your project.
This chapter provides an overview of the building blocks and concepts of Unity Atoms. This knowledge helps you better understand a new way of thinking about data and state in your project.
## Fundamentals
Unity Atoms is an event based system that encourages the game to be as data-driven as possible. The four most fundamental parts of Unity Atoms are:
Unity Atoms is an event based system that encourages the game to be as data-driven as possible. The five most fundamental building blocks of Unity Atoms are:
- Data
- Events
@ -119,4 +119,4 @@ A List is an array of Variables that is stored as a Scriptable Object. The Varia
### Collections
A collection is a set of Variables associated with a StringReference key and is stored as a Scriptable Object. The Variables stored in a Collection can be of different types.
A collection is a set of Variables associated with a StringReference key and is stored as a Scriptable Object. The Variables stored in a Collection can be of different types.

View File

@ -0,0 +1,31 @@
---
id: philosophy
title: Philosophy
hide_title: true
sidebar_label: Philosophy
---
# Philosophy
This page describes the foundation and philosophy of which Unity Atoms is built upon.
## ScriptableObject Architecture (SOA)
[ScriptableObject](https://docs.unity3d.com/Manual/class-ScriptableObject.html) Architecture (SOA) is a design pattern that aims to facilitate scalable, maintainable, and testable game development using Unity. This concept was popularized by [Ryan Hipple in his 2017 GDC talk](https://www.youtube.com/watch?v=raQ3iHhE_Kk) where he introduced the concept of ScriptableObjects as the glue that makes it possible to create modular and data-driven systems within Unity.
## Pillars of SOA
There are 3 main pillars of SOA:
- **Modular** - Systems in your game should not be directly depdendent on each other. Hard references between systems makes them less flexible and harder to reiterate on and reassemble. To make systems that are modular, it's a good rule to keep scenes as clean slates, meaning that we avoid `DontDestoryOnLoad` objects as much as possible. Furthermore, prefabs should as much as possible work on their own without any manager or other systems needed in the scene. Last but not least, Unity is a component based engine, create and use components that do one thing and one thing only.
- **Editable** - The systems you create should be data-driven, eg. take data as input and process that data. The input and output of those systems should be editable and this is achieved by utilizing Unity's inspector. This approach allows us to change the game without changing code. Writing editable and with modular systems also allows us to reassemble systems in different ways, which is a great way to iterate on new game mechanics. Lastly, being editable means that we can change stuff at runtime, which greatly reduces iteration times.
- **Debuggable** - If your systems are modular the easier they are to test in isolation. Furtermore, editable systems naturally provides debug views where you can see the data that is being processed.
## How SOA achieves its goals
- **Data** - Instead of hard coding data within our code, we externalize the data using ScriptableObjects. This allows for the separation of data and logic, making it easier to manage data and reuse it in different parts of the game.
- **Events** - We use ScriptableObjects as events. This allows us to broadcast data across different parts of our game without having to know who is listening.
## UnityAtoms: A SOA implementation
UnityAtoms offers a robust implementation of the SOA. It's an extension of the ScriptableObject system, with a focus on making it easier to create and manage ScriptableObject-based code. It provides Variables, Instancers, Collections, Events, Actions, and Conditions, among others, which can be combined to implement complex game logic. Furthermore, it provides additional features built on top of the SOA architecture like FSM, Tagging, Input System and more.
SOA and UnityAtoms is a great way to structure your Unity projects, providing a more maintainable, scalable, and testable codebase. The modular nature of this architecture allows for easy expansion of your game, ensuring that your codebase remains manageable as your game grows in complexity.

View File

@ -7,4 +7,4 @@ sidebar_label: Base Atoms
# Unity Atoms / Base Atoms
Base set of Atoms based on Unity Atoms Core. See the [API](../api/unityatoms.baseatoms) for more info.
Base set of Atoms based on Unity Atoms Core.

View File

@ -9,10 +9,6 @@ sidebar_label: FSM
Finite state machine implemented using Unity Atoms.
## API
Check out the [API](../api/unityatoms.fsm).
## What is it?
A finite state machine implementation for Unity Atoms. The package was inspired by [this](https://github.com/dubit/unity-fsm) open source Unity FSM repo. The FSM in Unity Atoms is actually derrived from `StringVariable`, so everything you can do with a `StringVariable` you can also do with a FSM.

View File

@ -8,5 +8,3 @@ sidebar_label: Input System
# Unity Atoms / Input System
Unity Atoms for Unity's Input System. Check out [this](https://www.youtube.com/watch?v=q7W8FyTIriQ&feature=youtu.be) video for an introduction to this sub package.
See the [API](../api/unityatoms.inputsystem) for more info.

View File

@ -7,4 +7,4 @@ sidebar_label: Mobile
# Unity Atoms / Mobile
Unity Atoms specific for mobile projects. See the [API](../api/unityatoms.mobile) for more info.
Unity Atoms specific for mobile projects.

View File

@ -7,4 +7,4 @@ sidebar_label: Mono Hooks
# Unity Atoms / Mono Hooks
Hook into Unity's lifecycle methods with Atom Events. See the [API](../api/unityatoms.monohooks) for more info.
Hook into Unity's lifecycle methods with Atom Events.

View File

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

View File

@ -7,4 +7,58 @@ sidebar_label: Tags
# Unity Atoms / Tags
A replacement to Unity´s tags based on Unity Atoms. See the [API](../api/unityatoms.tags) for more info.
A replacement to Unity's tags based on Unity Atoms.
The **Tags** subpackage of Unity Atoms is a powerful tool that enhances Unity's existing tag functionality by allowing for dynamic and scriptable tag operations.
## Using the Tags subpackage
### Adding and removing tags from a GameObject
To assign a tag to a GameObject, use the `AtomTags` component that comes with the AtomTags subpackage. The easiest way is to add the Tags in the Inspector, but it's also possible to add/remove tags at runtime using `StringConstants`:
Here's an example:
```
StringConstant myTag;
...
Tag tagComponent = gameObject.AddComponent<AtomTags>();
tagComponent.AddTag(myTag);
tagComponent.RemoveTag(myTag.Value);
```
### Get tags of an GameObjects
To see if a GameObject has a specific tag:
```
GameObject go;
...
go.HasTag("a");
```
or any tag within a list:
```
go.HasAnyTag(new List<string>() { "d", "f", "h", "j", "l" });
```
Or to get all the tags a gameobject has:
```
AtomTags.GetTagsForGameObject(go);
```
### Querying GameObjects by Tags
To find all GameObjects with a specific tag, use the `FindObjectsWithTag` method:
```
IEnumerable<GameObject> enemies = AtomTags.FindByTag("Enemy");
```
This will return all GameObjects with the tag "Enemy".
## Performance
The Tag packages is fine tuned to reduce heap allocations as much as possible. Some results are discussed [here](https://github.com/unity-atoms/unity-atoms/pull/12#issuecomment-470656166).

View File

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

View File

@ -11,6 +11,6 @@ There are several ways of creating Atoms in your project. The recommended way is
![creating-atoms](../assets/creating-atoms/atoms-creation.gif)
Another way to create Atoms is to select `Unity Atoms` in the context menu. The items are listed by category and by type. Custom Atom types created using the `Generator` (introduced by a later tutorial) also appear in this menu.
Another way to create Atoms is to select `Unity Atoms` in the context menu. The items are listed by category and by type. Custom Atom types created using the `Generator` also appear in this menu (see the dedicated [generator tutorial](./generator.md) for more info on the generator).
In the following tutorials this is simply referred to as "creating an Atom" using any of the above mentioned techniques.

View File

@ -0,0 +1,54 @@
---
id: variable-transformers
title: Variable Pre Change Transformers
hide_title: true
sidebar_label: Variable Pre Change Transformers
---
# Variable Pre Change Transformers
Variable pre change transformers provide a way to modify the value of a Variable before it gets changed. These are used to introduce customized logic into the process of updating the value of an Variable. For example, a pre change transformer could be used to limit a player's health within certain boundaries, such as ensuring that it never drops below zero.
In this tutorial, we'll look at how to use a pre change transformer in UnityAtoms.
## Step 1: Create a Pre Change Transformer
Firstly, we need to create a new class for our pre change transformer. Let's say we are going to create a transformer that ensures the health of our player never falls below 0.
Create a new C# script and name it `MinHealthTransformer`. This script should extend `IntIntFunction` and override the `Call` method:
```
using UnityAtoms.BaseAtoms;
[EditorIcon("atom-icon-sand")]
[CreateAssetMenu(menuName = "Unity Atoms/Functions/Transformers/MinHealth Int (int => int)", fileName = "MinHealth")]
public class MinHealthTransformer : IntIntFunction
{
public override int Call(int value)
{
if (value < 0)
return 0;
else
return value;
}
}
```
In the `Call` method, we're checking if the new value of health is less than 0. If so, we're returning 0 instead of the new value. This ensures the player's health never drops below 0.
## Step 2: Use the Pre Change Transformer
To use this transformer, we need to create a ScriptableObject of this type.
In the Unity Editor:
1. Right-click in the project window and choose `Create > UnityAtoms > Functions > Transformers > MinHealth Int (int => int)`.
2. Name the Object `MinHealthTransformer`.
3. In the inspector window, set the `Pre Change Transform` to be `MinHealthTransformer`.
Now, whenever the `PlayerHealth` value is changed, the `MinHealthTransformer`'s `PreChangeCheck` method will be called, ensuring the health never drops below 0.
## Notes
As the name suggests, pre change transformers are executed _before_ the change events are invoked.

View File

@ -7,7 +7,7 @@ sidebar_label: Variables
# Variables, Constants, and References
Below follows a step-by-step example of managing a player's health using Unity Atoms. If you haven't read the [Creating Atoms](./creating-atoms.md) and [Overview and philosopy](../introduction/overview.md) section you should do that before proceeding.
Below follows a step-by-step example of managing a player's health using Unity Atoms. If you haven't read the [Creating Atoms](./creating-atoms.md), [Philosophy](../introduction/philosophy.md) and [Overview](../introduction/overview.md) section you should do that before proceeding.
_NOTE: This tutorial is based on [this](https://medium.com/@adamramberg/unity-atoms-tiny-modular-pieces-utilizing-the-power-of-scriptable-objects-e8add1b95201) blog post. The blog post is based on a previous version of Unity Atoms and as such will vary in content and appearance. The ideas presented by the blog post still apply._

1084
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{
"name": "com.unity-atoms.unity-atoms",
"displayName": "Unity Atoms",
"version": "4.4.5",
"version": "4.4.6",
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
@ -26,9 +26,7 @@
"publish:tags": "npm publish ./Packages/Tags",
"publish:ui": "npm publish ./Packages/UI",
"publish:mono": "npm publish ./Packages/MonoHooks",
"publish:input": "npm publish ./Packages/InputSystem",
"generate:docs": "node scripts/generateDocs.js",
"generate:docs:verbose": "node scripts/generateDocs.js --verbose"
"publish:input": "npm publish ./Packages/InputSystem"
},
"files": [
"/LICENSE.md",
@ -39,10 +37,5 @@
"/package.json.meta",
"/Packages",
"/Packages.meta"
],
"devDependencies": {
"rimraf": "^3.0.0",
"xml2js": "^0.4.22",
"yargs": "^14.2.0"
}
]
}

View File

@ -1,404 +0,0 @@
const child_process = require("child_process");
const fs = require("fs");
const xml2js = require("xml2js");
const rimraf = require("rimraf");
const path = require("path");
const argv = require("yargs").argv;
const run = async () => {
// Extract dlls from all *.csproj
let dlls = [];
const parser = new xml2js.Parser();
const unityProjFolder = path.join(process.cwd(), "Examples");
const csprojPaths = fs
.readdirSync(unityProjFolder)
.filter((file) => file.endsWith(".csproj"))
.map((csproj) => path.join(process.cwd(), "Examples", csproj));
for (let i = 0; i < csprojPaths.length; ++i) {
const csprojFile = fs.readFileSync(csprojPaths[i]);
const csprojXml = await parser.parseStringPromise(csprojFile);
csprojXml.Project.ItemGroup.forEach((itemGroup) => {
if (itemGroup.Reference) {
itemGroup.Reference.forEach((ref) => {
const dllPath = `"${ref.HintPath}"`;
if (!dlls.includes(dllPath)) {
dlls.push(dllPath);
}
});
}
});
}
const assembliesFolder = path.join(
process.cwd(),
"Examples",
"Library",
"ScriptAssemblies"
);
const assemblies = fs
.readdirSync(assembliesFolder)
.filter((file) => file.endsWith(".dll"))
.map((csproj) => `"${path.join(assembliesFolder, csproj)}"`);
const dllsFromPackageCache = [];
const packageCacheFolder = path.join(
process.cwd(),
"Examples",
"Library",
"PackageCache"
);
const packageCache = fs.readdirSync(packageCacheFolder);
const nunitFrameworkFolder = packageCache.find((folder) =>
folder.includes("com.unity.ext.nunit")
);
if (nunitFrameworkFolder) {
dllsFromPackageCache.push(
path.join(
packageCacheFolder,
nunitFrameworkFolder,
"net35",
"unity-custom",
"nunit.framework.dll"
)
);
}
dlls = dlls
.concat(assemblies)
.concat(dllsFromPackageCache)
.filter((dll) => !dll.includes("UnityAtoms"));
// Compile code
const apiXmlName = `api.xml`;
const assemblyName = `Packages.dll`;
const cmd = `csc -recurse:"${path.join(
process.cwd(),
"Packages",
"/*.cs"
)}" /doc:"${path.join(
process.cwd(),
apiXmlName
)}" -t:library -out:"${path.join(
process.cwd(),
assemblyName
)}" -r:${dlls.join(
","
)} -define:UNITY_ATOMS_GENERATE_DOCS,UNITY_2018_3_OR_NEWER,UNITY_2018_4_OR_NEWER,UNITY_2019_1_OR_NEWER,UNITY_2019_2_OR_NEWER,UNITY_2019_3_OR_NEWER`;
try {
const compileStdout = child_process.execSync(cmd);
} catch (e) {
console.error(e.status);
console.error(e.message);
console.error(e.stderr.toString());
console.error(e.stdout.toString());
process.exit(1);
}
if (argv.verbose) {
console.log("Stdout from source code compilation:");
console.log(compileStdout.toString());
}
// Remove generated assembly
rimraf.sync(path.join(process.cwd(), assemblyName));
// Parse docs xml
const docsXmlFile = fs.readFileSync(path.join(process.cwd(), apiXmlName));
const docsXml = await parser.parseStringPromise(docsXmlFile);
const NAMESPACES = [
"UnityAtoms.",
"UnityAtoms.Editor.",
"UnityAtoms.BaseAtoms.",
"UnityAtoms.BaseAtoms.Editor.",
"UnityAtoms.FSM.",
"UnityAtoms.FSM.Editor.",
"UnityAtoms.Tags.",
"UnityAtoms.Tags.Editor.",
"UnityAtoms.Mobile.",
"UnityAtoms.Mobile.Editor.",
"UnityAtoms.UI.",
"UnityAtoms.UI.Editor.",
"UnityAtoms.SceneMgmt.",
"UnityAtoms.SceneMgmt.Editor.",
"UnityAtoms.MonoHooks.",
"UnityAtoms.MonoHooks.Editor.",
"UnityAtoms.InputSystem.",
"UnityAtoms.InputSystem.Editor.",
];
const getNamespace = (name) => {
const matches = NAMESPACES.filter((ns) => name.includes(ns));
const namespace = matches.sort(
(a, b) => (b.match(/./g) || []).length - (a.match(/./g) || []).length
)[0];
return namespace.substring(0, namespace.length - 1);
};
const extractFromName = (name) => {
const [type, ...restOfName] = name.split(":");
const namespace = getNamespace(name);
const toReturn = { type, namespace };
if (type === "T") {
toReturn.className = restOfName[0].substring(namespace.length + 1);
} else if (type === "M" || type === "P" || type === "F") {
const rest = restOfName[0].substring(namespace.length + 1);
const indexOfFirstParenthesis = rest.indexOf("(");
let className, restName;
if (indexOfFirstParenthesis !== -1) {
const indexOfMethodNameStart =
rest.substring(0, indexOfFirstParenthesis).lastIndexOf(".") + 1;
className = rest.substring(0, indexOfMethodNameStart - 1);
restName = rest.substring(indexOfMethodNameStart, rest.length);
} else {
const splitName = restOfName[0]
.substring(namespace.length + 1)
.split(".");
restName = splitName.pop();
className = splitName.join(".");
}
toReturn.className = className;
toReturn.name = restName;
}
return toReturn;
};
// EXAMPLE FORMAT:
// const prettifiedAndGroupedJsonExample = [
// {
// namespace: 'UnityAtoms',
// classes: [{
// id: 'AtomListener',
// name: 'AtomListener'
// summary: '12312312',
// methods: [{}]
// properties: [{}]
// variables: [{}]]
// }],
// }
// ];
const prettifiedAndGroupedJson = [];
// Prettify
const prettifiedXml = docsXml.doc.members[0].member.map((cur) => {
const summary = cur.summary && cur.summary[0];
const params =
cur.param &&
cur.param.length > 0 &&
cur.param.map((p) => ({ name: p["$"].name, description: p["_"] }));
const returns = cur.returns && cur.returns.length > 0 && cur.returns[0];
const value = cur.value && cur.value.length > 0 && cur.value[0];
const examples =
cur.example &&
cur.example.length > 0 &&
cur.example.map((ex) => ex.code[0]);
const typeparams =
cur.typeparam &&
cur.typeparam.length > 0 &&
cur.typeparam.map((tp) => ({ name: tp["$"].name, description: tp["_"] }));
const extractedFromName = extractFromName(cur["$"].name);
// Add namespace and classes
let namespaceGroup = prettifiedAndGroupedJson.find(
(n) => n.namespace === extractedFromName.namespace
);
if (!namespaceGroup) {
namespaceGroup = { namespace: extractedFromName.namespace, classes: [] };
prettifiedAndGroupedJson.push(namespaceGroup);
}
if (extractedFromName.type === "T") {
namespaceGroup.classes.push({
id: extractedFromName.className,
name:
extractedFromName.className.includes("`") && typeparams
? extractedFromName.className.replace(
/`\d/,
`<${typeparams.map((tp) => tp.name).join(",")}>`
)
: extractedFromName.className,
typeparams,
summary,
methods: [],
properties: [],
variables: [],
});
}
return {
summary,
params,
returns,
value,
examples,
typeparams,
...extractedFromName,
};
}, []);
// Add all methods, properties and variables
prettifiedXml
.filter((cur) => ["M", "F", "P"].includes(cur.type))
.forEach((cur) => {
const classGroup = prettifiedAndGroupedJson
.find((n) => n.namespace === cur.namespace)
.classes.find((n) => n.id === cur.className);
if (classGroup) {
if (cur.type === "M") {
if (cur.name.includes("Do(")) {
}
let name = cur.name;
if (name.includes("``") && cur.typeparams) {
name = name.replace(
/``\d/,
`<${cur.typeparams.map((tp) => tp.name).join(",")}>`
);
}
if (name.includes("`") && cur.params) {
name = name.replace(
/\(([^\)]+)\)/,
`(${cur.params.map((p) => p.name).join(",")})`
);
}
classGroup.methods.push({
...cur,
name,
});
} else if (cur.type === "F") {
classGroup.variables.push(cur);
} else if (cur.type === "P") {
classGroup.properties.push(cur);
}
}
});
const printExamples = (examples) => {
if (!examples) return "";
return `##### Examples\n\n${examples
.map((example) => {
const exampleSplitOnNewline = example.split("\n");
const numSpacesFirstRow = exampleSplitOnNewline[1].search(/\S/);
const trimmedExample = exampleSplitOnNewline
.map((line) => line.substring(numSpacesFirstRow))
.join("\n");
return `\`\`\`cs${trimmedExample}\`\`\``;
})
.join("\n\n")}\n\n`;
};
const printValues = (values = "") => {
const trimmedValues = values.replace(/\s+/g, " ").trim();
if (!trimmedValues) return "";
return `##### Values\n\n${trimmedValues}\n\n`;
};
const printReturns = (returns = "") => {
const trimmedReturns = returns.replace(/\s+/g, " ").trim();
if (!trimmedReturns) return "";
return `##### Returns\n\n${trimmedReturns}\n\n`;
};
const printSummary = (summary = "") => {
const trimmedSummary = summary.replace(/\s+/g, " ").trim();
if (!trimmedSummary) return "";
return `${trimmedSummary}\n\n`;
};
const printTypeParams = (typeparams) => {
if (!typeparams || typeparams.length <= 0) return "";
return `#### Type Parameters\n\n${typeparams
.map((tp) => `- \`${tp.name}\` - ${tp.description}`)
.join("\n")}\n\n`;
};
const printParameters = (params) => {
if (!params || params.length <= 0) return "";
return `##### Parameters\n\n${params
.map((param) => `- \`${param.name}\` - ${param.description}`)
.join("\n")}\n\n`;
};
const printVariablesSection = (variables) => {
if (!variables || variables.length <= 0) return "";
return `### Variables\n\n${variables
.map((v) => {
return `#### \`${v.name}\`\n\n${printSummary(v.summary)}`;
})
.join("---\n\n")}`;
};
const printPropertiesSection = (properties) => {
if (!properties || properties.length <= 0) return "";
return `### Properties\n\n${properties
.map((prop) => {
return `#### \`${prop.name}\`\n\n${printSummary(
prop.summary
)}${printValues(prop.values)}${printExamples(prop.examples)}`;
})
.join("---\n\n")}`;
};
const printMethodsSection = (methods) => {
if (!methods || methods.length <= 0) return "";
return `### Methods\n\n${methods
.map((method) => {
return `#### \`${method.name}\`\n\n${printSummary(
method.summary
)}${printTypeParams(method.typeparams)}${printParameters(
method.params
)}${printReturns(
typeof method.returns === "string"
? method.returns
: JSON.stringify(method.returns)
)}${printExamples(method.examples)}`;
})
.join("---\n\n")}`;
};
const printClasses = (classes) => {
if (!classes || classes.length <= 0) return "";
return classes
.map((c) => {
return `## \`${c.name}\`\n\n${printTypeParams(
c.typeparams
)}${printSummary(c.summary)}${printVariablesSection(
c.variables
)}${printPropertiesSection(c.properties)}${printMethodsSection(
c.methods
)}---\n\n`;
})
.join("");
};
const printNamespace = (namespace) =>
`# Namespace - \`${namespace.namespace}\`\n\n${printClasses(
namespace.classes
)}`;
const printPageMeta = (namespace) =>
`---\nid: ${namespace.toLowerCase()}\ntitle: ${namespace}\nhide_title: true\nsidebar_label: ${namespace}\n---\n\n`;
// Create one MD file per namespace
prettifiedAndGroupedJson.forEach((namespace) => {
const mdPath = path.join(
process.cwd(),
"docs",
"api",
`${namespace.namespace.toLowerCase()}.md`
);
const mdFile = `${printPageMeta(namespace.namespace)}${printNamespace(
namespace
)}`;
fs.writeFileSync(mdPath, mdFile.substring(0, mdFile.length - 1)); // Trim last new line
});
// Remove generated xml
rimraf.sync(path.join(process.cwd(), apiXmlName));
};
run();

View File

@ -41,7 +41,7 @@ class Footer extends React.Component {
<div>
<h5>Docs</h5>
<a href={this.docUrl('introduction/installation')}>Installation</a>
<a href={this.docUrl('api/actions')}>API</a>
<a href={this.docUrl('tutorials/creating-atoms')}>Tutorials</a>
<a href={this.docUrl('subpackages/base-atoms')}>Subpackages</a>
</div>
<div>

View File

@ -5,70 +5,6 @@
"previous": "Previous",
"tagline": "Tiny modular pieces utilizing the power of Scriptable Objects",
"docs": {
"api/unityatoms.baseatoms.editor": {
"title": "UnityAtoms.BaseAtoms.Editor",
"sidebar_label": "UnityAtoms.BaseAtoms.Editor"
},
"api/unityatoms.baseatoms": {
"title": "UnityAtoms.BaseAtoms",
"sidebar_label": "UnityAtoms.BaseAtoms"
},
"api/unityatoms.editor": {
"title": "UnityAtoms.Editor",
"sidebar_label": "UnityAtoms.Editor"
},
"api/unityatoms.fsm.editor": {
"title": "UnityAtoms.FSM.Editor",
"sidebar_label": "UnityAtoms.FSM.Editor"
},
"api/unityatoms.fsm": {
"title": "UnityAtoms.FSM",
"sidebar_label": "UnityAtoms.FSM"
},
"api/unityatoms.inputsystem.editor": {
"title": "UnityAtoms.InputSystem.Editor",
"sidebar_label": "UnityAtoms.InputSystem.Editor"
},
"api/unityatoms.inputsystem": {
"title": "UnityAtoms.InputSystem",
"sidebar_label": "UnityAtoms.InputSystem"
},
"api/unityatoms": {
"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.monohooks.editor": {
"title": "UnityAtoms.MonoHooks.Editor",
"sidebar_label": "UnityAtoms.MonoHooks.Editor"
},
"api/unityatoms.monohooks": {
"title": "UnityAtoms.MonoHooks",
"sidebar_label": "UnityAtoms.MonoHooks"
},
"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/unityatoms.ui": {
"title": "UnityAtoms.UI",
"sidebar_label": "UnityAtoms.UI"
},
"introduction/faq": {
"title": "FAQ",
"sidebar_label": "FAQ"
@ -78,8 +14,12 @@
"sidebar_label": "Installation"
},
"introduction/overview": {
"title": "Overview and philosopy",
"sidebar_label": "Overview and philosopy"
"title": "Overview",
"sidebar_label": "Overview"
},
"introduction/philosophy": {
"title": "Philosophy",
"sidebar_label": "Philosophy"
},
"introduction/preferences": {
"title": "Preferences",
@ -164,6 +104,10 @@
"title": "Variable Instancer",
"sidebar_label": "Variable Instancer"
},
"tutorials/variable-transformers": {
"title": "Variable Pre Change Transformers",
"sidebar_label": "Variable Pre Change Transformers"
},
"tutorials/variables": {
"title": "Variables",
"sidebar_label": "Variables"
@ -171,13 +115,12 @@
},
"links": {
"Installation": "Installation",
"API": "API",
"Tutorials": "Tutorials",
"Github": "Github"
},
"categories": {
"Introduction": "Introduction",
"Tutorials": "Tutorials",
"API Reference": "API Reference",
"Subpackages": "Subpackages"
}
},

11596
website/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@
"docs": {
"Introduction": [
"introduction/installation",
"introduction/philosophy",
"introduction/overview",
"introduction/preferences",
"introduction/faq"
@ -23,6 +24,7 @@
"type": "subcategory",
"label": "Intermediate",
"ids": [
"tutorials/variable-transformers",
"tutorials/variable-instancer",
"tutorials/event-instancer",
"tutorials/generator",
@ -38,23 +40,6 @@
]
}
],
"API Reference": [
"api/unityatoms",
"api/unityatoms.editor",
"api/unityatoms.baseatoms",
"api/unityatoms.baseatoms.editor",
"api/unityatoms.fsm",
"api/unityatoms.fsm.editor",
"api/unityatoms.inputsystem",
"api/unityatoms.inputsystem.editor",
"api/unityatoms.mobile",
"api/unityatoms.mobile.editor",
"api/unityatoms.monohooks",
"api/unityatoms.scenemgmt",
"api/unityatoms.scenemgmt.editor",
"api/unityatoms.tags",
"api/unityatoms.ui"
],
"Subpackages": [
"subpackages/base-atoms",
"subpackages/fsm",

View File

@ -25,7 +25,7 @@ const siteConfig = {
// For no header links in the top nav bar -> headerLinks: [],
headerLinks: [
{ doc: 'introduction/installation', label: 'Installation' },
{ doc: 'api/unityatoms', label: 'API' },
{ doc: 'tutorials/creating-atoms', label: 'Tutorials' },
{ href: 'https://www.github.com/unity-atoms/unity-atoms', label: 'Github' },
],