Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed

- Fixed a bug where in the TextureMoveTool, a snapping of 1.0f was applied to handle movement before the actual snapping is applied
- [PBLD-240] Fixed a bug where buttons for "Create Cube" and "Create PolyShape" appeared incorrectly on Light theme.
- [PBLD-258] Fixed an bug where clicking a highlighted edge might select a hidden edge instead.
- [PBLD-262] Fixed a bug in the deep cycling of face selection where faces from hidden meshes would get prioritized
Expand Down
13 changes: 8 additions & 5 deletions Editor/EditorCore/TextureMoveTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ protected override void DoToolGUI()
{
if (!isEditing)
m_Position = Vector3.zero;

EditorHandleUtility.PushMatrix();

Handles.matrix = Matrix4x4.TRS(m_HandlePosition, m_HandleRotation, Vector3.one);
Expand All @@ -48,22 +47,26 @@ protected override void DoToolGUI()

Handles.color = Color.blue;

// Disable Snap for the individual handles. Snap is applied if movement is detected.
const float SnapFactor = 0.0f;
var handleSize = HandleUtility.GetHandleSize(m_Position);

m_Position = Handles.Slider2D(m_Position,
Vector3.forward,
Vector3.right,
Vector3.up,
HandleUtility.GetHandleSize(m_Position) * .2f,
handleSize * .2f,
Handles.RectangleHandleCap,
0f,
SnapFactor,
false);

Handles.color = Color.green;

m_Position = Handles.Slider(m_Position, Vector3.up);
m_Position = Handles.Slider(m_Position, Vector3.up, handleSize, Handles.ArrowHandleCap, SnapFactor);

Handles.color = Color.red;

m_Position = Handles.Slider(m_Position, Vector3.right);
m_Position = Handles.Slider(m_Position, Vector3.right, handleSize, Handles.ArrowHandleCap, SnapFactor);

Handles.color = Color.white;

Expand Down