| ReflectionUtilitiesTryFindMethodInfo Method |
Uses reflection to try to find a method in a type or any derived types. (Doesn't matter if it's private, public, etc.)
This will stop the search when it finds the first method with the method name passed in.
Namespace:
DustProductions.Core
Assembly:
DustProductions.Core (in DustProductions.Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static bool TryFindMethodInfo(
Type typeToSearch,
string methodName,
out MethodInfo targetMethodInfo,
bool searchUnityTypes = false
)
Parameters
- typeToSearch
- Type: SystemType
The type of object you are searching - methodName
- Type: SystemString
The name of the method you are searching for - targetMethodInfo
- Type: System.ReflectionMethodInfo
The output method info if one exists - searchUnityTypes (Optional)
- Type: SystemBoolean
Optional parameter to also search MonoBehaviour and it's derived types, otherwise it stops at MonoBehaviour
Return Value
Type:
BooleanTrue if a method info is found, false if it's not.
See Also