GetAnchor() private static method

private static GetAnchor ( VerticalTextAligment verticalTextAligment, HorizontalTextAligment horizontalTextAligment ) : TextAnchor
verticalTextAligment VerticalTextAligment
horizontalTextAligment HorizontalTextAligment
return TextAnchor
Beispiel #1
0
 private static void SetVerticalAlignment(SerializedProperty alignment, FontDataDrawer.VerticalTextAligment verticalAlignment)
 {
     foreach (Object targetObject in alignment.serializedObject.targetObjects)
     {
         Text text = targetObject as Text;
         FontDataDrawer.HorizontalTextAligment horizontalAlignment = FontDataDrawer.GetHorizontalAlignment(text.alignment);
         Undo.RecordObject((Object)text, "Vertical Alignment");
         text.alignment = FontDataDrawer.GetAnchor(verticalAlignment, horizontalAlignment);
         EditorUtility.SetDirty(targetObject);
     }
 }
 private static void SetVerticalAlignment(SerializedProperty alignment, FontDataDrawer.VerticalTextAligment verticalAlignment)
 {
     UnityEngine.Object[] targetObjects = alignment.serializedObject.targetObjects;
     for (int i = 0; i < targetObjects.Length; i++)
     {
         UnityEngine.Object @object = targetObjects[i];
         Text text = @object as Text;
         FontDataDrawer.HorizontalTextAligment horizontalAlignment = FontDataDrawer.GetHorizontalAlignment(text.alignment);
         Undo.RecordObject(text, "Vertical Alignment");
         text.alignment = FontDataDrawer.GetAnchor(verticalAlignment, horizontalAlignment);
         EditorUtility.SetDirty(@object);
     }
 }