FMUtilities.

GuessRoot(GameObject) Method

Summary

Tries to guess an appropriate root object at the top of the `gameObject`'s hierarchy.
Assembly
FlexiMotion.dll
Namespace
FlexiMotion
Containing Type
FMUtilities

Syntax

public static Transform GuessRoot(GameObject gameObject)

Remarks

  1. If it's a prefab, return the prefab root.
  2. If it has an on a parent, return it.
  3. If it has a component with a [], return it.
  4. Otherwise, return the .

Parameters

Name Type Description
gameObject GameObject

Return Value

Type Description
Transform