Marvelous

Marvelous

  • Getting Started
  • API
  • GitHub
  • Blog

M:Marvelous.Marvelous.GetRandom``1(``0[])

summary - Get a random item from the array.

param - array - The array.

typeparam - T - Type of array.

returns - Random item from array.

exception - Thrown if array is null or empty.

M:Marvelous.Marvelous.GetOrthographicWorldScreenHeight(UnityEngine.Camera)

summary - Get the camera's viewport world height.

param - camera - The camera.

returns - The height.

exception - Thrown if the camera is not orthographic.

M:Marvelous.Marvelous.GetOrthographicWorldScreenWidth(UnityEngine.Camera)

summary - Get the camera's viewport world width.

param - camera - The camera.

returns - The width.

exception - Thrown if the camera is not orthographic.

M:Marvelous.Marvelous.GetOrAddComponent``1(UnityEngine.GameObject)

summary - Tries to get a component on the the GameObject. If the component doesn't exists it adds it and return the newly added component.

param - gameObject - The GameObject.

typeparam - T - The type of component.

returns - The existing or newly created component.

M:Marvelous.Marvelous.HasComponent``1(UnityEngine.GameObject)

summary - Check if a GameObject has a component or not.

param - gameObject

typeparam - T - The type of component.

returns - True if the component exists on the GameObject, otherwise false.

M:Marvelous.Marvelous.AddIfNotExists``1(System.Collections.Generic.IList{``0},``0)

summary - Adds an item to the IList if it doesn't already exists.

param - list - The IList to add an item to.

param - item - The item to add.

typeparam - T - The type of the item.

returns - True if the item was added, otherwise false.

M:Marvelous.Marvelous.ChainableAdd``1(System.Collections.Generic.IList{``0},``0)

summary - Adds an item to the IList and then returns the IList.

param - list - The IList to add the item to.

param - item - The item to add.

typeparam - T - The type of the item.

returns - The IList.

M:Marvelous.Marvelous.Every``1(System.Collections.Generic.List{``0},System.Func{``0,System.Boolean})

summary - The Every method tests whether all elements in the array pass the test implemented by the provided Func.

param - list - The IList to test.

param - func - The Func that implements the test.

typeparam - T - The type of the items in the IList.

returns - True if all elements in the IList passes the test, otherwise false.

M:Marvelous.Marvelous.First``1(System.Collections.Generic.IList{``0},System.Func{``0,System.Boolean})

summary - Returns the first item that satisfies the condition.

param - list - The IList to search.

param - condition - Condition to test.

typeparam - T - The type of the items.

returns - The first item that satisfies the condition. If none found it returns default(T).

M:Marvelous.Marvelous.First``2(System.Collections.Generic.IList{``0},System.Func{``0,``1,System.Boolean},``1)

summary - Returns the first item that satisfies the condition.

param - list - The IList to search.

param - condition - Condition to test.

param - param1 - The 1st parameter to send to the condition.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

returns - The first item that satisfies the condition. If none found it returns default(T).

M:Marvelous.Marvelous.ForEach``2(System.Collections.Generic.IList{``0},System.Action{``0,``1},``1)

summary - Performs an action on each item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

M:Marvelous.Marvelous.ForEach``3(System.Collections.Generic.IList{``0},System.Action{``0,``1,``2},``1,``2)

summary - Performs an action on each item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

M:Marvelous.Marvelous.ForEach``4(System.Collections.Generic.IList{``0},System.Action{``0,``1,``2,``3},``1,``2,``3)

summary - Performs an action on each item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

param - param3 - The 3rd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

typeparam - P3 - The param3 type.

M:Marvelous.Marvelous.ForEach``3(System.Collections.Generic.IList{``0},System.Func{``0,``1},System.Action{``1,``2},``2)

summary - Performs an action on each selected item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - selector - Func that selects V from the list item that will be passed to the Action

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

typeparam - T - The type of the items.

typeparam - V - The type returned by the selector.

typeparam - P1 - The param1 type.

M:Marvelous.Marvelous.ForEach``4(System.Collections.Generic.IList{``0},System.Func{``0,``1},System.Action{``1,``2,``3},``2,``3)

summary - Performs an action on each selected item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - selector - Func that selects V from the list item that will be passed to the Action

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - V - The type returned by the selector.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

M:Marvelous.Marvelous.ForEach``5(System.Collections.Generic.IList{``0},System.Func{``0,``1},System.Action{``1,``2,``3,``4},``2,``3,``4)

summary - Performs an action on each selected item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - selector - Func that selects V from the list item that will be passed to the Action

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

param - param3 - The 3rd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - V - The type returned by the selector.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

typeparam - P3 - The param3 type.

M:Marvelous.Marvelous.ForEach``1(System.Collections.Generic.IList{``0},System.Action{``0,System.Int32})

summary - Performs an action on each item in the list passing item index and parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

typeparam - T - The type of the items.

M:Marvelous.Marvelous.ForEach``2(System.Collections.Generic.IList{``0},System.Action{``0,System.Int32,``1},``1)

summary - Performs an action on each item in the list passing item index and parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

M:Marvelous.Marvelous.ForEach``3(System.Collections.Generic.IList{``0},System.Action{``0,System.Int32,``1,``2},``1,``2)

summary - Performs an action on each item in the list passing item index and parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

M:Marvelous.Marvelous.ForEach``4(System.Collections.Generic.IList{``0},Marvelous.Action{``0,System.Int32,``1,``2,``3},``1,``2,``3)

summary - Performs an action on each item in the list passing item index and parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

param - param3 - The 3rd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

typeparam - P3 - The param3 type.

M:Marvelous.Marvelous.GetOrInstantiate``1(System.Collections.Generic.IList{``0},UnityEngine.Object,UnityEngine.Vector3,UnityEngine.Quaternion,System.Func{``0,System.Boolean})

summary - Get or instantiate a prefab from IList based on the test implemented by the provided Func.

param - list - The IList to get the prefab from.

param - prefab - The prefab.

param - position - The position of the prefab returned.

param - quaternion - The rotation of the prefab returned.

param - condition - The condition to pass in order to get an already instantiated prefab from the IList.

typeparam - T - The type of prefab in the IList.

returns - The first prefab in the IList that satisfies the condition. If none found it returns a newly created prefab of type T.

M:Marvelous.Marvelous.GetOrInstantiate(System.Collections.Generic.IList{UnityEngine.GameObject},UnityEngine.Object,UnityEngine.Vector3,UnityEngine.Quaternion,System.Func{UnityEngine.GameObject,System.Boolean})

summary - Get or instantiate a prefab from IList based on the test implemented by the provided Func.

param - list - The IList to get the prefab from.

param - prefab - The prefab.

param - position - The position of the prefab returned.

param - quaternion - The rotation of the prefab returned.

param - condition - The condition to pass in order to get an already instantiated prefab from the IList.

returns - The first prefab in the IList that satisfies the condition. If none found it returns a newly created prefab.

M:Marvelous.Marvelous.InstantiateAndAdd``1(System.Collections.Generic.IList{``0},UnityEngine.Object,UnityEngine.Vector3,UnityEngine.Quaternion)

summary - Instantiates and adds the prefab to the IList.

param - list - The IList to add the prefab to.

param - prefab - The prefab.

param - position - The position of the prefab returned.

param - quaternion - The rotation of the prefab returned.

typeparam - T - The type of prefab in the IList.

returns - The newly instantiated prefab.

M:Marvelous.Marvelous.Pipe``1(System.Collections.Generic.IList{System.Func{``0,``0}})

summary - Creates a pipe of all the Funcs in the IList.

param - list - The IList containing the Func(s).

typeparam - T - The return and parameter type of the Func.

returns - A Func that is a pipe of all Funcs in the provided IList.

M:Marvelous.Marvelous.Reduce``2(System.Collections.Generic.IList{``1},System.Func{``0,``0,``0},System.Func{``1,``0},``0,System.Func{``1,System.Boolean})

summary - The Reduce method executes a reducer function (that you provide) on each element of the IList, resulting in a single output value.

param - list - The IList to reduce.

param - reducer - Reducer Func.

param - getValue - Func to retrieve value that gets passed to the reducer.

param - initialValue - Initial value of the accumulator.

param - skip - If provided and true, skip the examined item.

typeparam - R - Return type.

typeparam - T - The type of the items.

returns - A reduced value of type R.

M:Marvelous.Marvelous.Reduce``3(System.Collections.Generic.IList{``1},System.Func{``0,``0,``2,``0},System.Func{``1,``0},``0,``2,System.Func{``1,System.Boolean})

summary - The Reduce method executes a reducer function (that you provide) on each element of the IList, resulting in a single output value.

param - list - The IList to reduce.

param - reducer - Reducer Func.

param - getValue - Func to retrieve value that gets passed to the reducer.

param - initialValue - Initial value of the accumulator.

param - reducerParam1 - The 1st parameter to send to the reducer.

param - skip - If provided and true, skip the examined item.

typeparam - R - Return type.

typeparam - T - The type of the items.

typeparam - P1 - Type of reducerParam1.

returns - A reduced value of type R.

M:Marvelous.Marvelous.ReturnMaxFloatReducer(System.Single,System.Single)

summary - A reducer that returns the maximum float.

param - acc - The accumulator.

param - cur - The current value.

returns - The maximum float value.

M:Marvelous.Marvelous.ReturnMinFloatReducer(System.Single,System.Single)

summary - A reducer that returns the minimum float.

param - acc - The accumulator.

param - cur - The current value.

returns - The minimum float value.

M:Marvelous.Marvelous.Some``1(System.Collections.Generic.IList{``0},System.Func{``0,System.Boolean})

summary - The Some method tests whether at least one element in the IList passes the test implemented by the provided Func.

param - list - The IList to test.

param - func - The Func that implements the test.

typeparam - T - The type of the items in the IList.

returns - True if at least one element in the IList passes the test, otherwise false.

M:Marvelous.Marvelous.Some``2(System.Collections.Generic.IList{``0},System.Func{``0,``1,System.Boolean},``1)

summary - The Some method tests whether at least one element in the IList passes the test implemented by the provided Func.

param - list - The IList to test.

param - func - The Func that implements the test.

param - param1 - The 1st parameter to send to the Func.

typeparam - T - The type of the items in the IList.

typeparam - P1 - The type of param1.

returns - True if at least one element in the IList passes the test, otherwise false.

M:Marvelous.Marvelous.MergeObservables``3(System.IObservable{``0},System.IObservable{``1},System.Func{``0,``1,``2},``0,``1)

summary - Merges two observables into one. It uses createCombinedModel to create what is returned on every OnNext.

param - observable1 - IObservable to be merged.

param - observable2 - IObservable to be merged.

param - createCombinedModel - Used to merge and create the observable value of the new IObservable.

param - initialValue1 - Initial value of observerable1.

param - initialValue2 - Initial value of observerable2.

typeparam - T1 - The type of the first IObservable.

typeparam - T2 - The type of the second IObservable.

typeparam - M - Type of the new merged IObservable.

returns - A new IObservable of type M combining the IObservables sent in.

M:Marvelous.Marvelous.MergeObservables``4(System.IObservable{``0},System.IObservable{``1},System.IObservable{``2},System.Func{``0,``1,``2,``3},``0,``1,``2)

summary - Merges three observables into one. It uses createCombinedModel to create what is returned on every OnNext.

param - observable1 - IObservable to be merged.

param - observable2 - IObservable to be merged.

param - observable3 - IObservable to be merged.

param - createCombinedModel - Used to merge and create the observable value of the new IObservable.

param - initialValue1 - Initial value of observerable1.

param - initialValue2 - Initial value of observerable2.

param - initialValue3 - Initial value of observerable3.

typeparam - T1 - The type of the first IObservable.

typeparam - T2 - The type of the second IObservable.

typeparam - T3 - The type of the third IObservable.

typeparam - M - Type of the new merged IObservable.

returns - A new IObservable of type M combining the IObservables sent in.

M:Marvelous.Marvelous.MergeObservables``5(System.IObservable{``0},System.IObservable{``1},System.IObservable{``2},System.IObservable{``3},System.Func{``0,``1,``2,``3,``4},``0,``1,``2,``3)

summary - Merges four observables into one. It uses createCombinedModel to create what is returned on every OnNext.

param - observable1 - IObservable to be merged.

param - observable2 - IObservable to be merged.

param - observable3 - IObservable to be merged.

param - observable4 - IObservable to be merged.

param - createCombinedModel - Used to merge and create the observable value of the new IObservable.

param - initialValue1 - Initial value of observerable1.

param - initialValue2 - Initial value of observerable2.

param - initialValue3 - Initial value of observerable3.

param - initialValue4 - Initial value of observerable4.

typeparam - T1 - The type of the first IObservable.

typeparam - T2 - The type of the second IObservable.

typeparam - T3 - The type of the third IObservable.

typeparam - T4 - The type of the fourth IObservable.

typeparam - M - Type of the new merged IObservable.

returns - A new IObservable of type M combining the IObservables sent in.

M:Marvelous.Marvelous.MergeObservables``6(System.IObservable{``0},System.IObservable{``1},System.IObservable{``2},System.IObservable{``3},System.IObservable{``4},System.Func{``0,``1,``2,``3,``4,``5},``0,``1,``2,``3,``4)

summary - Merges five observables into one. It uses createCombinedModel to create what is returned on every OnNext.

param - observable1 - IObservable to be merged.

param - observable2 - IObservable to be merged.

param - observable3 - IObservable to be merged.

param - observable4 - IObservable to be merged.

param - observable5 - IObservable to be merged.

param - createCombinedModel - Used to merge and create the observable value of the new IObservable.

param - initialValue1 - Initial value of observerable1.

param - initialValue2 - Initial value of observerable2.

param - initialValue3 - Initial value of observerable3.

param - initialValue4 - Initial value of observerable4.

param - initialValue5 - Initial value of observerable5.

typeparam - T1 - The type of the first IObservable.

typeparam - T2 - The type of the second IObservable.

typeparam - T3 - The type of the third IObservable.

typeparam - T4 - The type of the fourth IObservable.

typeparam - T5 - The type of the fifth IObservable.

typeparam - M - Type of the new merged IObservable.

returns - A new IObservable of type M combining the IObservables sent in.

M:Marvelous.Marvelous.ClearInterval(UnityEngine.MonoBehaviour,UnityEngine.Coroutine)

summary - Cancels a timed, action which was previously established by a call to SetInterval or SetTimeout.

param - mb - MonoBehaviour that initiated the Coroutine.

param - coroutine - The coroutine to stop.

M:Marvelous.Marvelous.SetInterval(UnityEngine.MonoBehaviour,System.Action,System.Single)

summary - SetInterval repeatedly calls a function, with a fixed time delay between each call.

param - mb - MonoBehaviour that is going to start the Coroutine.

param - function - A function to be executed every delay seconds.

param - delay - The time, in seconds, the timer should delay in between executions of the specified function.

returns - The underlying Coroutine started.

M:Marvelous.Marvelous.SetTimeout(UnityEngine.MonoBehaviour,System.Action,System.Single)

summary - Sets a timer which executes a function once the timer expires. This mimics javascript's API for timers and is utilizing Unity's Coroutine API to do so.

param - mb - MonoBehaviour that is going to start the Coroutine.

param - function - A function to be executed after the timer expires.

param - delay - The time, in seconds, the timer should wait before the specified function is executed.

returns - The underlying Coroutine started.

M:Marvelous.Marvelous.FindDeepChild(UnityEngine.Transform,System.String)

summary - Finds a child to this transform by name. Searches not only the first level in the tree hierarchy of child objects, but all the children, grand children, and so on.

param - parent - The parent Transform to perform the search on.

param - name - The name to look for.

returns - The child transform by the name specified. Returns null if no child was found.

M:Marvelous.Marvelous.ForEachChild(UnityEngine.Transform,System.Action{UnityEngine.Transform})

summary - Iterates over all the children and executes the Action specified.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

M:Marvelous.Marvelous.ForEachChild``1(UnityEngine.Transform,System.Action{UnityEngine.Transform,``0},``0)

summary - Iterates over all the children and executes the Action specified.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

M:Marvelous.Marvelous.ForEachChild``2(UnityEngine.Transform,System.Action{UnityEngine.Transform,``0,``1},``0,``1)

summary - Iterates over all the children and executes the Action specified.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

param - param2 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

typeparam - P2 - Type of param2.

M:Marvelous.Marvelous.ForEachChild``3(UnityEngine.Transform,System.Action{UnityEngine.Transform,``0,``1,``2},``0,``1,``2)

summary - Iterates over all the children and executes the Action specified.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

param - param2 - Parameter sent to the Action.

param - param3 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

typeparam - P2 - Type of param2.

typeparam - P3 - Type of param3.

M:Marvelous.Marvelous.ForEachChild(UnityEngine.Transform,System.Action{UnityEngine.Transform,System.Int32})

summary - Iterates over all the children and executes the Action specified. Action will get passed the child's index.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

M:Marvelous.Marvelous.ForEachChild``1(UnityEngine.Transform,System.Action{UnityEngine.Transform,System.Int32,``0},``0)

summary - Iterates over all the children and executes the Action specified. Action will get passed the child's index.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

M:Marvelous.Marvelous.ForEachChild``2(UnityEngine.Transform,System.Action{UnityEngine.Transform,System.Int32,``0,``1},``0,``1)

summary - Iterates over all the children and executes the Action specified. Action will get passed the child's index.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

param - param2 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

typeparam - P2 - Type of param2.

M:Marvelous.Marvelous.ForEachChild``3(UnityEngine.Transform,Marvelous.Action{UnityEngine.Transform,System.Int32,``0,``1,``2},``0,``1,``2)

summary - Iterates over all the children and executes the Action specified. Action will get passed the child's index.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

param - param2 - Parameter sent to the Action.

param - param3 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

typeparam - P2 - Type of param2.

typeparam - P3 - Type of param3.

M:Marvelous.Marvelous.SetParent(UnityEngine.Transform,UnityEngine.Transform)

summary - Sets a parent of the Transform provided.

param - transform - The Transform to set the parent on.

param - parent - The parent to add to the transform.

returns - The Transform with the new parent.

M:Marvelous.Marvelous.TraverseAndExecute(UnityEngine.Transform,System.Action{UnityEngine.Transform})

summary - Traverse all the children of the transform and executes the Action on this transform, as well as on all the children recursively.

param - current - The current Transform to execute the Action on.

param - action - The Action to executed.

M:Marvelous.Marvelous.TraverseExecuteAndCheck(UnityEngine.Transform,System.Func{UnityEngine.Transform,System.Boolean})

summary - Traverse all the children of the transform and executes the Func on this transform, as well as on all the children.

param - current - The current Transform to execute the Func on.

param - func - The Func to executed.

returns - True if all of the funcs returns true, otherwise false.

M:Marvelous.Marvelous.IsIntersectingAlternative(UnityEngine.Vector2,UnityEngine.Vector2,UnityEngine.Vector2,UnityEngine.Vector2)

summary - Find out if two lines intersect.

param - line1P1 - Point 1 of line 1.

param - line1P2 - Point 2 of line 1.

param - line2P1 - Point 1 of line 2.

param - line2P2 - Point 2 of line 2.

returns - True if the 2 lines are intersecting, otherwise false.

M:Marvelous.Marvelous.ToVector3(UnityEngine.Vector2,System.Single)

summary - Creates a Vector3 from a Vector2.

param - v2 - The Vector2.

param - z - The z-value of the new Vector3.

returns - A new Vector3 based on the Vector2.

M:Marvelous.Marvelous.TowardsTarget(UnityEngine.Vector2,UnityEngine.Vector2,System.Single)

summary - Calculates a new position based on the origin in the direction of the target.

param - origin - The origin Vector2.

param - target - The target Vector2.

param - maxDistance - The max distance of the returned Vector2 from the origin.

returns - The new Vector2 based on the origin in the direction of the target.

M:Marvelous.Marvelous.ToWorldPos(UnityEngine.Vector2)

summary - Convert from screen position to world position using the main camera.

param - v2 - The Vector2

returns - The world position.

M:Marvelous.Marvelous.CloneAndChange(UnityEngine.Vector3,Marvelous.V3Axis,System.Single)

summary - Create a new Vector3 based on the base Vector3, but with one axis value changed.

param - baseV3 - The base Vector3.

param - axis - The axis to change.

param - val - The new value of the axis to change.

returns - A new Vector3 based on the base Vector3, but with one axis value changed.

M:Marvelous.Marvelous.ToVector2(UnityEngine.Vector2)

summary - Creates a Vector2 from a Vector3.

param - v3 - The Vector3.

returns - A new Vector3 based on the Vector2.

M:Marvelous.Marvelous.TowardsTarget(UnityEngine.Vector3,UnityEngine.Vector3,System.Single)

summary - Calculates a new position based on the origin in the direction of the target.

param - origin - The origin Vector3.

param - target - The target Vector3.

param - maxDistance - The max distance of the returned Vector3 from the origin.

returns - The new Vector3 based on the origin in the direction of the target.

M:Marvelous.Extensions.GetRandom``1(``0[])

summary - Get a random item from the array.

param - array - The array.

typeparam - T - Type of array.

returns - Random item from array.

exception - Thrown if array is null or empty.

M:Marvelous.Extensions.GetOrthographicWorldScreenHeight(UnityEngine.Camera)

summary - Get the camera's viewport world height.

param - camera - The camera.

returns - The height.

exception - Thrown if the camera is not orthographic.

M:Marvelous.Extensions.GetOrthographicWorldScreenWidth(UnityEngine.Camera)

summary - Get the camera's viewport world width.

param - camera - The camera.

returns - The width.

exception - Thrown if the camera is not orthographic.

M:Marvelous.Extensions.GetOrAddComponent``1(UnityEngine.GameObject)

summary - Tries to get a component on the the GameObject. If the component doesn't exists it adds it and return the newly added component.

param - gameObject - The GameObject.

typeparam - T - The type of component.

returns - The existing or newly created component.

M:Marvelous.Extensions.HasComponent``1(UnityEngine.GameObject)

summary - Check if a GameObject has a component or not.

param - gameObject

typeparam - T - The type of component.

returns - True if the component exists on the GameObject, otherwise false.

M:Marvelous.Extensions.AddIfNotExists``1(System.Collections.Generic.IList{``0},``0)

summary - Adds an item to the IList if it doesn't already exists.

param - list - The IList to add an item to.

param - item - The item to add.

typeparam - T - The type of the item.

returns - True if the item was added, otherwise false.

M:Marvelous.Extensions.ChainableAdd``1(System.Collections.Generic.IList{``0},``0)

summary - Adds an item to the IList and then returns the IList.

param - list - The IList to add the item to.

param - item - The item to add.

typeparam - T - The type of the item.

returns - The IList.

M:Marvelous.Extensions.Every``1(System.Collections.Generic.List{``0},System.Func{``0,System.Boolean})

summary - The Every method tests whether all elements in the array pass the test implemented by the provided Func.

param - list - The IList to test.

param - func - The Func that implements the test.

typeparam - T - The type of the items in the IList.

returns - True if all elements in the IList passes the test, otherwise false.

M:Marvelous.Extensions.First``1(System.Collections.Generic.IList{``0},System.Func{``0,System.Boolean})

summary - Returns the first item that satisfies the condition.

param - list - The IList to search.

param - condition - Condition to test.

typeparam - T - The type of the items.

returns - The first item that satisfies the condition. If none found it returns default(T).

M:Marvelous.Extensions.First``2(System.Collections.Generic.IList{``0},System.Func{``0,``1,System.Boolean},``1)

summary - Returns the first item that satisfies the condition.

param - list - The IList to search.

param - condition - Condition to test.

param - param1 - The 1st parameter to send to the condition.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

returns - The first item that satisfies the condition. If none found it returns default(T).

M:Marvelous.Extensions.ForEach``2(System.Collections.Generic.IList{``0},System.Action{``0,``1},``1)

summary - Performs an action on each item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

M:Marvelous.Extensions.ForEach``3(System.Collections.Generic.IList{``0},System.Action{``0,``1,``2},``1,``2)

summary - Performs an action on each item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

M:Marvelous.Extensions.ForEach``4(System.Collections.Generic.IList{``0},System.Action{``0,``1,``2,``3},``1,``2,``3)

summary - Performs an action on each item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

param - param3 - The 3rd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

typeparam - P3 - The param3 type.

M:Marvelous.Extensions.ForEach``3(System.Collections.Generic.IList{``0},System.Func{``0,``1},System.Action{``1,``2},``2)

summary - Performs an action on each selected item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - selector - Func that selects V from the list item that will be passed to the Action

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

typeparam - T - The type of the items.

typeparam - V - The type returned by the selector.

typeparam - P1 - The param1 type.

M:Marvelous.Extensions.ForEach``4(System.Collections.Generic.IList{``0},System.Func{``0,``1},System.Action{``1,``2,``3},``2,``3)

summary - Performs an action on each selected item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - selector - Func that selects V from the list item that will be passed to the Action

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - V - The type returned by the selector.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

M:Marvelous.Extensions.ForEach``5(System.Collections.Generic.IList{``0},System.Func{``0,``1},System.Action{``1,``2,``3,``4},``2,``3,``4)

summary - Performs an action on each selected item in the list passing parameter(s) to the action.

param - list - The IList to iterate over.

param - selector - Func that selects V from the list item that will be passed to the Action

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

param - param3 - The 3rd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - V - The type returned by the selector.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

typeparam - P3 - The param3 type.

M:Marvelous.Extensions.ForEach``1(System.Collections.Generic.IList{``0},System.Action{``0,System.Int32})

summary - Performs an action on each item in the list passing item index and parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

typeparam - T - The type of the items.

M:Marvelous.Extensions.ForEach``2(System.Collections.Generic.IList{``0},System.Action{``0,System.Int32,``1},``1)

summary - Performs an action on each item in the list passing item index and parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

M:Marvelous.Extensions.ForEach``3(System.Collections.Generic.IList{``0},System.Action{``0,System.Int32,``1,``2},``1,``2)

summary - Performs an action on each item in the list passing item index and parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

M:Marvelous.Extensions.ForEach``4(System.Collections.Generic.IList{``0},Marvelous.Action{``0,System.Int32,``1,``2,``3},``1,``2,``3)

summary - Performs an action on each item in the list passing item index and parameter(s) to the action.

param - list - The IList to iterate over.

param - action - The action to be executed.

param - param1 - The 1st parameter to send to the action.

param - param2 - The 2nd parameter to send to the action.

param - param3 - The 3rd parameter to send to the action.

typeparam - T - The type of the items.

typeparam - P1 - The param1 type.

typeparam - P2 - The param2 type.

typeparam - P3 - The param3 type.

M:Marvelous.Extensions.GetOrInstantiate``1(System.Collections.Generic.IList{``0},UnityEngine.Object,UnityEngine.Vector3,UnityEngine.Quaternion,System.Func{``0,System.Boolean})

summary - Get or instantiate a prefab from IList based on the test implemented by the provided Func.

param - list - The IList to get the prefab from.

param - prefab - The prefab.

param - position - The position of the prefab returned.

param - quaternion - The rotation of the prefab returned.

param - condition - The condition to pass in order to get an already instantiated prefab from the IList.

typeparam - T - The type of prefab in the IList.

returns - The first prefab in the IList that satisfies the condition. If none found it returns a newly created prefab of type T.

M:Marvelous.Extensions.GetOrInstantiate(System.Collections.Generic.IList{UnityEngine.GameObject},UnityEngine.Object,UnityEngine.Vector3,UnityEngine.Quaternion,System.Func{UnityEngine.GameObject,System.Boolean})

summary - Get or instantiate a prefab from IList based on the test implemented by the provided Func.

param - list - The IList to get the prefab from.

param - prefab - The prefab.

param - position - The position of the prefab returned.

param - quaternion - The rotation of the prefab returned.

param - condition - The condition to pass in order to get an already instantiated prefab from the IList.

returns - The first prefab in the IList that satisfies the condition. If none found it returns a newly created prefab.

M:Marvelous.Extensions.InstantiateAndAdd``1(System.Collections.Generic.IList{``0},UnityEngine.Object,UnityEngine.Vector3,UnityEngine.Quaternion)

summary - Instantiates and adds the prefab to the IList.

param - list - The IList to add the prefab to.

param - prefab - The prefab.

param - position - The position of the prefab returned.

param - quaternion - The rotation of the prefab returned.

typeparam - T - The type of prefab in the IList.

returns - The newly instantiated prefab.

M:Marvelous.Extensions.Pipe``1(System.Collections.Generic.IList{System.Func{``0,``0}})

summary - Creates a pipe of all the Funcs in the IList.

param - list - The IList containing the Func(s).

typeparam - T - The return and parameter type of the Func.

returns - A Func that is a pipe of all Funcs in the provided IList.

M:Marvelous.Extensions.Reduce``2(System.Collections.Generic.IList{``1},System.Func{``0,``0,``0},System.Func{``1,``0},``0,System.Func{``1,System.Boolean})

summary - The Reduce method executes a reducer function (that you provide) on each element of the IList, resulting in a single output value.

param - list - The IList to reduce.

param - reducer - Reducer Func.

param - getValue - Func to retrieve value that gets passed to the reducer.

param - initialValue - Initial value of the accumulator.

param - skip - If provided and true, skip the examined item.

typeparam - R - Return type.

typeparam - T - The type of the items.

returns - A reduced value of type R.

M:Marvelous.Extensions.Reduce``3(System.Collections.Generic.IList{``1},System.Func{``0,``0,``2,``0},System.Func{``1,``0},``0,``2,System.Func{``1,System.Boolean})

summary - The Reduce method executes a reducer function (that you provide) on each element of the IList, resulting in a single output value.

param - list - The IList to reduce.

param - reducer - Reducer Func.

param - getValue - Func to retrieve value that gets passed to the reducer.

param - initialValue - Initial value of the accumulator.

param - reducerParam1 - The 1st parameter to send to the reducer.

param - skip - If provided and true, skip the examined item.

typeparam - R - Return type.

typeparam - T - The type of the items.

typeparam - P1 - Type of reducerParam1.

returns - A reduced value of type R.

M:Marvelous.Extensions.Some``1(System.Collections.Generic.IList{``0},System.Func{``0,System.Boolean})

summary - The Some method tests whether at least one element in the IList passes the test implemented by the provided Func.

param - list - The IList to test.

param - func - The Func that implements the test.

typeparam - T - The type of the items in the IList.

returns - True if at least one element in the IList passes the test, otherwise false.

M:Marvelous.Extensions.Some``2(System.Collections.Generic.IList{``0},System.Func{``0,``1,System.Boolean},``1)

summary - The Some method tests whether at least one element in the IList passes the test implemented by the provided Func.

param - list - The IList to test.

param - func - The Func that implements the test.

param - param1 - The 1st parameter to send to the Func.

typeparam - T - The type of the items in the IList.

typeparam - P1 - The type of param1.

returns - True if at least one element in the IList passes the test, otherwise false.

M:Marvelous.Extensions.MergeObservables``3(System.IObservable{``0},System.IObservable{``1},System.Func{``0,``1,``2},``0,``1)

summary - Merges 2 observables into one. It uses createCombinedModel to create what is returned on every OnNext.

param - observable1 - IObservable to be merged.

param - observable2 - IObservable to be merged.

param - createCombinedModel - Used to merge and create the observable value of the new IObservable.

param - initialValue1 - Initial value of observerable1.

param - initialValue2 - Initial value of observerable2.

typeparam - T1 - The type of the first IObservable.

typeparam - T2 - The type of the second IObservable.

typeparam - M - Type of the new merged IObservable.

returns - A new IObservable of type M combining the IObservables sent in.

M:Marvelous.Extensions.MergeObservables``4(System.IObservable{``0},System.IObservable{``1},System.IObservable{``2},System.Func{``0,``1,``2,``3},``0,``1,``2)

summary - Merges three observables into one. It uses createCombinedModel to create what is returned on every OnNext.

param - observable1 - IObservable to be merged.

param - observable2 - IObservable to be merged.

param - observable3 - IObservable to be merged.

param - createCombinedModel - Used to merge and create the observable value of the new IObservable.

param - initialValue1 - Initial value of observerable1.

param - initialValue2 - Initial value of observerable2.

param - initialValue3 - Initial value of observerable3.

typeparam - T1 - The type of the first IObservable.

typeparam - T2 - The type of the second IObservable.

typeparam - T3 - The type of the third IObservable.

typeparam - M - Type of the new merged IObservable.

returns - A new IObservable of type M combining the IObservables sent in.

M:Marvelous.Extensions.MergeObservables``5(System.IObservable{``0},System.IObservable{``1},System.IObservable{``2},System.IObservable{``3},System.Func{``0,``1,``2,``3,``4},``0,``1,``2,``3)

summary - Merges four observables into one. It uses createCombinedModel to create what is returned on every OnNext.

param - observable1 - IObservable to be merged.

param - observable2 - IObservable to be merged.

param - observable3 - IObservable to be merged.

param - observable4 - IObservable to be merged.

param - createCombinedModel - Used to merge and create the observable value of the new IObservable.

param - initialValue1 - Initial value of observerable1.

param - initialValue2 - Initial value of observerable2.

param - initialValue3 - Initial value of observerable3.

param - initialValue4 - Initial value of observerable4.

typeparam - T1 - The type of the first IObservable.

typeparam - T2 - The type of the second IObservable.

typeparam - T3 - The type of the third IObservable.

typeparam - T4 - The type of the fourth IObservable.

typeparam - M - Type of the new merged IObservable.

returns - A new IObservable of type M combining the IObservables sent in.

M:Marvelous.Extensions.MergeObservables``6(System.IObservable{``0},System.IObservable{``1},System.IObservable{``2},System.IObservable{``3},System.IObservable{``4},System.Func{``0,``1,``2,``3,``4,``5},``0,``1,``2,``3,``4)

summary - Merges five observables into one. It uses createCombinedModel to create what is returned on every OnNext.

param - observable1 - IObservable to be merged.

param - observable2 - IObservable to be merged.

param - observable3 - IObservable to be merged.

param - observable4 - IObservable to be merged.

param - observable5 - IObservable to be merged.

param - createCombinedModel - Used to merge and create the observable value of the new IObservable.

param - initialValue1 - Initial value of observerable1.

param - initialValue2 - Initial value of observerable2.

param - initialValue3 - Initial value of observerable3.

param - initialValue4 - Initial value of observerable4.

param - initialValue5 - Initial value of observerable5.

typeparam - T1 - The type of the first IObservable.

typeparam - T2 - The type of the second IObservable.

typeparam - T3 - The type of the third IObservable.

typeparam - T4 - The type of the fourth IObservable.

typeparam - T5 - The type of the fifth IObservable.

typeparam - M - Type of the new merged IObservable.

returns - A new IObservable of type M combining the IObservables sent in.

M:Marvelous.Extensions.ClearInterval(UnityEngine.MonoBehaviour,UnityEngine.Coroutine)

summary - Cancels a timed, action which was previously established by a call to SetInterval or SetTimeout.

param - mb - MonoBehaviour that initiated the Coroutine.

param - coroutine - The coroutine to stop.

M:Marvelous.Extensions.SetInterval(UnityEngine.MonoBehaviour,System.Action,System.Single)

summary - SetInterval repeatedly calls a function, with a fixed time delay between each call.

param - mb - MonoBehaviour that is going to start the Coroutine.

param - function - A function to be executed every delay seconds.

param - delay - The time, in seconds, the timer should delay in between executions of the specified function.

returns - The underlying Coroutine started.

M:Marvelous.Extensions.SetTimeout(UnityEngine.MonoBehaviour,System.Action,System.Single)

summary - Sets a timer which executes a function once the timer expires. This mimics javascript's API for timers and is utilizing Unity's Coroutine API to do so.

param - mb - MonoBehaviour that is going to start the Coroutine.

param - function - A function to be executed after the timer expires.

param - delay - The time, in seconds, the timer should wait before the specified function is executed.

returns - The underlying Coroutine started.

M:Marvelous.Extensions.FindDeepChild(UnityEngine.Transform,System.String)

summary - Finds a child to this transform by name. Searches not only the first level in the tree hierarchy of child objects, but all the children, grand children, and so on.

param - parent - The parent Transform to perform the search on.

param - name - The name to look for.

returns - The child transform by the name specified. Returns null if no child was found.

M:Marvelous.Extensions.ForEachChild(UnityEngine.Transform,System.Action{UnityEngine.Transform})

summary - Iterates over all the children and executes the Action specified.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

M:Marvelous.Extensions.ForEachChild``1(UnityEngine.Transform,System.Action{UnityEngine.Transform,``0},``0)

summary - Iterates over all the children and executes the Action specified.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

M:Marvelous.Extensions.ForEachChild``2(UnityEngine.Transform,System.Action{UnityEngine.Transform,``0,``1},``0,``1)

summary - Iterates over all the children and executes the Action specified.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

param - param2 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

typeparam - P2 - Type of param2.

M:Marvelous.Extensions.ForEachChild``3(UnityEngine.Transform,System.Action{UnityEngine.Transform,``0,``1,``2},``0,``1,``2)

summary - Iterates over all the children and executes the Action specified.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

param - param2 - Parameter sent to the Action.

param - param3 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

typeparam - P2 - Type of param2.

typeparam - P3 - Type of param3.

M:Marvelous.Extensions.ForEachChild(UnityEngine.Transform,System.Action{UnityEngine.Transform,System.Int32})

summary - Iterates over all the children and executes the Action specified. Action will get passed the child's index.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

M:Marvelous.Extensions.ForEachChild``1(UnityEngine.Transform,System.Action{UnityEngine.Transform,System.Int32,``0},``0)

summary - Iterates over all the children and executes the Action specified. Action will get passed the child's index.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

M:Marvelous.Extensions.ForEachChild``2(UnityEngine.Transform,System.Action{UnityEngine.Transform,System.Int32,``0,``1},``0,``1)

summary - Iterates over all the children and executes the Action specified. Action will get passed the child's index.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

param - param2 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

typeparam - P2 - Type of param2.

M:Marvelous.Extensions.ForEachChild``3(UnityEngine.Transform,Marvelous.Action{UnityEngine.Transform,System.Int32,``0,``1,``2},``0,``1,``2)

summary - Iterates over all the children and executes the Action specified. Action will get passed the child's index.

param - transform - The Transform with the children to iterate.

param - action - The Action to be executed.

param - param1 - Parameter sent to the Action.

param - param2 - Parameter sent to the Action.

param - param3 - Parameter sent to the Action.

typeparam - P1 - Type of param1.

typeparam - P2 - Type of param2.

typeparam - P3 - Type of param3.

M:Marvelous.Extensions.SetParent(UnityEngine.Transform,UnityEngine.Transform)

summary - Sets a parent of the Transform provided.

param - transform - The Transform to set the parent on.

param - parent - The parent to add to the transform.

returns - The Transform with the new parent.

M:Marvelous.Extensions.TraverseAndExecute(UnityEngine.Transform,System.Action{UnityEngine.Transform})

summary - Traverse all the children of the transform and executes the Action on this transform, as well as on all the children recursively.

param - current - The current Transform to execute the Action on.

param - action - The Action to executed.

M:Marvelous.Extensions.TraverseExecuteAndCheck(UnityEngine.Transform,System.Func{UnityEngine.Transform,System.Boolean})

summary - Traverse all the children of the transform and executes the Func on this transform, as well as on all the children.

param - current - The current Transform to execute the Func on.

param - func - The Func to executed.

returns - True if all of the funcs returns true, otherwise false.

M:Marvelous.Extensions.ToVector3(UnityEngine.Vector2,System.Single)

summary - Creates a Vector3 from a Vector2.

param - v2 - The Vector2.

param - z - The z-value of the new Vector3.

returns - A new Vector3 based on the Vector2.

M:Marvelous.Extensions.TowardsTarget(UnityEngine.Vector2,UnityEngine.Vector2,System.Single)

summary - Calculates a new position based on the origin in the direction of the target.

param - origin - The origin Vector2.

param - target - The target Vector2.

param - maxDistance - The max distance of the returned Vector2 from the origin.

returns - The new Vector2 based on the origin in the direction of the target.

M:Marvelous.Extensions.ToWorldPos(UnityEngine.Vector2)

summary - Convert from screen position to world position using the main camera.

param - v2 - The Vector2

returns - The world position.

M:Marvelous.Extensions.CloneAndChange(UnityEngine.Vector3,Marvelous.V3Axis,System.Single)

summary - Create a new Vector3 based on the base Vector3, but with one axis value changed.

param - baseV3 - The base Vector3.

param - axis - The axis to change.

param - val - The new value of the axis to change.

returns - A new Vector3 based on the base Vector3, but with one axis value changed.

M:Marvelous.Extensions.ToVector2(UnityEngine.Vector2)

summary - Creates a Vector2 from a Vector3.

param - v3 - The Vector3.

returns - A new Vector3 based on the Vector2.

M:Marvelous.Extensions.TowardsTarget(UnityEngine.Vector3,UnityEngine.Vector3,System.Single)

summary - Calculates a new position based on the origin in the direction of the target.

param - origin - The origin Vector3.

param - target - The target Vector3.

param - maxDistance - The max distance of the returned Vector3 from the origin.

returns - The new Vector3 based on the origin in the direction of the target.

Marvelous
Docs
Getting StartedAPI
Community
Twitter
More
BlogGitHub
Copyright ยฉ 2019 Adam Ramberg