--- id: unityatoms title: UnityAtoms hide_title: true sidebar_label: UnityAtoms --- # Namespace - `UnityAtoms` ## `IMGUIUtils` Utility methods for IMGUI. ### Methods #### `SnipRectH(UnityEngine.Rect,System.Single)` Snip a `Rect` horizontally. ##### Parameters - `rect` - The rect. - `range` - The range. ##### Returns A new `Rect` snipped horizontally. --- #### `SnipRectH(UnityEngine.Rect,System.Single,UnityEngine.Rect@,System.Single)` Snip a `Rect` horizontally. ##### Parameters - `rect` - The rect. - `range` - The range. - `rest` - Rest rect. - `gutter` - Gutter ##### Returns A new `Rect` snipped horizontally. --- #### `SnipRectV(UnityEngine.Rect,System.Single)` Snip a `Rect` vertically. ##### Parameters - `rect` - The rect. - `range` - The range. ##### Returns A new `Rect` snipped vertically. --- #### `SnipRectV(UnityEngine.Rect,System.Single,UnityEngine.Rect@,System.Single)` Snip a `Rect` vertically. ##### Parameters - `rect` - The rect. - `range` - The range. - `rest` - Rest rect. - `gutter` - Gutter ##### Returns A new `Rect` snipped vertically. --- ## `StringExtensions` Internal extension class for strings. ### Methods #### `ToInt(System.String,System.Int32)` Tries to parse a string to an int. ##### Parameters - `str` - The string to parse. - `def` - The default value if not able to parse the provided string. ##### Returns Returns the string parsed to an int. If not able to parse the string, it returns the default value provided to the method. --- #### `Repeat(System.String,System.Int32)` Repeats the string X amount of times. ##### Parameters - `str` - The string to repeat. - `times` - The number of times to repeat the provided string. ##### Returns The string repeated X amount of times. --- ## `AtomAction` #### Type Parameters - `T1` - The type for this Action. Generic abstract base class for Actions. Inherits from `BaseAtom`. ### Variables #### `Action` The actual Action. ### Methods #### `Do(t1)` Perform the Action. ##### Parameters - `t1` - The first parameter. --- ## `AtomAction` #### Type Parameters - `T1` - The first type for this Action. - `T2` - The second type for this Action. Generic abstract base class for Actions. Inherits from `BaseAtom`. ### Variables #### `Action` The actual Action. ### Methods #### `Do(t1,t2)` Perform the Action. ##### Parameters - `t1` - The first parameter. - `t2` - The second parameter. --- ## `AtomAction` #### Type Parameters - `T1` - The first type for this Action. - `T2` - The second type for this Action. - `T3` - The third type for this Action. Generic abstract base class for Actions. Inherits from `BaseAtom`. ### Variables #### `Action` The actual Action. ### Methods #### `Do(t1,t2,t3)` Perform the Action. ##### Parameters - `t1` - The first parameter. - `t2` - The second parameter. - `t3` - The third parameter. --- ## `AtomAction` #### Type Parameters - `T1` - The first type for this Action. - `T2` - The second type for this Action. - `T3` - The third type for this Action. - `T4` - The fourth type for this Action. Generic abstract base class for Actions. Inherits from `BaseAtom`. ### Variables #### `Action` The actual Action. ### Methods #### `Do(t1,t2,t3,t4)` Perform the Action. ##### Parameters - `t1` - The first parameter. - `t2` - The second parameter. - `t3` - The third parameter. - `t4` - The fourth parameter. --- ## `AtomAction` #### Type Parameters - `T1` - The first type for this Action. - `T2` - The second type for this Action. - `T3` - The third type for this Action. - `T4` - The fourth type for this Action. - `T5` - The fifth type for this Action. Generic abstract base class for Actions. Inherits from `BaseAtom`. ### Variables #### `Action` The actual Action. ### Methods #### `Do(t1,t2,t3,t4,t5)` Perform the Action. ##### Parameters - `t1` - The first parameter. - `t2` - The second parameter. - `t3` - The third parameter. - `t4` - The fourth parameter. - `t5` - The fifth parameter. --- ## `BoolAction` Action of type `bool`. Inherits from `AtomAction`. --- ## `BoolBoolAction` Action x 2 of type `bool`. Inherits from `AtomAction`. --- ## `Collider2DAction` Action of type `Collider2D`. Inherits from `AtomAction`. --- ## `Collider2DCollider2DAction` Action x 2 of type `Collider2D`. Inherits from `AtomAction`. --- ## `ColliderAction` Action of type `Collider`. Inherits from `AtomAction`. --- ## `ColliderColliderAction` Action x 2 of type `Collider`. Inherits from `AtomAction`. --- ## `ColorAction` Action of type `Color`. Inherits from `AtomAction`. --- ## `ColorColorAction` Action x 2 of type `Color`. Inherits from `AtomAction`. --- ## `FloatAction` Action of type `float`. Inherits from `AtomAction`. --- ## `FloatFloatAction` Action x 2 of type `float`. Inherits from `AtomAction`. --- ## `GameObjectAction` Action of type `GameObject`. Inherits from `AtomAction`. --- ## `GameObjectGameObjectAction` Action x 2 of type `GameObject`. Inherits from `AtomAction`. --- ## `IntAction` Action of type `int`. Inherits from `AtomAction`. --- ## `IntIntAction` Action x 2 of type `int`. Inherits from `AtomAction`. --- ## `StringAction` Action of type `string`. Inherits from `AtomAction`. --- ## `StringStringAction` Action x 2 of type `string`. Inherits from `AtomAction`. --- ## `Vector2Action` Action of type `Vector2`. Inherits from `AtomAction`. --- ## `Vector2Vector2Action` Action x 2 of type `Vector2`. Inherits from `AtomAction`. --- ## `Vector3Action` Action of type `Vector3`. Inherits from `AtomAction`. --- ## `Vector3Vector3Action` Action x 2 of type `Vector3`. Inherits from `AtomAction`. --- ## `VoidAction` Action of type `Void`. Inherits from `AtomAction`. ### Methods #### `Do(UnityAtoms.Void)` Do the Action. ##### Parameters - `_` - Dummy Void parameter. --- #### `Do` Do the Action. --- ## `SetBoolVariableValue` Set variable value Action of type `bool`. Inherits from `SetVariableValue`. --- ## `SetCollider2DVariableValue` Set variable value Action of type `Collider2D`. Inherits from `SetVariableValue`. --- ## `SetColliderVariableValue` Set variable value Action of type `Collider`. Inherits from `SetVariableValue`. --- ## `SetColorVariableValue` Set variable value Action of type `Color`. Inherits from `SetVariableValue`. --- ## `SetFloatVariableValue` Set variable value Action of type `float`. Inherits from `SetVariableValue`. --- ## `SetGameObjectVariableValue` Set variable value Action of type `GameObject`. Inherits from `SetVariableValue`. --- ## `SetIntVariableValue` Set variable value Action of type `int`. Inherits from `SetVariableValue`. --- ## `SetStringVariableValue` Set variable value Action of type `string`. Inherits from `SetVariableValue`. --- ## `SetVariableValue` #### Type Parameters - `T` - The type of the Variable to set. - `V` - A Variable class of type `type` to set. - `C` - A Constant class of type `type` to set. - `R` - A Reference of type `type`. - `E1` - An Event of type `type`. - `E2` - An Event x 2 of type `type`. Base class for all SetVariableValue Actions. Inherits from `VoidAction`. ### Variables #### `_variable` The Variable to set. --- #### `_value` The value to set. ### Methods #### `Do` Perform the action. --- ## `SetVector2VariableValue` Set variable value Action of type `Vector2`. Inherits from `SetVariableValue`. --- ## `SetVector3VariableValue` Set variable value Action of type `Vector3`. Inherits from `SetVariableValue`. --- ## `EditorIcon` Specify a texture name from your assets which you want to be assigned as an icon to the MonoScript. --- ## `BaseAtom` None generic base class for all Atoms. ### Variables #### `_developerDescription` A description of the Atom made for documentation purposes. --- ## `BoolConstant` Constant of type `bool`. Inherits from `AtomBaseVariable`. --- ## `Collider2DConstant` Constant of type `Collider2D`. Inherits from `AtomBaseVariable`. --- ## `ColliderConstant` Constant of type `Collider`. Inherits from `AtomBaseVariable`. --- ## `ColorConstant` Constant of type `Color`. Inherits from `AtomBaseVariable`. --- ## `FloatConstant` Constant of type `float`. Inherits from `AtomBaseVariable`. --- ## `GameObjectConstant` Constant of type `GameObject`. Inherits from `AtomBaseVariable`. --- ## `IntConstant` Constant of type `int`. Inherits from `AtomBaseVariable`. --- ## `StringConstant` Constant of type `string`. Inherits from `AtomBaseVariable`. --- ## `Vector2Constant` Constant of type `Vector2`. Inherits from `AtomBaseVariable`. --- ## `Vector3Constant` Constant of type `Vector3`. Inherits from `AtomBaseVariable`. --- ## `AtomEvent` None generic base class for Events. Inherits from `BaseAtom` and `ISerializationCallbackReceiver`. ### Methods #### `Register(System.Action)` Register handler to be called when the Event triggers. ##### Parameters - `del` - The handler. --- #### `Unregister(System.Action)` Unregister handler that was registered using the `Register` method. ##### Parameters - `del` - The handler. --- ## `AtomEvent` #### Type Parameters - `T` - The type for this Event. Generic base class for Events. Inherits from `AtomEvent`. ### Methods #### `Raise(item)` Raise the Event. ##### Parameters - `item` - The value associated with the Event. --- #### `Register(del)` Register handler to be called when the Event triggers. ##### Parameters - `del` - The handler. --- #### `Unregister(del)` Unregister handler that was registered using the `Register` method. ##### Parameters - `del` - The handler. --- #### `RegisterListener(listener)` Register a Listener that in turn trigger all its associated handlers when the Event triggers. ##### Parameters - `listener` - The Listenr to register. --- #### `UnregisterListener(listener)` Unregister a listener that was registered using the `RegisterListener` method. ##### Parameters - `listener` - The Listenr to unregister. --- #### `Observe` Turn the Event into an `IObservable`. Makes Events compatible with for example UniRx. ##### Returns The Event as an `IObservable`. --- ## `AtomEvent` #### Type Parameters - `T1` - The first type for this Event. - `T2` - The second type for this Event. Generic base class for Events. Inherits from `AtomEvent`. ### Methods #### `Raise(item1,item2)` Raise the Event. ##### Parameters - `item1` - The first value associated with the Event. - `item2` - The second value associated with the Event. --- #### `Register(del)` Register handler to be called when the Event triggers. ##### Parameters - `del` - The handler. --- #### `Unregister(del)` Unregister handler that was registered using the `Register` method. ##### Parameters - `del` - The handler. --- #### `RegisterListener(listener)` Register a Listener that in turn trigger all its associated handlers when the Event triggers. ##### Parameters - `listener` - The Listenr to register. --- #### `UnregisterListener(listener)` Unregister a listener that was registered using the `RegisterListener` method. ##### Parameters - `listener` - The Listenr to unregister. --- #### `Observe(resultSelector)` Turn the Event into an `IObservable`. Makes Events compatible with for example UniRx. #### Type Parameters - `M` - The result selector type. ##### Parameters - `resultSelector` - Takes `T1` and `T2` and returns a new type of type `M`.abstract Most of the time this is going to be combination of T1 and T2, eg. `ValueTuple` ##### Returns The Event as an `IObservable`. --- ## `BoolBoolEvent` Event x 2 of type `bool`. Inherits from `AtomEvent`. --- ## `BoolEvent` Event of type `bool`. Inherits from `AtomEvent`. --- ## `Collider2DCollider2DEvent` Event x 2 of type `Collider2D`. Inherits from `AtomEvent`. --- ## `Collider2DEvent` Event of type `Collider2D`. Inherits from `AtomEvent`. --- ## `ColliderColliderEvent` Event x 2 of type `Collider`. Inherits from `AtomEvent`. --- ## `ColliderEvent` Event of type `Collider`. Inherits from `AtomEvent`. --- ## `ColorColorEvent` Event x 2 of type `Color`. Inherits from `AtomEvent`. --- ## `ColorEvent` Event of type `Color`. Inherits from `AtomEvent`. --- ## `FloatEvent` Event of type `float`. Inherits from `AtomEvent`. --- ## `FloatFloatEvent` Event x 2 of type `float`. Inherits from `AtomEvent`. --- ## `GameObjectEvent` Event of type `GameObject`. Inherits from `AtomEvent`. --- ## `GameObjectGameObjectEvent` Event x 2 of type `GameObject`. Inherits from `AtomEvent`. --- ## `IntEvent` Event of type `int`. Inherits from `AtomEvent`. --- ## `IntIntEvent` Event x 2 of type `int`. Inherits from `AtomEvent`. --- ## `StringEvent` Event of type `string`. Inherits from `AtomEvent`. --- ## `StringStringEvent` Event x 2 of type `string`. Inherits from `AtomEvent`. --- ## `Vector2Event` Event of type `Vector2`. Inherits from `AtomEvent`. --- ## `Vector2Vector2Event` Event x 2 of type `Vector2`. Inherits from `AtomEvent`. --- ## `Vector3Event` Event of type `Vector3`. Inherits from `AtomEvent`. --- ## `Vector3Vector3Event` Event x 2 of type `Vector3`. Inherits from `AtomEvent`. --- ## `VoidEvent` Event of type `Void`. Inherits from `AtomEvent`. --- ## `AtomFunction` #### Type Parameters - `R` - The type to return from the Function. Generic abstract base class for Functions. Inherits from `BaseAtom`. ### Variables #### `Func` The actual function. ### Methods #### `Call` Call the Function. ##### Returns Whatever the function decides to return of type `R`. --- #### `SetFunc(func)` Set the Function providing a `Func`. ##### Parameters - `func` - The `Func` to set. ##### Returns An `AtomFunction`. --- ## `AtomFunction` #### Type Parameters - `R` - The type to return from the Function. - `T1` - The parameter type for this Function. Generic abstract base class for Functions. Inherits from `BaseAtom`. ### Variables #### `Func` The actual function. ### Methods #### `Call(t1)` Call the Function. ##### Parameters - `t1` - The first parameter. ##### Returns Whatever the function decides to return of type `R`. --- #### `SetFunc(func)` Set the Function providing a `Func`. ##### Parameters - `func` - The `Func` to set. ##### Returns An `AtomFunction`. --- ## `AtomFunction` #### Type Parameters - `R` - The type to return from the Function. - `T1` - The first parameter type for this Function. - `T2` - The second parameter type for this Function. Generic abstract base class for Functions. Inherits from `BaseAtom`. ### Variables #### `Func` The actual function. ### Methods #### `Call(t1,t2)` Call the Function. ##### Parameters - `t1` - The first parameter. - `t2` - The second parameter. ##### Returns Whatever the function decides to return of type `R`. --- #### `SetFunc(func)` Set the Function providing a `Func`. ##### Parameters - `func` - The `Func` to set. ##### Returns An `AtomFunction`. --- ## `AtomFunction` #### Type Parameters - `R` - The type to return from the Function. - `T1` - The first parameter type for this Function. - `T2` - The second parameter type for this Function. - `T3` - The third parameter type for this Function. Generic abstract base class for Functions. Inherits from `BaseAtom`. ### Variables #### `Func` The actual function. ### Methods #### `Call(t1,t2,t3)` Call the Function. ##### Parameters - `t1` - The first parameter. - `t2` - The second parameter. - `t3` - The third parameter. ##### Returns Whatever the function decides to return of type `R`. --- #### `SetFunc(func)` Set the Function providing a `Func`. ##### Parameters - `func` - The `Func` to set. ##### Returns An `AtomFunction`. --- ## `AtomFunction` #### Type Parameters - `R` - The type to return from the Function. - `T1` - The first parameter type for this Function. - `T2` - The second parameter type for this Function. - `T3` - The third parameter type for this Function. - `T4` - The fourth parameter type for this Function. Generic abstract base class for Functions. Inherits from `BaseAtom`. ### Variables #### `Func` The actual function. ### Methods #### `Call(t1,t2,t3,t4)` Call the Function. ##### Parameters - `t1` - The first parameter. - `t2` - The second parameter. - `t3` - The third parameter. - `t4` - The fourth parameter. ##### Returns Whatever the function decides to return of type `R`. --- #### `SetFunc(func)` Set the Function providing a `Func`. ##### Parameters - `func` - The `Func` to set. ##### Returns An `AtomFunction`. --- ## `AtomFunction` #### Type Parameters - `R` - The type to return from the Function. - `T1` - The first parameter type for this Function. - `T2` - The second parameter type for this Function. - `T3` - The third parameter type for this Function. - `T4` - The fourth parameter type for this Function. - `T5` - The fifth parameter type for this Function. Generic abstract base class for Functions. Inherits from `BaseAtom`. ### Variables #### `Func` The actual function. ### Methods #### `Call(t1,t2,t3,t4,t5)` Call the Function. ##### Parameters - `t1` - The first parameter. - `t2` - The second parameter. - `t3` - The third parameter. - `t4` - The fourth parameter. - `t5` - The fifth parameter. ##### Returns Whatever the function decides to return of type `R`. --- #### `SetFunc(func)` Set the Function providing a `Func`. ##### Parameters - `func` - The `Func` to set. ##### Returns An `AtomFunction`. --- ## `AtomListener` #### Type Parameters - `T` - The type that we are listening for. - `A` - Acion of type `AtomAction`. - `E` - Event of type `AtomEvent`. - `UER` - Unity Event of type `UnityEvent`. Generic base class for Listeners. Inherits from `BaseAtomListener` and `IAtomListener`. ### Variables #### `_event` The Event that we are listening to. --- #### `_unityEventResponse` The Unity Event responses. NOTE: This variable is public due to this bug: https://issuetracker.unity3d.com/issues/events-generated-by-the-player-input-component-do-not-have-callbackcontext-set-as-their-parameter-type. Will be changed back to private when fixed (this could happen in a none major update). --- #### `_actionResponses` The Action responses; ### Properties #### `Event` The Event we are listening for as a proeprty. ### Methods #### `OnEventRaised(item)` Handler for when the Event gets raised. ##### Parameters - `item` - The Event type. --- ## `AtomListener` #### Type Parameters - `T1` - The first type that we are listening for. - `T2` - The second type that we are listening for. - `A` - Acion of type `AtomAction`. - `E` - Event of type `AtomEvent`. - `UER` - Unity Event of type `UnityEvent`. Generic base class for Listeners. Inherits from `BaseAtomListener` and `IAtomListener` ### Variables #### `_event` The Event that we are listening to. --- #### `_unityEventResponse` The Unity Event responses. NOTE: This variable is public due to this bug: https://issuetracker.unity3d.com/issues/events-generated-by-the-player-input-component-do-not-have-callbackcontext-set-as-their-parameter-type. Will be changed back to private when fixed (this could happen in a none major update). --- #### `_actionResponses` The Action responses; ### Properties #### `Event` The Event we are listening for as a proeprty. ### Methods #### `OnEventRaised(first,second)` Handler for when the Event gets raised. ##### Parameters - `first` - The first Event type. - `second` - The second Event type. --- ## `BaseAtomListener` None generic base class for all Listeners. ### Variables #### `_developerDescription` A description of the Listener made for documentation purposes. --- ## `BoolBoolListener` Listener x 2 of type `bool`. Inherits from `AtomListener`. --- ## `BoolListener` Listener of type `bool`. Inherits from `AtomListener`. --- ## `Collider2DCollider2DListener` Listener x 2 of type `Collider2D`. Inherits from `AtomListener`. --- ## `Collider2DListener` Listener of type `Collider2D`. Inherits from `AtomListener`. --- ## `ColliderColliderListener` Listener x 2 of type `Collider`. Inherits from `AtomListener`. --- ## `ColliderListener` Listener of type `Collider`. Inherits from `AtomListener`. --- ## `ColorColorListener` Listener x 2 of type `Color`. Inherits from `AtomListener`. --- ## `ColorListener` Listener of type `Color`. Inherits from `AtomListener`. --- ## `FloatFloatListener` Listener x 2 of type `float`. Inherits from `AtomListener`. --- ## `FloatListener` Listener of type `float`. Inherits from `AtomListener`. --- ## `GameObjectGameObjectListener` Listener x 2 of type `GameObject`. Inherits from `AtomListener`. --- ## `GameObjectListener` Listener of type `GameObject`. Inherits from `AtomListener`. --- ## `IntIntListener` Listener x 2 of type `int`. Inherits from `AtomListener`. --- ## `IntListener` Listener of type `int`. Inherits from `AtomListener`. --- ## `StringListener` Listener of type `string`. Inherits from `AtomListener`. --- ## `StringStringListener` Listener x 2 of type `string`. Inherits from `AtomListener`. --- ## `Vector2Listener` Listener of type `Vector2`. Inherits from `AtomListener`. --- ## `Vector2Vector2Listener` Listener x 2 of type `Vector2`. Inherits from `AtomListener`. --- ## `Vector3Listener` Listener of type `Vector3`. Inherits from `AtomListener`. --- ## `Vector3Vector3Listener` Listener x 2 of type `Vector3`. Inherits from `AtomListener`. --- ## `VoidListener` Listener of type `Void`. Inherits from `AtomListener`. --- ## `AtomList` #### Type Parameters - `T` - The list item type. - `E` - Event of type `AtomEvent`. Generic base class for Lists. Inherits from `BaseAtomList` and `IList`. ### Variables #### `Added` Event for when something is added to the list. --- #### `Removed` Event for when something is removed from the list. --- #### `list` Actual `List`. ### Properties #### `Count` Get the count of the list. --- #### `IsReadOnly` Is the list read only? --- #### `List` The actual `List` as a property. --- #### `Item(System.Int32)` Indexer of the list. ### Methods #### `Add(item)` Add an item to tje list. ##### Parameters - `item` - The item to add. --- #### `Remove(item)` Remove and item from the list. ##### Parameters - `item` - The item to remove. ##### Returns The removed item. --- #### `Contains(item)` Does the list contain the item provided? ##### Parameters - `item` - The item to check if it is contained in the list. ##### Returns `true` if the item exists in the list, otherwise `false`. --- #### `Get(System.Int32)` Get item at index. ##### Parameters - `i` - The index. ##### Returns The item if it exists. --- #### `GetEnumerator` Get an `IEnumerator` of the list. ##### Returns An `IEnumerator` --- #### `IndexOf(item)` Returns the index of the specified item. ##### Parameters - `item` - The item to search for. ##### Returns The zero-based index of the first occurrence of `item`. If not found it returns -1. --- #### `RemoveAt(System.Int32)` Remove an item at provided index. ##### Parameters - `index` - The index to remove item at. --- #### `Insert(index,item)` Insert item at index. ##### Parameters - `index` - Index to insert item at. - `item` - Item to insert. --- #### `ObserveAdd` Make the add event into an `IObservable`. Makes List's add Event compatible with for example UniRx. ##### Returns The add Event as an `IObservable`. --- #### `ObserveRemove` Make the remove event into an `IObservable`. Makes List's remove Event compatible with for example UniRx. ##### Returns The remove Event as an `IObservable`. --- #### `ObserveClear` Make the clear event into an `IObservable`. Makes List's clear Event compatible with for example UniRx. ##### Returns The clear Event as an `IObservable`. --- ## `BaseAtomList` None generic base class of Lists.Inherits from `BaseAtom`. ### Variables #### `Cleared` Event for when the list is cleared. ### Methods #### `Clear` Clear the list. --- ## `BoolList` List of type `bool`. Inherits from `AtomList`. --- ## `Collider2DList` List of type `Collider2D`. Inherits from `AtomList`. --- ## `ColliderList` List of type `Collider`. Inherits from `AtomList`. --- ## `ColorList` List of type `Color`. Inherits from `AtomList`. --- ## `FloatList` List of type `float`. Inherits from `AtomList`. --- ## `GameObjectList` List of type `GameObject`. Inherits from `AtomList`. --- ## `IntList` List of type `int`. Inherits from `AtomList`. --- ## `StringList` List of type `string`. Inherits from `AtomList`. --- ## `Vector2List` List of type `Vector2`. Inherits from `AtomList`. --- ## `Vector3List` List of type `Vector3`. Inherits from `AtomList`. --- ## `AtomReference` None generic base class for `AtomReference`. ### Variables #### `_usage` Should we use the provided value (via inspector), the Constant value or the Variable value? --- ## `AtomReference.Usage` Enum for how to use the Reference. --- ## `BoolReference` Reference of type `bool`. Inherits from `AtomReference`. --- ## `Collider2DReference` Reference of type `Collider2D`. Inherits from `AtomReference`. --- ## `ColliderReference` Reference of type `Collider`. Inherits from `AtomReference`. --- ## `ColorReference` Reference of type `Color`. Inherits from `AtomReference`. --- ## `FloatReference` Reference of type `float`. Inherits from `AtomReference`. --- ## `GameObjectReference` Reference of type `GameObject`. Inherits from `AtomReference`. --- ## `IntReference` Reference of type `int`. Inherits from `AtomReference`. --- ## `StringReference` Reference of type `string`. Inherits from `AtomReference`. --- ## `Vector2Reference` Reference of type `Vector2`. Inherits from `AtomReference`. --- ## `Vector3Reference` Reference of type `Vector3`. Inherits from `AtomReference`. --- ## `Void` Dummy module class used for representing nothing in for example empty Events, eg: `AtomEvent` --- ## `BoolBoolUnityEvent` None generic Unity Event x 2 of type `bool`. Inherits from `UnityEvent`. --- ## `BoolUnityEvent` None generic Unity Event of type `bool`. Inherits from `UnityEvent`. --- ## `Collider2DCollider2DUnityEvent` None generic Unity Event x 2 of type `Collider2D`. Inherits from `UnityEvent`. --- ## `Collider2DUnityEvent` None generic Unity Event of type `Collider2D`. Inherits from `UnityEvent`. --- ## `ColliderColliderUnityEvent` None generic Unity Event x 2 of type `Collider`. Inherits from `UnityEvent`. --- ## `ColliderUnityEvent` None generic Unity Event of type `Collider`. Inherits from `UnityEvent`. --- ## `ColorColorUnityEvent` None generic Unity Event x 2 of type `Color`. Inherits from `UnityEvent`. --- ## `ColorUnityEvent` None generic Unity Event of type `Color`. Inherits from `UnityEvent`. --- ## `FloatFloatUnityEvent` None generic Unity Event x 2 of type `float`. Inherits from `UnityEvent`. --- ## `FloatUnityEvent` None generic Unity Event of type `float`. Inherits from `UnityEvent`. --- ## `GameObjectGameObjectUnityEvent` None generic Unity Event x 2 of type `GameObject`. Inherits from `UnityEvent`. --- ## `GameObjectUnityEvent` None generic Unity Event of type `GameObject`. Inherits from `UnityEvent`. --- ## `IntIntUnityEvent` None generic Unity Event x 2 of type `int`. Inherits from `UnityEvent`. --- ## `IntUnityEvent` None generic Unity Event of type `int`. Inherits from `UnityEvent`. --- ## `StringStringUnityEvent` None generic Unity Event x 2 of type `string`. Inherits from `UnityEvent`. --- ## `StringUnityEvent` None generic Unity Event of type `string`. Inherits from `UnityEvent`. --- ## `Vector2UnityEvent` None generic Unity Event of type `Vector2`. Inherits from `UnityEvent`. --- ## `Vector2Vector2UnityEvent` None generic Unity Event x 2 of type `Vector2`. Inherits from `UnityEvent`. --- ## `Vector3UnityEvent` None generic Unity Event of type `Vector3`. Inherits from `UnityEvent`. --- ## `Vector3Vector3UnityEvent` None generic Unity Event x 2 of type `Vector3`. Inherits from `UnityEvent`. --- ## `VoidUnityEvent` None generic Unity Event of type `Void`. Inherits from `UnityEvent`. --- ## `DynamicAtoms` Static helper class for when creating Atoms a runtime (yes it is indeed possible 🤯). ### Methods #### `CreateVariable(initialValue,changed,changedWithHistory)` Create a Variable at runtime. #### Type Parameters - `T` - The Variable value type. - `V` - The Variable type AtomVariable`. - `E1` - The type of the `changed` Event of type `AtomEvent`. - `E2` - The type of the `changedWithHistory` Event of type `AtomEvent`. ##### Parameters - `initialValue` - Inital value of the Variable created. - `changed` - Changed Event of type `E1`. - `changedWithHistory` - Changed with history Event of type `E2`. ##### Returns The Variable created. --- #### `CreateList(added,removed,cleared)` Create a List at runtime. #### Type Parameters - `T` - The list item type. - `L` - The List type to create of type `AtomList`. - `E` - The Event tyoe used for `removed` and `added` of type `AtomEvent`. ##### Parameters - `added` - Added Event of type `E`. - `removed` - Removed Event of type `E`. - `cleared` - Cleared Event of type `Void`. ##### Returns The List created. --- #### `CreateAction(action)` Create an Action at runtime. #### Type Parameters - `A` - The Action created of type `AtomAction`. - `T1` - The type of the first parameter of the Action. ##### Parameters - `action` - The action. ##### Returns The Action created --- #### `CreateAction(action)` Create an Action at runtime. #### Type Parameters - `A` - The Action created of type `AtomAction`. - `T1` - The type of the first parameter of the Action. - `T2` - The type of the second parameter of the Action. ##### Parameters - `action` - The action. ##### Returns The Action created --- #### `CreateAction(action)` Create an Action at runtime. #### Type Parameters - `A` - The Action created of type `AtomAction`. - `T1` - The type of the first parameter of the Action. - `T2` - The type of the second parameter of the Action. - `T3` - The type of the third parameter of the Action. ##### Parameters - `action` - The action. ##### Returns The Action created --- #### `CreateAction(action)` Create an Action at runtime. #### Type Parameters - `A` - The Action created of type `AtomAction`. - `T1` - The type of the first parameter of the Action. - `T2` - The type of the second parameter of the Action. - `T3` - The type of the third parameter of the Action. - `T4` - The type of the fourth parameter of the Action. ##### Parameters - `action` - The action. ##### Returns The Action created --- #### `CreateAction(action)` Create an Action at runtime. #### Type Parameters - `A` - The Action created of type `AtomAction`. - `T1` - The type of the first parameter of the Action. - `T2` - The type of the second parameter of the Action. - `T3` - The type of the third parameter of the Action. - `T4` - The type of the fourth parameter of the Action. - `T5` - The type of the fifth parameter of the Action. ##### Parameters - `action` - The action. ##### Returns The Action created --- #### `CreateFunction(func)` Create a Function at runtime. #### Type Parameters - `F` - The Function created of type `AtomFunction`. - `R` - The return type. ##### Parameters - `func` - The function. ##### Returns The Function crated. --- #### `CreateFunction(func)` Create a Function at runtime. #### Type Parameters - `F` - The Function created of type `AtomFunction`. - `R` - The return type. - `T1` - The type of the first parameter of the Function. ##### Parameters - `func` - The function. ##### Returns The Function crated. --- #### `CreateFunction(func)` Create a Function at runtime. #### Type Parameters - `F` - The Function created of type `AtomFunction`. - `R` - The return type. - `T1` - The type of the first parameter of the Function. - `T2` - The type of the second parameter of the Function. ##### Parameters - `func` - The function. ##### Returns The Function crated. --- #### `CreateFunction(func)` Create a Function at runtime. #### Type Parameters - `F` - The Function created of type `AtomFunction`. - `R` - The return type. - `T1` - The type of the first parameter of the Function. - `T2` - The type of the second parameter of the Function. - `T3` - The type of the third parameter of the Function. ##### Parameters - `func` - The function. ##### Returns The Function crated. --- #### `CreateFunction(func)` Create a Function at runtime. #### Type Parameters - `F` - The Function created of type `AtomFunction`. - `R` - The return type. - `T1` - The type of the first parameter of the Function. - `T2` - The type of the second parameter of the Function. - `T3` - The type of the third parameter of the Function. - `T4` - The type of the fourth parameter of the Function. ##### Parameters - `func` - The function. ##### Returns The Function crated. --- #### `CreateFunction(func)` Create a Function at runtime. #### Type Parameters - `F` - The Function created of type `AtomFunction`. - `R` - The return type. - `T1` - The type of the first parameter of the Function. - `T2` - The type of the second parameter of the Function. - `T3` - The type of the third parameter of the Function. - `T4` - The type of the fourth parameter of the Function. - `T5` - The type of the fifth parameter of the Function. ##### Parameters - `func` - The function. ##### Returns The Function crated. --- ## `Runtime` Internal constant and static readonly members for runtime usage. ### Properties #### `IsUnityAtomsRepo` Determine if we are working the Unity Atoms source library / repo or not. --- ## `Runtime.Constants` Runtime constants ### Variables #### `LOG_PREFIX` Prefix that should be pre-pended to all Debug.Logs made from UnityAtoms to help immediately inform a user that those logs are made from this library. --- ## `AtomBaseVariable` None generic base class for Variables. Inherits from `BaseAtom`. ### Properties #### `BaseValue` The Variable value as an `object`.abstract Beware of boxing! 🥊 ### Methods #### `Reset(System.Boolean)` Abstract method that could be implemented to reset the Variable value. --- ## `AtomBaseVariable` #### Type Parameters - `T` - The Variable value type. Generic base class for Variables. Inherits from `AtomBaseVariable`. ### Properties #### `BaseValue` The Variable value as an `object`.abstract Beware of boxing! 🥊 --- #### `Value` The Variable value as a property. ### Methods #### `Equals(System.Object)` Determines equality between Variables. ##### Parameters - `obj` - The other Variable to compare as an `object`. ##### Returns `true` if they are equal, otherwise `false`. --- #### `GetHashCode` Get an unique hash code for this Variable based on the Variable's value. ##### Returns An unique hash. --- #### `op_Equality(left,right)` Equal operator. ##### Parameters - `left` - The first Variable to compare. - `right` - The second Variable to compare. ##### Returns `true` if eqaul, otherwise `false`. --- #### `op_Inequality(left,right)` None equality operator. ##### Parameters - `left` - The first Variable to compare. - `right` - The second Variable to compare. ##### Returns `true` if not eqaul, otherwise `false`. --- #### `Reset(System.Boolean)` Not implemented.abstract Throws Exception --- ## `AtomVariable` #### Type Parameters - `T` - The Variable value type. - `E1` - Event of type `AtomEvent`. - `E2` - Event of type `AtomEvent`. Generic base class for Variables. Inherits from `AtomBaseVariable`. ### Variables #### `_initialValue` The inital value of the Variable. --- #### `Changed` Changed Event triggered when the Variable value gets changed. --- #### `ChangedWithHistory` Changed with history Event triggered when the Variable value gets changed. ### Properties #### `Value` The Variable value as a property. --- #### `InitialValue` The inital Variable value as a property. --- #### `OldValue` The value the Variable had before its value got changed last time. ### Methods #### `Reset(System.Boolean)` Reset the Variable to its `_initalValue`. ##### Parameters - `shouldTriggerEvents` - Set to `true` if Events should be triggered on reset, otherwise `false`. --- #### `SetValue(newValue)` Set the Variable value. ##### Parameters - `newValue` - The new value to set. ##### Returns `true` if the value got changed, otherwise `false`. --- #### `SetValue(variable)` Set the Variable value. ##### Parameters - `variable` - The value to set provided from another Variable. ##### Returns `true` if the value got changed, otherwise `false`. --- #### `ObserveChange` Turn the Variable's change Event into an `IObservable`. Makes the Variable's change Event compatible with for example UniRx. ##### Returns The Variable's change Event as an `IObservable`. --- #### `ObserveChangeWithHistory` Turn the Variable's change with history Event into an `IObservable`. Makes the Variable's change with history Event compatible with for example UniRx. ##### Returns The Variable's change Event as an `IObservable`. --- ## `BoolVariable` Variable of type `bool`. Inherits from `EquatableAtomVariable`. --- ## `Collider2DVariable` Variable of type `Collider2D`. Inherits from `AtomVariable`. --- ## `ColliderVariable` Variable of type `Collider`. Inherits from `AtomVariable`. --- ## `ColorVariable` Variable of type `Color`. Inherits from `EquatableAtomVariable`. --- ## `FloatVariable` Variable of type `float`. Inherits from `EquatableAtomVariable`. --- ## `GameObjectVariable` Variable of type `GameObject`. Inherits from `AtomVariable`. --- ## `IntVariable` Variable of type `int`. Inherits from `EquatableAtomVariable`. --- ## `StringVariable` Variable of type `string`. Inherits from `EquatableAtomVariable`. --- ## `Vector2Variable` Variable of type `Vector2`. Inherits from `EquatableAtomVariable`. --- ## `Vector3Variable` Variable of type `Vector3`. Inherits from `EquatableAtomVariable`. --- ## `VoidGameObjectUnityEvent` None generic Unity Event x 2 of type `Void` and `GameObject`. Inherits from `UnityEvent`. ---