private SetupTransformValues ( |
||
t | ||
Результат | void |
public static TransformManipulator.TransformData GetData(Transform t) { TransformManipulator.TransformData data = new TransformManipulator.TransformData(); data.SetupTransformValues(t); data.rectTransform = t.GetComponent <RectTransform>(); if (data.rectTransform != null) { data.sizeDelta = data.rectTransform.sizeDelta; data.rect = data.rectTransform.rect; data.anchoredPosition = data.rectTransform.anchoredPosition; } return(data); }
public static TransformManipulator.TransformData GetData(Transform t) { TransformManipulator.TransformData result = default(TransformManipulator.TransformData); result.SetupTransformValues(t); result.rectTransform = t.GetComponent <RectTransform>(); if (result.rectTransform != null) { result.sizeDelta = result.rectTransform.sizeDelta; result.rect = result.rectTransform.rect; result.anchoredPosition = result.rectTransform.anchoredPosition; } return(result); }
public static TransformManipulator.TransformData GetData(Transform t) { TransformManipulator.TransformData result = default(TransformManipulator.TransformData); result.SetupTransformValues(t); result.rectTransform = t.GetComponent <RectTransform>(); if (result.rectTransform != null) { result.sizeDelta = result.rectTransform.sizeDelta; result.rect = result.rectTransform.rect; result.anchoredPosition = result.rectTransform.anchoredPosition; } else { SpriteRenderer component = t.GetComponent <SpriteRenderer>(); if (component != null && component.drawMode != SpriteDrawMode.Simple) { result.sizeDelta = component.size; } } return(result); }
public static TransformManipulator.TransformData GetData(Transform t) { TransformManipulator.TransformData data = new TransformManipulator.TransformData(); data.SetupTransformValues(t); data.rectTransform = t.GetComponent<RectTransform>(); if (data.rectTransform != null) { data.sizeDelta = data.rectTransform.sizeDelta; data.rect = data.rectTransform.rect; data.anchoredPosition = data.rectTransform.anchoredPosition; } return data; }