{"id":27944878,"url":"https://github.com/devslem/unity-move-tool","last_synced_at":"2025-05-07T12:55:00.047Z","repository":{"id":37531889,"uuid":"448803765","full_name":"DevSlem/unity-move-tool","owner":"DevSlem","description":"Unity editor position handle utility for the fields like Vector3, not GameObject.","archived":false,"fork":false,"pushed_at":"2022-09-15T15:30:18.000Z","size":6448,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T12:54:51.587Z","etag":null,"topics":["csharp","unity","unity-editor","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevSlem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-17T08:04:32.000Z","updated_at":"2025-03-23T19:44:26.000Z","dependencies_parsed_at":"2022-09-15T14:54:10.422Z","dependency_job_id":null,"html_url":"https://github.com/DevSlem/unity-move-tool","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevSlem%2Funity-move-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevSlem%2Funity-move-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevSlem%2Funity-move-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevSlem%2Funity-move-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevSlem","download_url":"https://codeload.github.com/DevSlem/unity-move-tool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252882791,"owners_count":21819154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","unity","unity-editor","unity3d"],"created_at":"2025-05-07T12:54:55.175Z","updated_at":"2025-05-07T12:55:00.034Z","avatar_url":"https://github.com/DevSlem.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Move-Tool for Unity\n\n**Move-Tool** is a tool that makes you use position handles for vector in unity editor scene view.  \nYou can use move-tool so easily by just defining ***some attributes***.\n\n\u003e Note that it require **C# 7** or higher.  \n\u003e If you want to use it in a lower version, you need to modify **pattern matching**(only can use in C# 7 or higher) part in `MoveToolEditor` class to `if` statement and simple type checking, but it'll make you tired.\n\n* [Basic usage](#basic-usage)\n* [MoveToolAttribute Properties](#movetoolattribute-properties)\n* [Move-Tool available custom type](#move-tool-available-custom-type)\n* [Editor](#editor)\n\n## Releases\n\nIt is recommended to use a latest, stable version.\n[main](https://github.com/DevSlem/unity-move-tool/tree/main) version is unstable because it's under active development.\n\n|                                        Version                                         | Release Date |                                     Source                                     |      C#       |     .Net Compatibility      |\n| :------------------------------------------------------------------------------------: | :----------: | :----------------------------------------------------------------------------: | :-----------: | :-------------------------: |\n|                                     main(unstable)                                     |      --      |          [main](https://github.com/DevSlem/unity-move-tool/tree/main)          | 7.0 or higher | .Net Standard 2.0 or higher |\n| [Release 3.1.0](https://github.com/DevSlem/unity-move-tool/releases/tag/release-3.1.0) |  2022-09-16  | [release-3.1.0](https://github.com/DevSlem/unity-move-tool/tree/release-3.1.0) | 7.0 or higher | .Net standard 2.0 or higher |\n\n## Latest Update\n\n* You can use **Move-Tool** for the `float` field.\n* Arrow of z direction of **Move-Tool** for the `Vector2` field has been removed. To be more intuitive!\n\n## Installation\n\nYou can select 2 installation methods.\n\n* Clone the repository and add `package.json` file to your project through Unity Package Manager.\n* You can add directly the package from git URL to your project through Unity Package Manager. See the [Installing from a Git URL](https://docs.unity3d.com/Manual/upm-ui-giturl.html).\n\n## Basic usage\n\nYou just define `MoveTool` attribute for a field for which you want to use position handle.  \nThe field is okay whether it's vector or vector collection.  \nIt works only if the type of the field is one of the `Vector3`, `Vector2`, `float` type.\n\nIf you want to use ***attributes*** about move-tool, you must declare the following `using` directive.\n\n```c#\nusing DevSlem;\n```\n\n\u003e Note that the any type that you want to use Move-Tool, it must be serializable.\n\n### Vector3\n\n```c#\npublic class MoveToolSample : MonoBehaviour\n{\n    [MoveTool] public Vector3 vector;\n}\n```\n\n![](/Images/move-tool-vector3.webp)\n\n### Vector2\n\n```c#\n[MoveTool] public Vector2 vector2;\n```\n\n\u003e Note that `Vector2` type field only moves along the x and y axes.\n\n![](/Images/move-tool-vector2.webp)\n\n### Float\n\n```c#\n[MoveTool] public float floatField;\n```\n\n\u003e Note that `float` type field only moves along the x axis.\n\n![](/Images/move-tool-float.webp)\n\n### Collection\n\nYou can use move-tool to `Array` or `List\u003cT\u003e` collection where each element is vector value.  \nWhile you click the **shift** key, you can control all elements of the list at once.\n\n```c#\n[MoveTool] public List\u003cVector3\u003e vectorCollection = new List\u003cVector3\u003e(); // Vector3[] array is also okay.\n```\n\n![](/Images/move-tool-collection.webp)\n\n### Non-Public field\n\nYou can only use move-tool for a serializable vector.\nSo, if you want to use move-tool for a ***non-public*** field like `private` or `protected`, you have to define `UnityEngine.SerializeField` attribute for the field.  \nSee the following code.\n\n```c#\n[SerializeField, MoveTool] private Vector3 privateVector;\n[SerializeField, MoveTool] private List\u003cVector3\u003e privateCollection = new List\u003cVector3\u003e();\n```\n\n## MoveToolAttribute Properties\n\n`MoveToolAttribute` has the following properties.\n\n* `PositionMode` sets the coordinate space of the vector. If you set it to `MoveToolPosition.Local` enum value, the vector works in local coordinate. Default is world coordinate.\n* `LabelMode` is a enum flag property. You can display the move-tool label on unity editor through it. By default, the label is displayed on both scene and inspector view.\n* `Label` is a custom label that you want to display your own label instead of the default label. Default label is the field name for display.\n\n### Sample Code\n\n```c#\n[MoveTool(PositionMode = MoveToolPosition.Local, LabelMode = MoveToolLabel.SceneView, Label = \"My Custom Label\")]\npublic Vector3 customPropertyVector;\n```\n\n## Move-Tool available custom type\n\nIf you want to use move-tool for a custom type field which declare vector fields, you must define `System.Serializable` and `MoveToolAvailable` attributes for the type.  \nThe custom type is okay whether class or struct.\n\n```c#\npublic class MoveToolSample : MonoBehaviour\n{\n    [MoveTool] public List\u003cCustomClass\u003e customClasses = new List\u003cCustomClass\u003e();\n}\n\n[Serializable, MoveToolAvailable]\npublic class CustomClass\n{\n    public List\u003cVector3\u003e vectors = new List\u003cVector3\u003e();\n}\n```\n\n![](/Images/move-tool-custom-type-collection.webp)\n\n### Serialize\n\nA custom type for which you define `MoveToolAvailable` attribute must be serializable. So, if you don't want to use move-tools for the fields which is declared in the custom type, you should set the fields to be non-serializable.  \n\n\u003e Note that you can only use move-tool for a serialized field.\n\nSee the following example.\n\n```c#\n[Serializable, MoveToolAvailable]\npublic class CustomClass\n{\n    public Vector3 publicVector; // Can use move-tool.\n    [SerializeField] private Vector3 serializedPrivateVector; // Can use move-tool.\n    [NonSerialized] public Vector3 nonSerializedPublicVector; // Can't use move-tool.\n    private Vector3 privateVector; // Can't use move-tool.\n}\n```\n\nPublic vector is always serialized. If you don't want to use move-tool for a public field, you need to define `System.NonSerialized` attribute for it.  \nNon-public vector isn't always serialized. If you want to use move-tool for a non-public field, you need to define `UnityEngine.SerializeField` attribute for it.  \n\n## Editor\n\nNow, you don't have to worry about editor conflict problem. It is solved.  \nYou don't need to create `MoveToolEditor` instance for using concurrently `AnotherEditor` with it.  \nYou just use normally `MoveTool` attribute.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevslem%2Funity-move-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevslem%2Funity-move-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevslem%2Funity-move-tool/lists"}