public SetTransform ( Vector2 newTranslation, Vector2 newScale ) : void | ||
newTranslation | Vector2 | |
newScale | Vector2 | |
Résultat | void |
private void UpdateZoomAreaAndParent() { // Configure ZoomableArea for new resolution so that old resolution doesn't restrict scale bool oldScaleWasDefault = Mathf.Approximately(m_ZoomArea.scale.y, m_defaultScale); ConfigureZoomArea(); m_defaultScale = DefaultScaleForTargetInView(targetSize, viewInWindow.size); if (oldScaleWasDefault) { m_ZoomArea.SetTransform(Vector2.zero, Vector2.one * m_defaultScale); EnforceZoomAreaConstraints(); } CopyDimensionsToParentView(); m_LastWindowPixelSize = position.size * EditorGUIUtility.pixelsPerPoint; EditorApplication.SetSceneRepaintDirty(); }