SetPivotPoint() публичный Метод

public SetPivotPoint ( Vector2 _pivotPoint ) : void
_pivotPoint Vector2
Результат void
        void DoSpriteMeshInspector()
        {
            if (spriteMeshCache.spriteMesh)
            {
                EditorGUI.BeginDisabledGroup(true);

                EditorGUIUtility.labelWidth = 55f;

                EditorGUILayout.ObjectField("Sprite", spriteMeshCache.spriteMesh.sprite, typeof(UnityEngine.Object),
                                            false);

                EditorGUI.EndDisabledGroup();

                EditorGUIUtility.labelWidth = 15f;

                EditorGUI.BeginChangeCheck();

                Vector2 pivotPoint = EditorGUILayout.Vector2Field("Pivot", spriteMeshCache.pivotPoint);

                if (EditorGUI.EndChangeCheck())
                {
                    spriteMeshCache.RegisterUndo("set pivot");

                    spriteMeshCache.SetPivotPoint(pivotPoint);
                }
            }
        }