Skip to content

Instantly share code, notes, and snippets.

View alextd's full-sized avatar

Alex TD alextd

View GitHub Profile
@alextd
alextd / DragManipulator.cs
Last active April 16, 2025 04:31 — forked from shanecelis/DragManipulator.cs
This manipulator makes a visual element draggable at runtime in Unity's UIToolkit.
/* Original code[1] Copyright (c) 2022 Shane Celis[2]
Licensed under the MIT License[3]
(edits from alextd)
[1]: https://gist.github.com/shanecelis/b6fb3fe8ed5356be1a3aeeb9e7d2c145
[2]: https://twitter.com/shanecelis
[3]: https://opensource.org/licenses/MIT
*/
@alextd
alextd / DragManipulator.cs
Created April 15, 2025 22:05 — forked from shanecelis/DragManipulator.cs
This manipulator makes a visual element draggable at runtime in Unity's UIToolkit.
/* Original code[1] Copyright (c) 2022 Shane Celis[2]
Licensed under the MIT License[3]
[1]: https://gist.github.com/shanecelis/b6fb3fe8ed5356be1a3aeeb9e7d2c145
[2]: https://twitter.com/shanecelis
[3]: https://opensource.org/licenses/MIT
*/
using UnityEngine;
using UnityEngine.UIElements;