Class Helpers
Inheritance
System.Object
Helpers
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: cs.temp.dll.dll
Syntax
public static class Helpers
Methods
FindGameObjectInChildren(String, GameObject, Boolean)
Declaration
public static GameObject FindGameObjectInChildren(string name, GameObject parent, bool includeInactive = true)
Parameters
Type |
Name |
Description |
System.String |
name |
|
GameObject |
parent |
|
System.Boolean |
includeInactive |
|
Returns
Type |
Description |
GameObject |
|
FindGameObjectsInLayerMask(LayerMask)
Declaration
public static GameObject[] FindGameObjectsInLayerMask(LayerMask layers)
Parameters
Type |
Name |
Description |
LayerMask |
layers |
|
Returns
Type |
Description |
GameObject[] |
|
GetComponentInParents<T>(GameObject)
Declaration
public static T GetComponentInParents<T>(GameObject startObject)
where T : Component
Parameters
Type |
Name |
Description |
GameObject |
startObject |
|
Returns
Type Parameters
Declaration
public static Vector3 GetObjectScale(Transform t, bool includeSelf = true)
Parameters
Type |
Name |
Description |
Transform |
t |
|
System.Boolean |
includeSelf |
|
Returns
GetParentRigidBody(Transform, Func<Rigidbody, Boolean>)
Return RigidBody component in the first ancestor GameObject
Declaration
public static Rigidbody GetParentRigidBody(Transform obj, Func<Rigidbody, bool> where = null)
Parameters
Type |
Name |
Description |
Transform |
obj |
|
Func<Rigidbody, System.Boolean> |
where |
|
Returns
Type |
Description |
Rigidbody |
|
Declaration
public static Transform GetVehicle(Transform tf)
Parameters
Type |
Name |
Description |
Transform |
tf |
|
Returns
Type |
Description |
Transform |
|
IsVehicle(Rigidbody)
Declaration
public static bool IsVehicle(Rigidbody rb)
Parameters
Type |
Name |
Description |
Rigidbody |
rb |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static bool IsVehicle(Transform rb)
Parameters
Type |
Name |
Description |
Transform |
rb |
|
Returns
Type |
Description |
System.Boolean |
|
PointFieldDataTypeToBytes(Sensor.PointField.Types.DataType)
Declaration
public static int PointFieldDataTypeToBytes(Sensor.PointField.Types.DataType type)
Parameters
Type |
Name |
Description |
Sensor.PointField.Types.DataType |
type |
|
Returns
Type |
Description |
System.Int32 |
|
RandomGaussian(Single, Single)
Declaration
public static float RandomGaussian(float mean = 0F, float sigma = 1F)
Parameters
Type |
Name |
Description |
System.Single |
mean |
|
System.Single |
sigma |
|
Returns
Type |
Description |
System.Single |
|
Round(Quaternion, Int32)
Declaration
public static Quaternion Round(this Quaternion quat, int decimalPlaces = 2)
Parameters
Type |
Name |
Description |
Quaternion |
quat |
|
System.Int32 |
decimalPlaces |
|
Returns
Type |
Description |
Quaternion |
|
Round(Vector3, Int32)
Declaration
public static Vector3 Round(this Vector3 vector3, int decimalPlaces = 2)
Parameters
Type |
Name |
Description |
Vector3 |
vector3 |
|
System.Int32 |
decimalPlaces |
|
Returns
ZipWhereNotNull<TSource, TSecond, TReturn>(IEnumerable<TSource>, IEnumerable<TSecond>, Func<TSource, TSecond, Nullable<TReturn>>)
Declaration
public static IEnumerable<TReturn> ZipWhereNotNull<TSource, TSecond, TReturn>(this IEnumerable<TSource> src, IEnumerable<TSecond> second, Func<TSource, TSecond, TReturn?> func)
where TReturn : struct
Parameters
Type |
Name |
Description |
IEnumerable<TSource> |
src |
|
IEnumerable<TSecond> |
second |
|
Func<TSource, TSecond, System.Nullable<TReturn>> |
func |
|
Returns
Type |
Description |
IEnumerable<TReturn> |
|
Type Parameters
Name |
Description |
TSource |
|
TSecond |
|
TReturn |
|