TransformUtilities

This is how the tool looks like

Hello. I’ve been working on a set of four tools to aid in the Unity3d development. After using Unity for a while I encountered the classic problem of needing to copy the position of an object over and over. This led me to create the “Copy” tool. I’ve found a similar script on the Unify community, but I wanted to extend the tool. It is now possible to copy position, rotation and scale of any axis you want. Also, the values apply to all objects selected in the scene.

After that, and inspired by the tools I found on the Gamebryo Lightspeed editor, I created the Randomize and Add Noise tools. Those tools work almost the same, the randomize the position, rotation of scale of any object selected (or all objects selected). The difference is that while Randomize sets the absolute values for position, rotation or scale, Add noise adds a delta to the current value of the transform. This is useful for example to randomize the Y rotation of all the trees in your level, or to make a bunch of boxes look more natural by not being perfectly aligned.

Finally, after been learning Autodesk 3ds Max, I created the Align tool inspired by a tool in that software. It basically takes a source transform, just like the Copy tool, then uses it’s collider and the collider of the object (or objects) selected to align it. You can align for example, the minimum point of your selection with the maximum point of your source (what you are aligning to) to place an object over another. It let’s you align using the minimum point, maximum point, the center of the object or the pivot point on both the selection and the source. You can align on all 3 axis.

To use these tool, all you need to do is download the script file, and add it into a folder named Editor in your project’s Asset folder. Once compiled by Unity you find the new functionality in Window -> TransformUtilities, or simply press Ctrl+t (Cmd+t for Mac users)

Developed by Daniel Rodríguez (Seth Illgard) in January 2010

Download TransformUtilities!

Hope you find them useful, and please let me know how can I improve theses tools.

  • Pingback: TransformUtilities for Unity3d released

  • Hightree

    Great tool, thanks a lot !

  • http://www.silentkraken.com seth

    Glad you like it. Hope you find it useful :)

    [WORDPRESS HASHCASH] The poster sent us ’0 which is not a hashcash value.

  • http://cpanama.info Panameno

    I trust you would not mind if I put up a part of this site on my univeristy blog?

  • http://www.luissopelana.com Luis Sopelana

    Thank you so much for this! I just downloaded it but it looks very useful. I’ll give it a spin later and tell you what I think. ¡Gracias!

    [WORDPRESS HASHCASH] The poster sent us ’0 which is not a hashcash value.

  • http://www.silentkraken.com Daniel Rodríguez

    Of course not, but I’d prefer a link :)

  • Pingback: Quickly Adding Custom Editor Scripts To New Projects in Unity3D | AlmostLogical.com

  • tzs007

    I've got errors:

    Instance of TransformUtilitiesWindow couldn't be created because there is no script with that name.
    UnityEngine.ScriptableObject:.ctor()
    UnityEngine.ScriptableObject:.ctor()
    UnityEditor.EditorWindow:.ctor()
    TransformUtilitiesWindow:.ctor()
    System.Reflection.MonoCMethod:InternalInvoke(Object, Object[])
    System.Reflection.MonoCMethod:InternalInvoke(Object, Object[])
    System.Reflection.MonoCMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
    System.Reflection.MonoCMethod:Invoke(BindingFlags, Binder, Object[], CultureInfo)
    System.Reflection.ConstructorInfo:Invoke(Object[])
    System.Activator:CreateInstance(Type, Boolean)
    System.Activator:CreateInstance(Type)
    UnityEditor.EditorWindow:GetWindow(Type, Boolean, String)
    UnityEditor.EditorWindow:GetWindow(Type)
    TransformUtilitiesWindow:Init() (at AssetsEditorTransformingTool.cs:421)

    [....RuntimeMonoMonoExportUtility.cpp line 686]

    But the window menu has been appeared.

  • tzs007

    Aw sh*t. I renamed the file, ok that works. Good!

  • http://www.silentkraken.com/ Seth Illgard

    Yeah, the file should be named “TransformUtilitiesWidow.cs”

  • http://www.facebook.com/Jayecifer Jaye Cline

    I'm very pleased with this tool. Thank you very much.

  • m_for

    great idea, unfortunately all I get are errors :(
    Unity Pro, iPhone Basic. 1.7.0f1 (38208)

    Assets/Editor/TransformUtilitiesWindow.cs(68,53): error CS0103: The name `EditorStyles' does not exist in the current context
    Assets/Editor/TransformUtilitiesWindow.cs(76,25): error CS0117: `UnityEditor.EditorGUILayout' does not contain a definition for `Space'
    Assets/Editor/TransformUtilitiesWindow.cs(84,34): error CS0103: The name `EditorStyles' does not exist in the current context
    Assets/Editor/TransformUtilitiesWindow.cs(89,25): error CS0117: `UnityEditor.EditorGUILayout' does not contain a definition for `Space'
    Assets/Editor/TransformUtilitiesWindow.cs(100,34): error CS1501: No overload for method `ObjectField' takes `2' arguments
    Assets/Editor/TransformUtilitiesWindow.cs(108,39): error CS0103: The name `EditorStyles' does not exist in the current context
    Assets/Editor/TransformUtilitiesWindow.cs(112,36): error CS0103: The name `EditorStyles' does not exist in the current context
    Assets/Editor/TransformUtilitiesWindow.cs(117,25): error CS0117: `UnityEditor.EditorGUILayout' does not contain a definition for `Space'
    Assets/Editor/TransformUtilitiesWindow.cs(129,56): error CS0308: The non-generic method `AddComponent' cannot be used with type arguments
    Assets/Editor/TransformUtilitiesWindow.cs(140,58): error CS0308: The non-generic method `AddComponent' cannot be used with type arguments
    Assets/Editor/TransformUtilitiesWindow.cs(217,35): error CS0117: `UnityEditor.EditorApplication' does not contain a definition for `Beep'
    Assets/Editor/TransformUtilitiesWindow.cs(230,38): error CS1501: No overload for method `ObjectField' takes `2' arguments
    Assets/Editor/TransformUtilitiesWindow.cs(233,25): error CS0117: `UnityEditor.EditorGUILayout' does not contain a definition for `Space'
    Assets/Editor/TransformUtilitiesWindow.cs(254,35): error CS0117: `UnityEditor.EditorApplication' does not contain a definition for `Beep'
    Assets/Editor/TransformUtilitiesWindow.cs(279,35): error CS0117: `UnityEditor.EditorApplication' does not contain a definition for `Beep'
    Assets/Editor/TransformUtilitiesWindow.cs(302,35): error CS0117: `UnityEditor.EditorApplication' does not contain a definition for `Beep'
    Assets/Editor/TransformUtilitiesWindow.cs(421,82): error CS0117: `UnityEditor.EditorWindow' does not contain a definition for `GetWindow'

  • Leegoonz

    It's good script!

  • Chadchat

    Like!

  • http://profiles.google.com/edujilee jang june

    thank you . wow~~~~~

  • Nestor Ledon

    These are great. Thanks a ton.

  • Pingback: Unity3D Tools

  • 陆卓群

    I met up with an error so i search for the solution here… I texted [ GUILayoutOption.Label("Distance (metres): ",+ distanceBetweenTransforms); ] but it always said :Assets/Scripts/Editor/SpaceMeasure.cs(41,33): error CS0117: `UnityEngine.GUILayoutOption’ does not contain a definition for `Label’

    plz….. would u guide me..?