Search Unity

Runtime Handles

Discussion in 'Assets and Asset Store' started by Vadim-Andriyanov, Aug 27, 2016.

  1. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Runtime Handles is a set of scripts, which will help you to implement runtime scene/level editor. Package divided into several parts, could be used together or independently.



    Features:
    ♥ Positon handle,
    ♥ Rotation handle;
    ♥ Scale handle;
    ♥ Grid;
    ♥ Box Selection;
    ♥ Selection gizmo;
    ♥ Unit & Bounding Box Snapping;
    ♥ Snap To Grid;
    ♥ Focus & Auto-Focus;
    ♥ Global & Local coordinates;
    ♥ Runtime Undo & Redo;
    ♥ Runtime Save & Load (PlayerPrefs)
    ♥ Editor Demo



    Documentation

    https://www.assetstore.unity3d.com/en/#!/content/65363
     

    Attached Files:

    Last edited: May 9, 2017
  2. mecadiego113

    mecadiego113

    Joined:
    Dec 10, 2015
    Posts:
    4
    How could I change the gizmos size?

    Thank you! This asset is awesome
     
  3. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    It will be possible with version 1.11
    Battlehub/RTHandles/Scripts/RuntimeHandles.cs
    public static class RuntimeHandles
    {
    public const float HandleScale = 1.0f;

    Send your order number to Vadim.Andriyanov@outlook.com and I'll send you latest version with this option
     
  4. Delfing16

    Delfing16

    Joined:
    Dec 8, 2016
    Posts:
    3
    Hello Mr. Adryanov,

    I would like to buy your program Runtime Editor.
    For this I have some questions:

    1.How can I zoom out and zoom in?
    2.How can I save as name and load as name? Where is everything stored?
    3.Can I edit and change the buttons, etc. in the editor?
    4.I can install my own objects

    Best regards
    Detlef Delfing
     
  5. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    685
    Great asset.

    I think the rotation behavior with several objects selected is a bit weird:


    Rather, they should rotate around a common origin (preferably center of all selected objects).

    I'm not a big fan of the ResourceMap. Having code that tracks the whole project and slows it down isn't acceptable, especially if you're not even interested in the undo-redo functionality. There should be an officially supported way to disable this.

    The ExposeToEditor workflow is really neat, but I'd like to see options for what tools are supported as well (maybe the user wants some objects to only be rotatable or movable for example).

    Other than that, lovely asset. I hope it evolves.
     
  6. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    In version 1.3.1
    - problem with rotation fixed (rotation mode could be either: local or pivot)
    - ResourceMap is not slowing down project anymore, and could be removed at all. User could implement IProjectManager or ISceneManager interface and use own save & load functionality.
    - Undo Redo could be disabled: Battlehub.RTCommon.RuntimeUndo.Enabled = false;
     
  7. godblesschimp

    godblesschimp

    Joined:
    Jul 28, 2014
    Posts:
    1
    When "Anti Aliasing "in the "Quality Settings" is not disabled, SceneGizmo fails to refresh properly.

    Deploy to "Web GL" mode.
     

    Attached Files:

    Vadim-Andriyanov likes this.
  8. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hi,

    Thank you for reporting about this problem. I think that you don't have to switch off antialiasing in quality settings. MSAA should be disabled only on camera which is used to render SceneGizmo. All other cameras could have allowMSAA set to true. I've tested it with WebGL build in latest Chrome and Firefox on windows 10 platform.

    Could you confirm that you have m_camera.allowMSAA = false in Battlehub/RTHandles/Scripts/SceneGizmo.cs, so we could narrow the problem?

    Code (CSharp):
    1.    [RequireComponent(typeof(Camera))]
    2.     public class SceneGizmo : MonoBehaviour
    3.     {
    4.     ....
    5.         private void Start()
    6.         {
    7.     ....
    8.             m_camera = GetComponent<Camera>();
    9.             m_camera.clearFlags = CameraClearFlags.Depth;
    10.             m_camera.renderingPath = RenderingPath.Forward;
    11.             m_camera.allowMSAA = false;
    12.             m_camera.allowHDR = false;
    13.     ....
    14.     }
    15.  
    16.     ....
    17.     }
    upload_2017-6-6_13-16-21.png
    Regards,
    Vadim
     
  9. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    https://forum.unity3d.com/threads/runtime-editor.470084/#post-3092624

    Here is code to clamp angles per object. Attach ClampAngles script to required objects and set Angle to desired value

    Code (CSharp):
    1. using Battlehub.RTCommon;
    2. using Battlehub.RTHandles;
    3. using System.Collections.Generic;
    4. using System.Linq;
    5. using UnityEngine;
    6.  
    7. public class ClampAngles : MonoBehaviour
    8. {
    9.     public float Angle = 45;
    10.     private const float DefaultAngle = 15;
    11.     private static RuntimeSelectionComponent m_selectionComponent;
    12.     static ClampAngles()
    13.     {
    14.        
    15.         RuntimeSelection.SelectionChanged += OnRuntimeSelectionChanged;
    16.         RuntimeTools.ToolChanged += OnToolChanged;
    17.     }
    18.  
    19.     private static void OnToolChanged()
    20.     {
    21.         TryUpdateRotationHandle();
    22.     }
    23.  
    24.     private static void OnRuntimeSelectionChanged(Object[] unselectedObjects)
    25.     {
    26.         TryUpdateRotationHandle();
    27.     }
    28.  
    29.     private static void TryUpdateRotationHandle()
    30.     {
    31.         if (RuntimeTools.Current != RuntimeTool.Rotate)
    32.         {
    33.             return;
    34.         }
    35.  
    36.         if (m_selectionComponent == null)
    37.         {
    38.             m_selectionComponent = FindObjectOfType<RuntimeSelectionComponent>();
    39.             if(m_selectionComponent == null)
    40.             {
    41.                 Debug.LogError("Unable to find RuntimeSelectionComponent");
    42.                 return;
    43.             }
    44.         }
    45.  
    46.         RotationHandle rotationHandle = m_selectionComponent.HandlesParent.GetComponentInChildren<RotationHandle>(true);
    47.         IEnumerable<ClampAngles> clampAngles = RuntimeSelection.gameObjects.Where(go => go.GetComponent<ClampAngles>() != null).Select(go => go.GetComponent<ClampAngles>());
    48.         if (clampAngles.Any())
    49.         {
    50.             rotationHandle.GridSize = clampAngles.Max(ca => ca.Angle);
    51.         }
    52.         else
    53.         {
    54.             rotationHandle.GridSize = DefaultAngle;
    55.         }
    56.     }
    57. }
    58.  
    To fix problems with Postion, Rotation, Scale, Grid, SceneView and other components, set SceneCamera field to your camera. Your camera should have GLCamera script attached.

    upload_2017-6-6_14-1-39.png

    upload_2017-6-6_14-2-16.png

    upload_2017-6-6_14-3-6.png

    upload_2017-6-6_14-4-12.png
     
  10. WalterEspinar

    WalterEspinar

    Joined:
    Aug 23, 2011
    Posts:
    81
    Thanks Vadim
     
  11. WalterEspinar

    WalterEspinar

    Joined:
    Aug 23, 2011
    Posts:
    81
    Hello Vadim, how i can clear the undo/redo data?
    solved
    RuntimeUndo.Purge();
     
    Last edited: Jul 4, 2017
    Vadim-Andriyanov likes this.
  12. robertodonati13

    robertodonati13

    Joined:
    Jul 13, 2017
    Posts:
    11
    Hi! Great work with this package, it's awesome
    I have a question, how do listbox and treeview work?? i can use them for create a hierarchy with only instantiated elements in the scene (like cubemen and blocks)?
     
  13. WalterEspinar

    WalterEspinar

    Joined:
    Aug 23, 2011
    Posts:
    81
    Dear Vadim,
    This line in LockAxes.cs Script don´t lock the Screen Rotation

    lockObject.RotationScreen = lockAxes.Any(la => la.RotationScreen);

    how can fix this?
     
  14. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hi, sorry for delay,

    you could use them as separate control for any hierarchical and non-hierarchical data,

    Regards,
    Vadim
     
  15. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hi modifiy OnDrag method of RotationHandle.cs (lines 417-422) like this:

    Code (CSharp):
    1.                 Vector3 axis = m_targetInverseMatrix.MultiplyVector(SceneCamera.cameraToWorldMatrix.MultiplyVector(-Vector3.forward));
    2.  
    3.                 if(!LockObject.RotationScreen)
    4.                 {
    5.                     rotation = Quaternion.AngleAxis(delta.x, axis);
    6.                 }
    Full code:

    Code (CSharp):
    1.  protected override void OnDrag()
    2.         {
    3.             float deltaX = Input.GetAxis("Mouse X");
    4.             float deltaY = Input.GetAxis("Mouse Y");
    5.  
    6.             deltaX = deltaX * XSpeed;
    7.             deltaY = deltaY * YSpeed;
    8.  
    9.             m_deltaX += deltaX;
    10.             m_deltaY += deltaY;
    11.  
    12.  
    13.             Vector3 delta = StartingRotation * Quaternion.Inverse(Target.rotation) * SceneCamera.cameraToWorldMatrix.MultiplyVector(new Vector3(m_deltaY, -m_deltaX, 0));
    14.             Quaternion rotation = Quaternion.identity;
    15.             if (SelectedAxis == RuntimeHandleAxis.X)
    16.             {
    17.                 Vector3 rotationAxis = Quaternion.Inverse(Target.rotation) * m_startingRotationAxis;
    18.  
    19.                 if (EffectiveGridUnitSize != 0.0f)
    20.                 {
    21.                     if (Mathf.Abs(delta.x) >= EffectiveGridUnitSize)
    22.                     {
    23.                         delta.x = Mathf.Sign(delta.x) * EffectiveGridUnitSize;
    24.                         m_deltaX = 0.0f;
    25.                         m_deltaY = 0.0f;
    26.                     }
    27.                     else
    28.                     {
    29.                         delta.x = 0.0f;
    30.                     }
    31.                 }
    32.  
    33.                 if(LockObject.RotationX)
    34.                 {
    35.                     delta.x = 0.0f;
    36.                 }
    37.  
    38.                 rotation = Quaternion.AngleAxis(delta.x, rotationAxis);
    39.             }
    40.             else if (SelectedAxis == RuntimeHandleAxis.Y)
    41.             {
    42.                 Vector3 rotationAxis = Quaternion.Inverse(Target.rotation) * m_startingRotationAxis;
    43.  
    44.                 if (EffectiveGridUnitSize != 0.0f)
    45.                 {
    46.                     if (Mathf.Abs(delta.y) >= EffectiveGridUnitSize)
    47.                     {
    48.                         delta.y = Mathf.Sign(delta.y) * EffectiveGridUnitSize;
    49.                         m_deltaX = 0.0f;
    50.                         m_deltaY = 0.0f;
    51.                     }
    52.                     else
    53.                     {
    54.                         delta.y = 0.0f;
    55.                     }
    56.                 }
    57.  
    58.                 if (LockObject.RotationY)
    59.                 {
    60.                     delta.y = 0.0f;
    61.                 }
    62.  
    63.                 rotation = Quaternion.AngleAxis(delta.y, rotationAxis);
    64.  
    65.             }
    66.             else if (SelectedAxis == RuntimeHandleAxis.Z)
    67.             {
    68.                 Vector3 rotationAxis = Quaternion.Inverse(Target.rotation) * m_startingRotationAxis;
    69.  
    70.                 if (EffectiveGridUnitSize != 0.0f)
    71.                 {
    72.                     if (Mathf.Abs(delta.z) >= EffectiveGridUnitSize)
    73.                     {
    74.                         delta.z = Mathf.Sign(delta.z) * EffectiveGridUnitSize;
    75.                         m_deltaX = 0.0f;
    76.                         m_deltaY = 0.0f;
    77.                     }
    78.                     else
    79.                     {
    80.                         delta.z = 0.0f;
    81.                     }
    82.                 }
    83.  
    84.                 if (LockObject.RotationZ)
    85.                 {
    86.                     delta.z = 0.0f;
    87.                 }
    88.  
    89.                 rotation = Quaternion.AngleAxis(delta.z, rotationAxis);
    90.  
    91.             }
    92.             else if (SelectedAxis == RuntimeHandleAxis.Free)
    93.             {
    94.                 delta = StartingRotationInv * delta;
    95.  
    96.                 if (LockObject.RotationX)
    97.                 {
    98.                     delta.x = 0.0f;
    99.                 }
    100.  
    101.                 if (LockObject.RotationY)
    102.                 {
    103.                     delta.y = 0.0f;
    104.                 }
    105.  
    106.                 if (LockObject.RotationZ)
    107.                 {
    108.                     delta.z = 0.0f;
    109.                 }
    110.  
    111.                 rotation = Quaternion.Euler(delta.x, delta.y, delta.z);
    112.                 m_deltaX = 0.0f;
    113.                 m_deltaY = 0.0f;
    114.             }
    115.             else
    116.             {
    117.                 delta = m_targetInverse * new Vector3(m_deltaY, -m_deltaX, 0);
    118.                 if (EffectiveGridUnitSize != 0.0f)
    119.                 {
    120.                     if (Mathf.Abs(delta.x) >= EffectiveGridUnitSize)
    121.                     {
    122.                         delta.x = Mathf.Sign(delta.x) * EffectiveGridUnitSize;
    123.                         m_deltaX = 0.0f;
    124.                         m_deltaY = 0.0f;
    125.                     }
    126.                     else
    127.                     {
    128.                         delta.x = 0.0f;
    129.                     }
    130.                 }
    131.  
    132.  
    133.                 Vector3 axis = m_targetInverseMatrix.MultiplyVector(SceneCamera.cameraToWorldMatrix.MultiplyVector(-Vector3.forward));
    134.  
    135.                 if(!LockObject.RotationScreen)
    136.                 {
    137.                     rotation = Quaternion.AngleAxis(delta.x, axis);
    138.                 }
    139.             }
    140.  
    141.             if (EffectiveGridUnitSize == 0.0f)
    142.             {
    143.                 m_deltaX = 0.0f;
    144.                 m_deltaY = 0.0f;
    145.             }
    146.  
    147.  
    148.             for (int i = 0; i < ActiveTargets.Length; ++i)
    149.             {
    150.                 ActiveTargets[i].rotation *= rotation;
    151.             }
    152.         }
    Regards,
    Vadim
     
  16. WalterEspinar

    WalterEspinar

    Joined:
    Aug 23, 2011
    Posts:
    81
    now it works, Thanks!
     
  17. robertodonati13

    robertodonati13

    Joined:
    Jul 13, 2017
    Posts:
    11
    Hi, how can i activate the selection of an object, and his handles, from a button and not only from raycast?? What function of what script should i call?
     
  18. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hi,
    to select object programmatically please use RuntimeSelection class

    Code (CSharp):
    1. using UnityEngine;
    2. using Battlehub.RTCommon;
    3.  
    4. public class Test : MonoBehaviour {
    5.  
    6.     public GameObject Obj;
    7.     // Use this for initialization
    8.     void Start () {
    9.         RuntimeSelection.activeObject = Obj;
    10.     }
    11. }
    12.  
     
  19. robertodonati13

    robertodonati13

    Joined:
    Jul 13, 2017
    Posts:
    11
    Thank you very much!
     
  20. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    Great Asset. However, looking through the code i can't figure out how to clamp position and scale of objects. Given i'm I'm not an amazing programmer, however is there a way for me to do it without interfering with Runtime Handles? I've a simple clamp script that updates every frame, but if the object is being dragged, it does not clamp until you let go of the handle. And even afterwards, it doesn't clamp properly. Is this a built in function? I can't seem to find it.
     
  21. robertodonati13

    robertodonati13

    Joined:
    Jul 13, 2017
    Posts:
    11
    Hi! I have another question for you, what function or bool variable i could call in my script to make a function event while i'm dragging an handle for change objects (move, rotation and also scale handles)?
    I need it for make an if(isDragging){}

    Thanks!
     
  22. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hello and thanks.

    You could try to use following clamp script. It simply use LateUpdate instead of Update and should clamp object postion correctly. Same could be done to localScale.
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class ClampPosition : MonoBehaviour {
    4.  
    5.     // Update is called once per frame
    6.     void LateUpdate () {
    7.  
    8.         Vector3 position = transform.position;
    9.         position.x = Mathf.Clamp(position.x, -5, 5);
    10.         position.y = Mathf.Clamp(position.y, -5, 5);
    11.         position.z = Mathf.Clamp(position.z, -5, 5);
    12.         transform.position = position;
    13.     }
    14. }
    15.  
    Regards,
    Vadim
     
  23. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hi, following script should do it:

    Code (CSharp):
    1. using Battlehub.RTCommon;
    2. using UnityEngine;
    3.  
    4. public class GetActiveTool : MonoBehaviour {
    5.  
    6.     private bool m_isToolActive = false;
    7.  
    8.     private void LateUpdate()
    9.     {
    10.         if(RuntimeTools.ActiveTool != null)
    11.         {
    12.             if(!m_isToolActive)
    13.             {
    14.                 m_isToolActive = true;
    15.  
    16.                 switch(RuntimeTools.Current)
    17.                 {
    18.                     case RuntimeTool.Move:
    19.                         Debug.Log("Begin movement");
    20.                         break;
    21.                     case RuntimeTool.Rotate:
    22.                         Debug.Log("Begin rotation");
    23.                         break;
    24.                     case RuntimeTool.Scale:
    25.                         Debug.Log("Begin scale");
    26.                         break;
    27.                 }
    28.  
    29.             }
    30.         }
    31.         else
    32.         {
    33.             if(m_isToolActive)
    34.             {
    35.                 m_isToolActive = false;
    36.  
    37.                 switch (RuntimeTools.Current)
    38.                 {
    39.                     case RuntimeTool.Move:
    40.                         Debug.Log("End movement");
    41.                         break;
    42.                     case RuntimeTool.Rotate:
    43.                         Debug.Log("End rotation");
    44.                         break;
    45.                     case RuntimeTool.Scale:
    46.                         Debug.Log("End scale");
    47.                         break;
    48.                 }
    49.             }
    50.         }
    51.     }
    52.  
    53. }
    54.  
     
  24. robertodonati13

    robertodonati13

    Joined:
    Jul 13, 2017
    Posts:
    11
    Thank you very much!
    And how can i remove the function for multiple selection of objects (drag and select all)?
     
  25. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hi, disable BoxSelection script
    upload_2017-10-12_10-51-55.png
     
  26. robertodonati13

    robertodonati13

    Joined:
    Jul 13, 2017
    Posts:
    11
  27. WalterEspinar

    WalterEspinar

    Joined:
    Aug 23, 2011
    Posts:
    81
    Hi!, "ClampAngles.cs" clamp angles pressing LeftCtrl, how i can clamp all rotation by default?
     
  28. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hi,

    go to Assets\Battlehub\RTCommon\Scripts\RuntimeTools.cs and set unitSnapping to true.
    Code (CSharp):
    1.     public static class RuntimeTools
    2.     {
    3.       ...............................
    4.  
    5.         private static bool m_unitSnapping = true;
    6.         public static bool UnitSnapping
    7.         {
    8.             get { return m_unitSnapping; }
    9.             set
    10.             {
    11.                 if(m_unitSnapping != value)
    12.                 {
    13.                     m_unitSnapping = value;
    14.                     if(UnitSnappingChanged != null)
    15.                     {
    16.                         UnitSnappingChanged();
    17.                     }
    18.                 }
    19.             }
    20.         }
    21.  
    22. ...............
     
  29. robertodonati13

    robertodonati13

    Joined:
    Jul 13, 2017
    Posts:
    11
    Hi! I have a problem with clicking handles. I create a series of cubes, all of them are next to each other with x++.
    All of them are in a hierarchy UI, and if i create a cube it creates also an UI element in hierarchy.
    If i select a cube the handles appear, but if the collider of the next cube is in the same place of an handle, when i click on the handle to move an object it selects the other cube in my hierarchy because it checks the click on his collider.
    I want to keep the object reference even if i click on his handles, can i solve this problem?
     
  30. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hi,
    could you send sample scene with this problem to Vadim.Andriyanov@outlook.com?
     
  31. robertodonati13

    robertodonati13

    Joined:
    Jul 13, 2017
    Posts:
    11
    I have already solved, thanks anyway! Sorry for losing you time
     
  32. WalterEspinar

    WalterEspinar

    Joined:
    Aug 23, 2011
    Posts:
    81
    Hi!, in Unity 2017.2 i have this error:

    Assets/Battlehub/RTSaveLoad/PersistentObjects/PersistentCamera.cs(49,6): error CS0619: `UnityEngine.Camera.stereoMirrorMode' is obsolete: `This property is no longer supported. Please use single pass stereo rendering instead.'
     
  33. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hi, here is quick fix for 2017.2 and 2017.3.0.f2

    There will be large update of RTHandles and RTEditor in Q1 2018
     

    Attached Files:

  34. WalterEspinar

    WalterEspinar

    Joined:
    Aug 23, 2011
    Posts:
    81
    Hi Vadim, how highlight on hover or in boxSelection?
     
  35. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hi, you could try something like this:

    here i simply modify material on mouse over,
    Assets\Battlehub\RTHandles\Scripts\RuntimeSelectionComponent.cs
    Code (CSharp):
    1.  
    2.         private GameObject m_mouseOverGO;
    3.         private Material m_material;
    4.         private void HighlightOnHover()
    5.         {
    6.             Ray ray = SceneCamera.ScreenPointToRay(Input.mousePosition);
    7.             RaycastHit hitInfo;
    8.  
    9.             if (Physics.Raycast(ray, out hitInfo, float.MaxValue))
    10.             {
    11.                 if (m_mouseOverGO != null)
    12.                 {
    13.                     Renderer renderer = m_mouseOverGO.GetComponentInChildren<Renderer>();
    14.                     if (renderer != null)
    15.                     {
    16.                         renderer.sharedMaterial = m_material;
    17.                     }
    18.                     m_mouseOverGO = null;
    19.                 }
    20.  
    21.                 m_mouseOverGO = hitInfo.collider.gameObject;
    22.                 if (m_mouseOverGO != null)
    23.                 {
    24.                     Renderer renderer = m_mouseOverGO.GetComponentInChildren<Renderer>();
    25.                     if (renderer != null)
    26.                     {
    27.                         m_material = renderer.sharedMaterial;
    28.  
    29.                         Material material = renderer.material;
    30.                         material.color = Color.green;
    31.  
    32.                         renderer.sharedMaterial = material;
    33.                     }
    34.                 }
    35.             }
    36.             else
    37.             {
    38.                 if (m_mouseOverGO != null)
    39.                 {
    40.                     Renderer renderer = m_mouseOverGO.GetComponentInChildren<Renderer>();
    41.                     if (renderer != null)
    42.                     {
    43.                         renderer.sharedMaterial = m_material;
    44.                     }
    45.                     m_mouseOverGO = null;
    46.                 }
    47.             }
    48.         }
    49.  
    50.  
    51.  
    52.         private void LateUpdate()
    53.         {
    54.             if (!Input.GetMouseButton(0))
    55.             {
    56.                 HighlightOnHover();
    57.             }

    For box selection you could do following:
    Go to BoxSelection.cs and add HitTest() method call inside of "else if (m_isDragging)" block

    Code (CSharp):
    1.  
    2.         private void LateUpdate()
    3.         {
    4.           ...........
    5.                 else if (m_isDragging)
    6.                 {
    7.                     GetPoint(out m_endPt);
    8.                     HitTest();
    9.           .....
    10.                 }
    11.             }
    12.         }
     
  36. HeavyProduction

    HeavyProduction

    Joined:
    Aug 12, 2016
    Posts:
    26
    Any update on when this will work on mobile? Just purchased this thinking it would work on mobile but now found out there is no touch support...
     
  37. WiredStedi

    WiredStedi

    Joined:
    Jun 12, 2017
    Posts:
    1
    any news regarding Unity 2018.1 ?
     
  38. amplesoap

    amplesoap

    Joined:
    Sep 6, 2017
    Posts:
    4
    Absolutely love the asset and have created a very powerful AR creation toolkit with it. It's improved the creative capabilities of what I had started with by leaps and bounds. So thank you for that!

    I'm trying to solve my last obstacle, which is attaching the handles (position, scale, rotation) to the camera transform position instead of to the instantiated gameObjects. This is because in AR, the handles are functional but very small. Oddly, increasing the scale of the handles decreases their functionality. I believe this is due to how they're instantiated in regards to a vector between the object and the camera.

    If I can move the handles closer to the camera, they'll be easier to manipulate for a user moving about the space.

    I appreciate any guidance and help. Thanks!
     

    Attached Files:

  39. HeavyProduction

    HeavyProduction

    Joined:
    Aug 12, 2016
    Posts:
    26
    Do you have this working on mobile? We was going to use this but was told it would not work properly on mobile.
     
  40. amplesoap

    amplesoap

    Joined:
    Sep 6, 2017
    Posts:
    4
    It took a fair amount of hacking, but yes--works on mobile.
     
  41. amplesoap

    amplesoap

    Joined:
    Sep 6, 2017
    Posts:
    4
    For anyone running into the same problem I did, you can make the handles more easily accessible in mobile AR by doing the following:

    1. Add the RT handles as a child to your camera object
    2. Increase their scale to 3
    3. Change each individual handle's transform.position vectors to the camera and have them update accordingly. This makes the handles accessible.

    All that's left is to change how close one has to be to the selected object to see the transform menu. If anyone has any guidance on this, I would appreciate it.
     
    HeavyProduction likes this.
  42. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    Is there a way to change the size at which the handles are rendered? I'm using resolution downscaling and what happens is the handles are rendered VERY big but the actual selection area is still the same.

    Example:

    https://imgur.com/a/omu1Bnb
     
  43. amplesoap

    amplesoap

    Joined:
    Sep 6, 2017
    Posts:
    4
    Any luck with this? I'm running into the same issue
     
  44. trafalmejo

    trafalmejo

    Joined:
    Sep 29, 2018
    Posts:
    3
    Hi guys, I just purchased this asset. I just imported the whole thing and I can not run even my project because i got this error.
    Assets/Battlehub/RTSaveLoad/Scripts/Implementation/Serializier.cs(39,30): error CS0508: `Battlehub.RTSaveLoad.Binder.BindToType(string, string)': return type must be `System.Type' to match overridden member `System.Runtime.Serialization.SerializationBinder.BindToType(string, string)'

    Anyone knows how to solve it?
     
  45. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Hi,
    try this fix
     

    Attached Files:

  46. robertodonati13

    robertodonati13

    Joined:
    Jul 13, 2017
    Posts:
    11
    Hi everyone, i'm using RT for a Standalone project, it all worked correctly but when i try to load a RT scene from another scene (menu) i get a bunch of errors and the handles do not work. any idea?
     
  47. robertodonati13

    robertodonati13

    Joined:
    Jul 13, 2017
    Posts:
    11
    NullReferenceException: Object reference not set to an instance of an object
    Battlehub.RTCommon.RTEComponent.GetDefaultWindow () (at Assets/Battlehub/RTCommon/Scripts/RTEComponent.cs:64)
    Battlehub.RTCommon.RTEComponent.Awake () (at Assets/Battlehub/RTCommon/Scripts/RTEComponent.cs:43)
     
  48. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Are you using latest version from asset store?
    As I remember I fixed this issue previously and with latest version I am unable to reproduce it.

    I tried to load demo scenes using following code:

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.SceneManagement;
    3.  
    4. public class SceneLoader : MonoBehaviour
    5. {
    6.     void Start()
    7.     {
    8.         SceneManager.LoadScene(0);
    9.     }
    10. }
    11.  
     
  49. WalterEspinar

    WalterEspinar

    Joined:
    Aug 23, 2011
    Posts:
    81
    Hello, how can chage the rotation camera input? i want to change from left mouse+Alt to right mouse + Alt
     
  50. Vadim-Andriyanov

    Vadim-Andriyanov

    Joined:
    Sep 22, 2015
    Posts:
    114
    Change GetPointer(0) to GetPointer(1) in RuntimeSceneInput.cs
    see screenshot

    upload_2019-10-22_10-23-15.png


    You can also send email to Vadim.Andriyanov@outlook.com and I will send you latest version with free move camera mode implemented.
     
unityunity