Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

[RELEASED] UModeler 2.0 : The Ultimate Modeling and Prototyping Tool in Unity

Discussion in 'Assets and Asset Store' started by UModeler, Mar 23, 2017.

  1. GamifyTheWorld

    GamifyTheWorld

    Joined:
    Aug 22, 2017
    Posts:
    89
    This is now officially my favorite asset.
     
    UModeler likes this.
  2. RoTru

    RoTru

    Joined:
    Jun 5, 2014
    Posts:
    37
    I'm having trouble creating even the most simple box shapes. Here for instance faces keep disspearing when using push pull and multi pushpull. It's also creating new edges with extruding without rhyme or reason. Latest version of Umodeler with latest version of Unity.

    Anybody know a stable version/combo?

    facesmissing.jpg
     
    Tethys likes this.
  3. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    186
  4. RoTru

    RoTru

    Joined:
    Jun 5, 2014
    Posts:
    37
    Umodeler's cursor/helper has ballooned in size about 5 times. Is there a setting for this? The documentation doesn't say. And reimporting the scripts hasn't reset it.

    Thank you!
     
  5. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    I tried several times to reproduce this but I failed. Do you remember the things you did before the boolean operation? How often does that happen?
    I would fix this if I figured out how to fix this. I've not found yet that Bevel and PushPull action cause such errors.
    You're welcome.
     
  6. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    I'll consider typing vertex local position in Transform tools. As a workaround for alignment, Tweak/Align tool might help to to fix vertices' positions. Here is a document - https://umodeler.github.io/tweaktools.html#align-tool
     
  7. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    I'm considering exposing script codes which will enable you to create a mesh procedurally.
     
    BeautifulRiver likes this.
  8. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Thank you for purchasing UModeler and your circumstantial account. I'll establish a system to give an access of source codes and various builds versions to people who has been authenticated via a website like this instead of emailing.
     
    faduci likes this.
  9. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Gizmos are also affected by scale in Transform component, which will be fixed in the upcoming update.
     
    RoTru likes this.
  10. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    It looks like the side polygon created by push/pull tool has been inverted, which is a bug absolutely. I'll test PushPull including multiple mode to fix some bugs.
     
  11. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Collider should be updated whenever any action ends because the collider connects with a mesh called 'um_xxxxx'.
    It might be solved by selecting "Tools/UModeler/Refresh All" in the menu.
    Thank you!
     
    RoTru likes this.
  12. BeautifulRiver

    BeautifulRiver

    Joined:
    Sep 19, 2016
    Posts:
    45
    Thanks for the reply. Glad to hear that the feature will be coming someday soon!
     
    UModeler likes this.
  13. Daski

    Daski

    Joined:
    May 8, 2017
    Posts:
    5
    Hello,
    Firstly I want to tell you that Umodeler is a great job, very good asset.
    Anyway this asset has its price so can you tell me about issue with prefabs without mesh? I have read solution about "refresh all" option in UModeler menu but it not solve the issue. Maybe I can see object on scene but still I can't saw object on preview window on prefab and prefab still do not have mesh. You can create new mesh for object so you cannot save it for this objects as new mesh? (with same name as object?)
    What is a status of this issue?

    Thank you for your attention :)
     
  14. SiBlack

    SiBlack

    Joined:
    Jun 12, 2013
    Posts:
    22
    The boolean error only happened once. I don't tend to boolean.

    The losing selection and options will happen quite often on the first edge bevel on a new object; multiple edges with 3 or more bevel segments. When I press space to finish the action, the inspector window will update and only show a limited number of options, similiar to if you had multiple objects selected. Close, Deselect/Reselect, Open fixes it.

    The edge bevel tool is also still spamming the error you fixed for push/pull.

    Loving the modeler though. V. fast for making detail objects to use with Surforge. :)
     
  15. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Thank you very much to the purchase!
    I thought this issue was solved. I'll check it out again and I'll fix it in the upcoming update.
     
  16. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Unfortunately I have not found that bug. I selected one edge and applied bevel to it. It worked fine. And I selected 4 edges and beveled them. It worked well. See the below gif. image. Could you probably show how this bug can be reproduced visually?
    UModeler_BevelToolTest.gif
    Actually I worked with the Surforge developer for a while to make UModeler work with Surforge well. As a result Wrapping up textures made with Surfage with UModeler mesh works very smoothly. I would like to make a video to showcase how both tools works in the future. Anyway I'm sure that UModeler+Surforge will be a nice combination.
     
    Razmot likes this.
  17. Daski

    Daski

    Joined:
    May 8, 2017
    Posts:
    5
    The mesh on mesh collider is not set.
    upload_2018-5-21_19-19-41.png

    and also I cannot find this mesh when I trying search.

    I have Umodeler from Asset store version: 2.0.9
    I trying export my object to prefab.

    Regards,
    Dawid
     
  18. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Hello Daski,
    Could you try to remove a collider and add it again in Misc/Collider tool in the inspector?
    "Assign Mesh" button will be added to the Collider tool below "Remove Collider" button in the upcoming update.
     
  19. Daski

    Daski

    Joined:
    May 8, 2017
    Posts:
    5
    I did as you said but mesh is still empty on mesh collider and mesh filter after export to prefab.
     
  20. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    334
    Hi, quick question.
    How do I save all my Hotkeys for Umodeler, so when creating a new project
    I can copy back all of my hotkeys?
    Thanks in advance

    EDIT, Ok I see that the hotkeys stay with new project but new Unity Install is different.
    So, do I just copy the Unity Settings folder or is there just one file that is important for the hotkeys?
     
    Last edited: May 25, 2018
  21. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    I'll take care of the issue. Thank you for the report.
     
  22. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    The hotkey data are handled as a editor preference so they are saved in the registry under the HKCU\Software\Unity Technologies\UnityEditor N.x on windows. (See this doc).
    I'll add an exporter to a .xml or .json to be imported to other unity versions.
     
  23. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    I've been looking forward to watching the video :)
     
  24. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    334
    Thanks, I have not forgotten. I will get around to it later on today at the latest I will upload it all tomorrow as I have time this weekend. I did do a video but I was not happy with it, so I decided to do it again as I also noticed some bugs while doing the video.
     
    UModeler likes this.
  25. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    334
    Here is a video

    later today I will upload the files
    ignore the key presses you see in the video as I am using my hotkey combination script
     
    UModeler likes this.
  26. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    334
    Anyone? Hello......
     
  27. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Hello,

    UModeler 2.1.0 has been released. I've been trying to apply your feedback given recently. The changes of this update are as follows. You can check them out here as well.
    • Feature : Export/import button in the Preference window to export/import shortcuts and general settings as a xml format.
    • Enhancement : Collider tool - Added Assign Mesh button to assign the current mesh to the mesh collider.
    • BugFix : Ballooned gizmos when scale in transform component has been changed.
    • BugFix : Not coming back to the previous mesh immediately after canceling action by pressing ESC
    The next update (Ver 2.1.1) will have been done sooner or later. It will perhaps contain things as below.
    • Export UV Charts to .png file.
    • Selection ability of being able to select only visible parts.
    • Video : Recording Getting Started video with subtitles.
    Stay tuned!
    tripolygon.
     
    tcmeric and red2blue like this.
  28. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    The idea of popup menu will need to be considered when the menu system is upgraded. Actually as you might already know I have a plan to add icons to each menu item. But simply adding icons won't improve usability a lot. Therefore I've been thinking about floating menu box and context popup menu which you mentioned. The way of you using UModeler in the video looked rather inconvenient so I would like to improve it.

    As for the hotkey demos it looks good entirely. And I come up with some questions while watching it.
    1. How does AutoIT script call UModeler function? The script just looks like sending a string in your video at about 1:13. It doesn't have information enough to connect each hot key to a corresponding UModeler function.
    2. How are the existing Unity/UModeler shortcuts processed after activating AutoIT script by pressing F7? Are they just ignored? or Do AutoIT hotkeys have higher priorities?
    As I mentioned before, UModeler has a search edit box which will enable you to find a tool by typing tool names. (Check it out here). I think this looks similar to your idea except that it needs pressing "Enter" every time and finding tools based on each tool name. Double hotkey system could be applied to it. Instead of typing a tool names already reserved double hotkeys would be typed and choose a proper tool.
    I tried to download it but it was failed because windows defender said that the .rar has a virus. It probably seems that .exe files in there causes that error. If I had to change the settings of the defender for downloading it, it would be risky.
    I'm sorry to let you wait. I love your video which motivated me to make UModeler tutorial videos as soon as possible.

    Thank you so much for making and sharing the video and hopefully it'll help other ppl to use UModeler easier.
     
    Last edited: Jun 5, 2018
    Razmot likes this.
  29. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    334
    This could work for combi hotkey with just one Unity script. Try it, script must be in Editor Folder
    It only works on a selected game object in the scene, which is also good. so make a cube and slect it.
    If this is not good programming, it is because I have no great programming skills, I am just googling and trying by doing

    I found this script and more here about the subject.
    https://answers.unity.com/questions/921989/get-keycode-events-in-editor-without-object-select.html


    Code (CSharp):
    1.      using UnityEngine;
    2.      using UnityEditor;
    3.      using System.Collections;
    4.  
    5.      // would be a lot of if else but would do the job.
    6.      // this script needs to be in a folder called Editor
    7.      // Then the keys will be recognised in editor.
    8.      // need to have an exit and restart for the hotkeys.
    9.      [CustomEditor(typeof(Transform))]
    10.  
    11.      // this is just one example of changing between polygon and pushpull
    12.      // of course you could then have e edge mode, ee extrude edge and so on.
    13.      public class MyScript : Editor
    14.      {
    15.          private int p = 0;
    16.      
    17.          void OnSceneGUI()
    18.          {
    19.              if (Event.current.isKey && Event.current.type == EventType.KeyDown)
    20.              {
    21.                  if (Event.current.keyCode == KeyCode.P && p == 0)
    22.                  {
    23.                      PolygonTool();
    24.                  }
    25.                  else if (Event.current.keyCode == KeyCode.P && p == 1)
    26.                  {
    27.                      PushPull();
    28.                  }
    29.              
    30.              }
    31.      
    32.          
    33.          }
    34.          void  PolygonTool()
    35.          {
    36.              Debug.Log("polygon ");
    37.              // increase so next press will be pushpull mode
    38.              p = 1;
    39.              // p pressed once shortcut polygon mode
    40.              // here send the shortcut
    41.          }
    42.          void PushPull(){
    43.              Debug.Log("pushpull ");
    44.              //p pressed twice, now send the shortcut for pushpull
    45.              // here send the shortcut
    46.              p = 0;
    47.              // reset so next press will be polygon mode
    48.          
    49.          }
    50.      }
     
    Last edited: Jun 5, 2018
  30. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    334
    Ok, I found an easier way to make combination key hotkeys for uModeler with just one script in unity
    using OnSceneGUI(), isKey and Event.current
    it is working the bits I have done and I will get it finished for friday. I wish now I could really code but I am getting there just with google and a little reading from the unity docs. Maybe I'll learn coding after all?
     
  31. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Does it mean Search edit box? If so, it was already posted in reply to your request before. Check it out here. This could be alternative to your suggestion for now.
     
    Last edited: Jun 7, 2018
  32. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    334
    Combination Hotkeys directly in Unity for uModeler and no AutoITT. It’s nearly done. I had problems first as I could not find a way to send keys in Unity. But I found a solution and it works very well. I just have to put in all the hotkeys now. If I knew how to just call the function for pushpull and the other functions I would not need the shortcuts. And I do not have the source code from uModeler. This will then just be one script and no need for AutoIT. This will still only work for windows and not mac.

    To the author, how could I call the tools when I get the source code from you? Which script do I call for push pull, edge extrude and so on?
    And no I do not mean search edit box.
     
  33. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    211
    Hi this may be a weird question but was wondering can this asset do any organic modelling like characters. Because I haven't seen any asset that can do this but I have seen you can do rigging in unity with puppet3d. It would save me time instead of using Autodesk Maya. I have been trying to do everything just in unity and haven't found an asset that does this.
     
  34. tcmeric

    tcmeric

    Joined:
    Dec 21, 2016
    Posts:
    73
    Seems like I have some vertex issues on 2.10, with Unity 2018.3f1. Looks like a bug. Didnt experience it before. Basically grabbing a vert to drag in some directions does not work. The mouse just comes off the vertex. I found the same issue with the edge extrusion tool. I found it over a few models. Here is a video of the problem:


    Also, I exported the model and attached it here. No errors on the console.
     

    Attached Files:

  35. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    620
    Between the occasional bug(I keep getting crashes due to the constant use of undo or random garbage when I try to create stuff) and some things just not working like they do in the video, I still am having a hell of a time getting this app to not waste a ton of my time on the simplest of operations, which only one gif shows - cutting out windows and doorways. Regardless, pushing a polygon through one wall to cut out through the back of it, a seemingly normal function that you showed off on my last response, doesn't work like it does in the video. I've been pulling my hair out on two projects trying to model simple walls with windows lol. For my last project, the only way to get it to work was to delete one side of the wall and reconstruct it, as trying to push the shape through it just creates garbage and never cuts through the wall on the other side, or to meticulously draw the same exact shapes on each side of the wall, delete the polygons on each side and then bridge in between. I need to create a hella ton of architecture and most of it features holes cut through the walls on both sides for various items - and this is the one function I just cannot get Umodeler to do for some reason. I'm up for suggestions. I see tons of windows and doors cut out of the buildings in the examples but never ways they are achieved. I really dont want to use boolean. In my example today Im doing archways with a rectangle door in the middle. I can draw the archway and try to push through, it doesn't work - the insides of the wall are bridged but the hole on the other side never gets cut out. I also tried then creating a new polygon with the draw rectangle tool, then select that and push/pull it through the wall and still it does not cut the shape out through the other side - just bridges the inside and gives me an incorrectly facing face on the end.

    **Update - I believe this issue happens when some kind of detail is added to one side of the mesh and something happens, breaking the faces so that box isn't whole anymore (I always start with the box tool for modeling modular walls). In last nights example I had added trim to the bottom and top of the inside of the wall, others details on the outside of the wall. After tinkering last night some more to try and sort this I found that if I pulled on the wall that was the issue, it wasn't welded anymore to the other pieces and there was some overlapping of an extra face. After removing that side and mirroring the other side to it, I was able to push shapes through the walls again from one side to the other. This happens a lot to me so for now on I'll start each walls design with the windows/doors/push-throughs, then move onto the details.
     
    Last edited: Jun 13, 2018
  36. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Thank you for your interest in UModeler.
    If many polygons were not involved character modeling would be possible. However UModeler has been developed focusing on modeling static meshes and prototyping so it would be better to use other DCC tools for organic modeling.
     
    Last edited: Jun 12, 2018
  37. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Codes of calling a tool are as follow.
    Code (CSharp):
    1. using tripolygon.UModeler
    2.  
    3. ...
    4.  
    5. // ToolFactory.FindToolIdentifier needs a tool name as a parameter.
    6. // The tool name is a display name in the inspector in which spaces are taken away and case-sensitive.
    7. // For example Remove Doubles is RemoveDoubles and Multi PushPull is MultiPushPull etc.
    8. ToolIdentifier toolId = ToolFactory.FindToolIdentifier("PushPull");
    9. if (toolId != ToolIdentifier.invalidID)
    10. {
    11.    BaseTool tool = ToolFactory.FindTool(toolId );
    12.    if (tool != null)
    13.       UModelerEx.SwitchTool(tool);
    14. }
     
  38. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    334

    Thanks for this. It works without the source code, so I am now rewriting the combo hotkeys to just call the functions.
    Then nobody even needs the shortcut list from me or AutoIT or even the Input Simulator..
    Much better thanks. I am learning a lot about coding because of this. So please still send me the source, I did send you and Email.

    I did actually finish now the hotkey system in Unity but now directly calling the functions is going to be much better I have to go to a birthday party today, so depending on how I feel after that I will do it tomorrow but I will start now.
     
    UModeler likes this.
  39. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    620
    My issue is still happening which is making using Umodeler a real hassle. Going to post a video so we can get a response. Draw a shape, try to push it through - doesn't cut the hole out on the other side. Another detail I noticed that seemed strange - on the opposite side, the offending wall that won't be pushed through, I also cannot draw shapes onto that wall. For some reason when I draw a shape it makes a new polygon on top of the wall, and I cannot push it through. :/

    After much tweaking tonight and deleting and replacing faces it never worked. So I recreated my base piece and started over and have been able to draw shapes and push them through again. Strange bug.

     
    Last edited: Jun 14, 2018
  40. therewillbebrad

    therewillbebrad

    Joined:
    Mar 2, 2018
    Posts:
    53
    I'm just popping in to say this asset is incredible and I can't imagine my current workflow without it. Thank you so much for this.
     
    lod3 and UModeler like this.
  41. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Sorry that I've tried several times to reproduce it but it failed. The gizmo arrow below the mouse should be highlighted in yellow but it isn't in the video. Does it also happen to the rotation and scale gizmos?
     
  42. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    You're welcome. I'm happy to hear that. UModeler will keep being updated for being a better asset. Stay tuned!
     
  43. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Currently I've been trying to find the reason of the bug regarding pushpull tool. I'll put an answer after figuring it out. Sorry for waiting for you.
     
    Tethys likes this.
  44. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    620
    Hey, dont get me wrong - I love your tool - it's amazing. I've spent the last 3 nights modeling architecture modular pieces that I integrated into Uconstruct for Astral Terra. Love it - just this one bug, which is on an important feature, has set me back a few times. Thanks for listening!
     
    UModeler likes this.
  45. Daski

    Daski

    Joined:
    May 8, 2017
    Posts:
    5
    Hello,
    it's me again. I still can't make prefab with mesh from game object :(
    Still I cant assign a mesh manually because something like um_xxx doesn't exist.
    It's working only when I create a crashed prefab (without mesh on collider), and click Apply button. Are you testing your changes after release? Please fix it as soon as possible. If you need a more information please contact.

    Thank you for your attention.
     
  46. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    334
    So here is a script that will allow you to use double keys for shortcuts in uModeler
    You just have to put this script in a folder called Editor and change 6 keys.
    It has to be in a folder called Editor

    This script name is uModelerComboKeys

    Change Unity rotate, scale, move keys to r, s, m
    Change uModeler shortcuts keys Transform/Polygon = Alt+P, Transform/Edge = Alt+E
    and Invert Faces = j

    That is it. To stop the script just remove it from the Editor folder and restart Unity.
    All of the shortcuts are listed in the script.

    I am not a programmer, so if anyone knows how to do it better then let me know. Even maybe a way to just turn on and off the script.

    Code (CSharp):
    1. // I am not a programmer, so if anyone knows how to do this better
    2. // then let me know eagleeyez@gmx.de
    3. using System.Collections.Generic;
    4.  
    5. using UnityEngine;
    6. using UnityEngine.UI;
    7. using WindowsInput;
    8. using UnityEditor;
    9. using tripolygon.UModeler;
    10.  
    11. // This script need to be placed in a Folder called Editor
    12. // In unity preference change keys to M for move tool, S for scale tool and R for rotate.
    13. // In uModeler shortcuts change
    14. // Invert Faces = J
    15. // Transform/Polygon = Alt+P
    16. // Transform/Edge = Alt+E
    17.  
    18. // Thats it, now when you playe a uModler in the scene
    19. // You will be able to use these shortcus.
    20.  
    21. // Sometimes you will have to Press Space Bar to do another shortcut
    22.  
    23.          // SHORTCUTS
    24. //Allign________________AL
    25. //3D Cursor_____________TD
    26. //Bake Transform________BT
    27. //Bevel    BE or___________BV
    28. //Boolean tool__________BO
    29. //Box / Cube____________BX or CU
    30. //Bridge________________BR
    31. //Clip__________________CP
    32. //Clone_________________CL
    33. //Coll-apse_____________CA
    34. //Collider______________CD
    35. //Collider Ojbect_______CO
    36. //Com-bine______________CB
    37. //Cut___________________CT
    38. //Detach________________DT
    39. //Draw Disk_____________DI
    40. //Drawing Line__________LI
    41. //Drawing Parallel______PA
    42. //Drawing Rectangle_____RT or RE
    43. //Drawing Side Stairs___SS
    44. //Duplicate_____________DU
    45. //Edge select___________E
    46. //Export________________EX
    47. //Extrude Edges_________EE
    48. //Flip__________________FL
    49. //Follow________________FO
    50. //Hide selected  
    51. //Inset_________________IN
    52. //Inverse Selection_____IS
    53. //Invert Face___________J or IF
    54. //Loop Slice____________LS
    55. //Material______________MA
    56. //Mirror________________MI or MR
    57. //Move tool Unity_______M
    58. //Move tool Unity_______MM
    59. //Pivot    PI or___________PV
    60. //Polygon Color_________PC
    61. //polygon select________P
    62. //Primative Cap-sule____CS
    63. //Primative Cone________CN
    64. //Primative Cylinder____CY
    65. //Primative Room________RO
    66. //Push Pull_____________PP
    67. //Push Pull Multi_______Mu or MP
    68. //Remove doubles________RD
    69. //Ring Select___________RI
    70. //Rotate Unity tool_____R
    71. //Scale Unity tool______S
    72. //Select All / Nome_____SA
    73. //SelectIsolated________SI
    74. //Smoothing Group_______SG
    75. //Sphere________________SP
    76. //UV____________________uv
    77. //UV Editor_____________UE
    78. //Vertex Color__________VC
    79. //Vertex select_________V
    80. //Stairs________________ST
    81. //ARC___________________AR,     AC
    82. //SnaP__________________SN,
    83. // Show Trianulation____TT
    84. // Status HUD on/off____HH
    85. // Input Display on/off KK
    86.  
    87. [CustomEditor(typeof(Transform))]
    88.  
    89. public class uModelerComboKeys : Editor
    90. {
    91.     InputSimulator IS;
    92.  
    93.     private int check = 0;
    94.     private string code1;
    95.     private string code2;
    96.     private string combo;
    97.     private string myTool;
    98.     private bool getStatus = false;
    99.     //Test for first key
    100.  
    101.     void OnSceneGUI()
    102.     {
    103.         Event e = Event.current;
    104.  
    105.         if (e.isKey && Event.current.type == EventType.KeyUp && check == 0)
    106.         {
    107.  
    108.             check = 1;
    109.             code1 = e.keyCode.ToString();
    110.          
    111.  
    112.            
    113.                 if (code1 == "P")
    114.                 {
    115.                     SetTool2("Polygon");
    116.                 }
    117.                 else if (code1 == "E")
    118.                 {
    119.                     SetTool2("Edge");
    120.                 }
    121.             else if (code1 == "Backspace")
    122.             {
    123.                 SetTool2("Edge");
    124.             }
    125.  
    126.  
    127.         }
    128.             else if (code1 == "Space")
    129.             {
    130.                 Space();
    131.             }
    132.  
    133.  
    134.  
    135.  
    136.         // Test second key
    137.             else if (e.isKey && Event.current.type == EventType.KeyUp && check == 1)
    138.             {
    139.                 code2 = e.keyCode.ToString();
    140.                 Debug.Log("Not P 2: " + code2);
    141.                 combo = code1 + code2;
    142.                 Debug.Log("Combo : " + combo);
    143.                 check = 0;
    144.  
    145.             }
    146.  
    147.             //
    148.             //
    149.             // Combo HotkeySs
    150.             //
    151.             //
    152.  
    153.  
    154.  
    155.             /* Align  */
    156.             else if (combo == "AL")
    157.             {
    158.                 SetTool("Align");
    159.             }
    160.             /*3D Cursor */
    161.             else if (combo == "TD")
    162.             {
    163.                 SetTool("Cursor");
    164.             }
    165.             /*Bake Transform */
    166.             else if (combo == "BT")
    167.             {
    168.                 SetTool("BakeTransform");
    169.             }
    170.             /* Bevel */
    171.             else if (combo == "BE")
    172.             {
    173.                 SetTool("Bevel");
    174.             }
    175.             /* Boolean */
    176.             else if (combo == "BO")
    177.             {
    178.                 SetTool("Boolean");
    179.             }
    180.             /*Box  */
    181.             else if (combo == "BX" || combo == "CU")
    182.             {
    183.                 SetTool("Box");
    184.             }
    185.             /* Bridge */
    186.             else if (combo == "BR")
    187.             {
    188.                 SetTool("Bridge");
    189.             }
    190.             /* Clip */
    191.             else if (combo == "CP")
    192.             {
    193.                 SetTool("Clip");
    194.             }
    195.             /* Clone */
    196.             else if (combo == "CL")
    197.             {
    198.                 SetTool("Clone");
    199.             }
    200.             /* Collapse */
    201.             else if (combo == "CA")
    202.             {
    203.                 SetTool("Collapse");
    204.             }
    205.             /* ´Cóllider */
    206.             else if (combo == "CD")
    207.             {
    208.                 SetTool("Collider");
    209.             }
    210.             /*  Collider Object */
    211.             else if (combo == "CO")
    212.             {
    213.                 SetTool("NewColliderObject");
    214.             }
    215.             /*Game Object */
    216.             else if (combo == "GO")
    217.             {
    218.                 SetTool("NewObject");
    219.             }
    220.             /* Combine */
    221.             else if (combo == "CB")
    222.             {
    223.                 SetTool("Combine");
    224.             }
    225.             /* Cut */
    226.             else if (combo == "CT")
    227.             {
    228.                 SetTool("Cut");
    229.             }
    230.             /* Detach */
    231.             else if (combo == "DT")
    232.             {
    233.                 SetTool("Detach");
    234.             }
    235.             /* Draw Disk */
    236.             else if (combo == "DI" || combo == "DD")
    237.             {
    238.                 SetTool("Disk");
    239.             }
    240.             /* Draw Line */
    241.             else if (combo == "DL" || combo == "LI")
    242.             {
    243.                 SetTool("Line");
    244.             }
    245.             /* Draw Parallel */
    246.             else if (combo == "DP" || combo == "PA")
    247.             {
    248.                 SetTool("Parallel");
    249.             }
    250.             /* Draw Rectangle */
    251.             else if (combo == "DR" || combo == "RT")
    252.             {
    253.                 SetTool("RoundedRectangle");
    254.  
    255.  
    256.             }
    257.             /* Draw Side Stairs */
    258.             else if (combo == "SS")
    259.             {
    260.                 SetTool("SideStair");
    261.             }
    262.             /* Duplicate */
    263.             else if (combo == "DU")
    264.             {
    265.                 SetTool("Duplicate");
    266.             }
    267.             /* Export */
    268.             else if (combo == "EX")
    269.             {
    270.                 SetTool("Export");
    271.             }
    272.             /* Extrude Edge */
    273.             else if (combo == "EE")
    274.             {
    275.                 SetTool("ExtrudeEdge");
    276.             }
    277.             /* Flip */
    278.             else if (combo == "FP" || combo == "FL")
    279.             {
    280.                 SetTool("Flip");
    281.             }
    282.             /* Follow */
    283.             else if (combo == "FO" || combo == "FW")
    284.             {
    285.                 SetTool("Follow");
    286.             }
    287.             /* Inset */
    288.             else if (combo == "IN")
    289.             {
    290.                 SetTool("Inset");
    291.             }
    292.             /* Increase Selection Add */
    293.             else if (combo == "AD")
    294.             {
    295.                 SetTool("IncreaseSelect");
    296.             }
    297.             /* Invert Selection */
    298.             else if (combo == "IS")
    299.             {
    300.                 SetTool("InvertSelect");
    301.             }
    302.             /* Loop Slice */
    303.             else if (combo == "LS" || combo == "SL")
    304.             {
    305.                 SetTool("LoopSlice");
    306.             }
    307.             /* Material */
    308.             else if (combo == "MA" || combo == "MT")
    309.             {
    310.                 SetTool("Material");
    311.             }
    312.             /* Mirror */
    313.             else if (combo == "MI" || combo == "MR")
    314.             {
    315.                 SetTool("Mirror");
    316.             }
    317.             /* Pivot */
    318.             else if (combo == "PI" || combo == "PV")
    319.             {
    320.                 SetTool("Pivot");
    321.             }
    322.             /* Polygon Color */
    323.             else if (combo == "PC")
    324.             {
    325.                 SetTool("PolygonColor");
    326.             }
    327.             /* Polygon Group */
    328.             else if (combo == "PG")
    329.             {
    330.                 SetTool("PolygonGroup");
    331.             }
    332.             /* Capsule */
    333.             else if (combo == "CS")
    334.             {
    335.                 SetTool("Capsule");
    336.             }
    337.             /* Cone */
    338.             else if (combo == "CN")
    339.             {
    340.                 SetTool("Cone");
    341.             }
    342.             /* Cylinder */
    343.             else if (combo == "CY" || combo == "TU")
    344.             {
    345.                 SetTool("Cylinder");
    346.             }
    347.             /* Room */
    348.             else if (combo == "RO" || combo == "RM")
    349.             {
    350.                 SetTool("Room");
    351.             }
    352.             /* Push Pull */
    353.             else if (combo == "PP")
    354.             {
    355.                 SetTool("PushPull");
    356.             }
    357.             /* Multi Push Pull */
    358.             else if (combo == "MU" || combo == "MP")
    359.             {
    360.                 SetTool("PushPullMultiple");
    361.             }
    362.             /* Remove Doubles */
    363.             else if (combo == "RD")
    364.             {
    365.                 SetTool("RemoveDoubles");
    366.             }
    367.             /* Ring Select */
    368.             else if (combo == "RI" || combo == "RS")
    369.             {
    370.                 SetTool("RingSelect");
    371.  
    372.             }
    373.             /* Select all/none */
    374.             else if (combo == "SA")
    375.             {
    376.                 SetTool("SelectAll");
    377.             }
    378.         /* Backspace set to Edgemode */
    379.         else if (combo == "BackspaceBackspace")
    380.         {
    381.             SetTool("Edge");
    382.         }
    383.         /* Select Isolated */
    384.         else if (combo == "SI")
    385.             {
    386.                 SetTool("IsolatedSelect");
    387.             }
    388.             /* Select Loop */
    389.             else if (combo == "LO" || combo == "LP")
    390.             {
    391.                 SetTool("LoopSelect");
    392.  
    393.             }
    394.             /* Smoothing Groups */
    395.             else if (combo == "SG")
    396.             {
    397.                 SetTool("SmoothingGroup");
    398.             }
    399.             /* Sphere */
    400.             else if (combo == "SP")
    401.             {
    402.                 SetTool("Sphere");
    403.             }
    404.             /* UV */
    405.             else if (combo == "UV")
    406.             {
    407.                 SetTool("UV");
    408.             }
    409.             /* UV Editor */
    410.             else if (combo == "UE")
    411.             {
    412.                 SetTool("OpenUVEditor");
    413.             }
    414.             /* Vertex Color */
    415.             else if (combo == "VC")
    416.             {
    417.                 SetTool("VertexColor");
    418.             }
    419.             /* Draw Stairs */
    420.             else if (combo == "ST")
    421.             {
    422.                 SetTool("Stair");
    423.             }
    424.             /* Arc Tool */
    425.             else if (combo == "AR" || combo == "DA")
    426.             {
    427.                 SetTool("Arc");
    428.             }
    429.             /* Snap */
    430.             else if (combo == "SN")
    431.             {
    432.                 SetTool("Snap");
    433.             }
    434.             /* Input Viewer */
    435.             else if (combo == "KK")
    436.             {
    437.                 code1 = "";
    438.                 code2 = "";
    439.                 combo = "";
    440.                 check = 0;
    441.  
    442.                 getStatus = UModelerSettings.inputViewer;
    443.  
    444.                 if (getStatus == true)
    445.                 {
    446.                     UModelerSettings.inputViewer = false;
    447.                 }
    448.                 else if (getStatus == false)
    449.                 {
    450.                     UModelerSettings.inputViewer = true;
    451.  
    452.                 }
    453.             }
    454.             /*  Status Hud */
    455.             else if (combo == "HH")
    456.             {
    457.                 code1 = "";
    458.                 code2 = "";
    459.                 combo = "";
    460.                 check = 0;
    461.  
    462.                 getStatus = UModelerSettings.displayStatusHud;
    463.  
    464.                 if (getStatus == true)
    465.                 {
    466.                     UModelerSettings.displayStatusHud = false;
    467.                 }
    468.                 else if (getStatus == false)
    469.                 {
    470.                     UModelerSettings.displayStatusHud = true;
    471.  
    472.                 }
    473.             }
    474.             /*  Eable Snap */
    475.             else if (combo == "ES")
    476.             {
    477.                 code1 = "";
    478.                 code2 = "";
    479.                 combo = "";
    480.                 check = 0;
    481.  
    482.                 getStatus = UModelerSettings.snapEnable;
    483.  
    484.                 if (getStatus == true)
    485.                 {
    486.                     UModelerSettings.snapEnable = false;
    487.                 }
    488.                 else if (getStatus == false)
    489.                 {
    490.                     UModelerSettings.snapEnable = true;
    491.  
    492.                 }
    493.             }
    494.             /*  Triangulation Snap */
    495.             else if (combo == "TT")
    496.             {
    497.                 code1 = "";
    498.                 code2 = "";
    499.                 combo = "";
    500.                 check = 0;
    501.  
    502.                 getStatus = UModelerSettings.displayTriangulation;
    503.  
    504.                 if (getStatus == true)
    505.                 {
    506.                     UModelerSettings.displayTriangulation = false;
    507.                 }
    508.                 else if (getStatus == false)
    509.                 {
    510.                     UModelerSettings.displayTriangulation = true;
    511.  
    512.                 }
    513.             }
    514.             /*  Pivot To Center */
    515.             else if (combo == "CE")
    516.             {
    517.                 SetTool("PivotToCenter");
    518.  
    519.             }
    520.             /*  Flattern */
    521.             else if (combo == "FE")
    522.             {
    523.                 SetTool("Flattern");
    524.             }
    525.             /*  Invert Face */
    526.             else if (combo == "IF")
    527.             {
    528.                 SetTool("InvertFace");
    529.             }
    530.         } // End if key
    531.    
    532.  
    533.  
    534.  
    535.     //  functions
    536.     void Polygon()
    537.     {
    538.  
    539.         //check = 1;
    540.         //code2 = "";
    541.         //combo = "";
    542.  
    543.         Debug.Log("Polygon");
    544.         ToolIdentifier toolId = ToolFactory.FindToolIdentifier("Polygon");
    545.         if (toolId != ToolIdentifier.invalidID)
    546.         {
    547.             BaseTool tool = ToolFactory.FindTool(toolId);
    548.             if (tool != null)
    549.                 UModelerEx.SwitchTool(tool);
    550.         }
    551.     }
    552.     void Space()
    553.     {
    554.        
    555.             check = 0;
    556.             code1 = "";
    557.             code2 = "";
    558.             combo = "";
    559.  
    560.             Debug.Log("Space down");
    561.             ToolIdentifier toolId = ToolFactory.FindToolIdentifier("Polygon");
    562.             if (toolId != ToolIdentifier.invalidID)
    563.             {
    564.                 BaseTool tool = ToolFactory.FindTool(toolId);
    565.                 if (tool != null)
    566.                     UModelerEx.SwitchTool(tool);
    567.             }
    568.     }
    569.     void Edge()
    570.     {
    571.         check = 1;
    572.         Debug.Log("Edge");
    573.         ToolIdentifier toolId = ToolFactory.FindToolIdentifier("Edge");
    574.         if (toolId != ToolIdentifier.invalidID)
    575.         {
    576.             BaseTool tool = ToolFactory.FindTool(toolId);
    577.             if (tool != null)
    578.                 UModelerEx.SwitchTool(tool);
    579.         }
    580.     }
    581.     void SetTool(string myTool)
    582.     {
    583.         combo = "";
    584.         check = 0;
    585.        
    586.         Debug.Log(myTool);
    587.         ToolIdentifier toolId = ToolFactory.FindToolIdentifier(myTool);
    588.         if (toolId != ToolIdentifier.invalidID)
    589.         {
    590.             BaseTool tool = ToolFactory.FindTool(toolId );
    591.             if (tool != null)
    592.                 UModelerEx.SwitchTool(tool);
    593.         }
    594.     }
    595.     void SetTool2(string myTool)
    596.     {
    597.         combo = "";
    598.         //code1 = "E";
    599.         check = 1;
    600.  
    601.  
    602.         Debug.Log(myTool);
    603.         ToolIdentifier toolId = ToolFactory.FindToolIdentifier(myTool);
    604.         if (toolId != ToolIdentifier.invalidID)
    605.         {
    606.             BaseTool tool = ToolFactory.FindTool(toolId);
    607.             if (tool != null)
    608.                 UModelerEx.SwitchTool(tool);
    609.         }
    610.     }
    611. }
    612.  
     

    Attached Files:

    UModeler likes this.
  47. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    334
    Here is a quick video showning the combo key script
     
    UModeler and tcmeric like this.
  48. neXib

    neXib

    Joined:
    Aug 22, 2017
    Posts:
    6
    Hi. I am using Umodeler 2 to prototype in my level, but I have problems with aligning even the simplest shapes. I suspect I am using the wrong mode so all my push pull and similar operations happens locally or something.

    Because I push pull some shapes on my hallway and when I pull it to the other side (which is essentially a long box with an extruded wall) things don't match up, it's skewed. Can anyone point me to what setting or whatever I'm doing wrong? I have the Gizmo on frame global, I assume that should be correct, but does that control everything in relation to space things happen in?
     
  49. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    How did you make the prefab? Please describe it in detail. I would like to figure it out.
     
  50. UModeler

    UModeler

    Joined:
    Oct 15, 2016
    Posts:
    250
    Hello neXib,
    Do you have a trouble with pushing/pulling a polygon and cutting out the opposite polygon with Border Check property enabled?
     
    Last edited: Jun 18, 2018