UnityEditor.AvatarPreview.SetupBounds C# (CSharp) Méthode

SetupBounds() private méthode

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