void SetupBounds(GameObject go)
{
m_IsValid = go != null && go != GetGenericAnimationFallback();
if (go != null)
{
m_PreviewInstance = EditorUtility.InstantiateForAnimatorPreview(go);
previewUtility.AddSingleGO(m_PreviewInstance);
Bounds bounds = new Bounds(m_PreviewInstance.transform.position, Vector3.zero);
GameObjectInspector.GetRenderableBoundsRecurse(ref bounds, m_PreviewInstance);
m_BoundingVolumeScale = Mathf.Max(bounds.size.x, Mathf.Max(bounds.size.y, bounds.size.z));
if (Animator && Animator.isHuman)
{
m_AvatarScale = m_ZoomFactor = Animator.humanScale;
}
else
{
m_AvatarScale = m_ZoomFactor = m_BoundingVolumeScale / 2;
}
}
}