Summary
Utilities used throughout
FlexiMotion.FlexiMotionComponent.- Assembly
- FlexiMotion
.dll - Namespace
- FlexiMotion
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type["FMUtilities"]
class Type type-node
Syntax
public static class FMUtilities
Methods
| Name | Value | Summary |
|---|---|---|
| AddHash |
void |
Includes `add` in the `hash`.
static
|
| Allocate |
void |
Allocates an `array` using
Unity.Collections.Allocator.Persistent and
Unity.Collections.NativeArrayOptions.UninitializedMemory.
static
|
| Clone |
T |
Creates a new T and calls
FlexiMotion.ICopyable`1.CopyFrom(`0) on it.static
|
| CloneReferences |
T[] |
Returns a new array containing clones of the items in the original `array`.
static
|
| CloneValues |
T[] |
Returns a new array containing the same values.
static
|
| ContentsAreEqual |
bool |
Are both lists the same size with the same items in the same order?
static
|
| CopyArray |
void |
Resizes the `array` and copies the contents from `copyFrom`.
static
|
| DrawSphereGizmo |
void |
Draws a sphere gizmo in the Scene View.
static
|
| EstimateRadius |
float |
Tries to calculate an appropriate radius for the `transform`.
static
|
| EstimateRadius |
float |
Tries to calculate an appropriate radius for the `transform`.
static
|
| Estimate |
float |
Tries to calculate an appropriate radius for the `transform` based on the distance between it and its
parent and children.
static
|
| Estimate |
float |
Tries to calculate an appropriate radius for the `transform` based on the
UnityEngine.SkinnedMeshRenderer.sharedMeshs.
static
|
| Estimate |
float |
Tries to calculate an appropriate radius for the `transform` based on any
UnityEngine.SkinnedMeshRenderers under the `root`.
static
|
| FromToRotation |
quaternion |
Returns a
Unity.Mathematics.quaternion representing a rotation from `from` to `to`.static
|
| GuessRoot |
Transform |
Tries to guess an appropriate root object at the top of the `gameObject`'s hierarchy.
static
|
| Hash |
int |
Returns a hash value from the given parameters.
static
|
| Hash |
int |
Returns a hash value from the given parameters.
static
|
| Hash |
int |
Returns a hash value from the given parameters.
static
|
| InsertAt |
void |
Resizes the `array` to be 1 larger and inserts the `item` at the specified `index`.
static
|
| IsNaN |
bool |
Is any component of the `vector`
System.Single.NaN?static
|
| LogTemp |
T |
Debug.Log(message, context) with an [System.ObsoleteAttribute] warning so you remember
to remove any calls.
static
|
| Max |
float |
Returns the highest value.
static
|
| MaxLossyScale |
float |
Returns the highest value of
UnityEngine.Transform.lossyScale.static
|
| Min |
int |
Returns the lowest value.
static
|
| MoveItem |
void |
Takes the item out of the `array` at the `oldIndex` and inserts it in the `newIndex`.
static
|
| RemoveAt |
void |
Removes the item at the specified `index` and resizes the `array` to be 1 smaller.
static
|
| Resize |
bool |
Resizes the `array` to the specified `length`.
static
|
| SafeCount |
int |
Returns the
System.Collections.Generic.ICollection`1.Count or 0 if it's null.static
|
| SafeGetHashCode |
int |
Uses
System.Collections.Generic.EqualityComparer`1.Default to get a hash code.static
|
| SetLength |
bool |
If the `array` is
null or its System.Array.Length isn't equal to the specified `length`, this
method creates a new array with that `length` and returns true.
static
|
| TryGet |
bool |
If the `index` is within the `list`, this method outputs the `item` at that `index` and returns true.
static
|
| TryGetObject |
bool |
If the `index` is within the `list` and that `item` is not null, this method outputs it and returns true.
static
|
| TryGetTransform |
bool |
If the `obj` is a
UnityEngine.Component or UnityEngine.GameObject, this method outputs its `transform`
and returns true.
static
|