datagatheringhelpers - eisclimber/ExPresS-XR GitHub Wiki

DataGatheringHelpers

Class in ExPresSXR.Experimentation.DataGathering

Inherits from System.Object

Summary

Utility functions for data gathering.

public static class DataGatheringHelpers

Fields

Name Description
GAME_OBJECT_FULL_NAME Name to refer to the GameObject as type as it is not a component but should be added to the list for choosing values to be exported.
primitiveTypeKeywords Mapping of types to their name of supported types for exporting with the DataGatherer.
The supported types are: bool, byte, char, decimal, double, float, int, long, sbyte, short,
string, uint, ulong, ushort, Vector2, Vector3 and Quaternion.

Methods

Name Description
AreParametersValid(MethodInfo) Check if the parameters of a method can be used with the DataGatherer.
Either no parameters, only optional or all optional but the first being a character (for the separator).
ExtractComponentNumber(string,int) Separates the component number from the provided component name.
Returns the name without the number and returns the component number to the out parameter.
GetMemberValueType(MemberInfo) Returns the (return-)type of the MemberInfo.
GetMethodParameterValues(MethodInfo,char) Generates an array with the default values for all parameters
but inserts the separator character if possible.
GetPrettifiedMemberName(MemberInfo) Generates a pretty name for a member, adding the members (return)type.
If the member is a method, brackets are added including the notion for the optional separator char.
HasOptionalSeparatorType(MethodInfo) Checks if a method has only parameters and the first is of type char.
(Does not guarantee validity!)
HasSeparatorType(MethodInfo) Checks if a method has parameters, the first is mandatory and of type char
while the rest are optional. (Does not guarantee validity!)
IsComponentMatch(Component,string) Checks if the component matches the fully qualified name.
IsExportableMemberInfo(MemberInfo) Checks if the MemberInfo is valid for data gathering.
The requirements are:
  • All: Must be an exportable type
  • Methods: Should not be of type void nor have any parameters and have no special name (e.g. auto-generated setters).
  • Property: Valid if can be read.
  • Fields: No additional requirements.| |IsGameObjectBinding(string)|Checks if a name is bound to a GameObject (and not a Component).| |IsTypeExportable(Type)|Check if a type is exportable. Either primitive, string, Vector, or Quaternion.|
⚠️ **GitHub.com Fallback** ⚠️