Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Runtime Level Design

Discussion in 'Assets and Asset Store' started by XGT08, Jan 17, 2016.

  1. lizzilizzi

    lizzilizzi

    Joined:
    Apr 5, 2015
    Posts:
    7
    Thank you, that helped for one of the assets, but not for the other one. Not sure why.

    I am however, getting some performance issues when the Read/Write on the mesh is enabled. My game now freezes when I spawn in the asset using RLD.

    I noticed there is an ObjectPool script. Is the ObjectPool loading all prefabs at Start, or does it pool the objects once spawned in the scene with RLD?

    Cheers
     
  2. lizzilizzi

    lizzilizzi

    Joined:
    Apr 5, 2015
    Posts:
    7
    How would I activate the move gismo by code?

    Say I have an object selected, and instead of pressing the key to activate the move gismo, I wanted to call it from code.


    Thanks
     
  3. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    You can use the following code:
    Code (CSharp):
    1. RTObjectSelectionGizmos.Get.SetWorkGizmo(ObjectSelectionGizmoId.MoveGizmo);
     
  4. Mikechari

    Mikechari

    Joined:
    Dec 29, 2021
    Posts:
    7
    Hi thanks for the amazing package, I was wondering if there is a way to adapt the new input system to the actual implementation. Also if there is a possibility to change the camera mode to a custom one with different hotkeys.

    Thanks!
     
  5. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    The package supports both the old and the new Input system and most hotkeys can be configured via the Inspector. Including the camera specific ones.

    I am not sure what you mean by camera mode, but the idea is that you can change the camera hotkeys if you wish. You can also disable the camera script input handling off from the Inspector in case you have your own camera script that moves the camera in the scene.

    Cheers,
    Andrew
     
  6. Mikechari

    Mikechari

    Joined:
    Dec 29, 2021
    Posts:
    7
    Hello and thanks for the prompt reply I will take a look into it,

    We also have acquired the Runtime spawner and we would like to combine the two of them to make or map creation using only some features of RLD, for example

    - using all the movement of pieces using spawner and not gizmos
    - using the extruder of the RLD to duplicate pieces in one specific axis

    We are just starting with unity and we would like to see if you are available for payed mentorship to show us how we can make this kind of things happen.

    If you interested please let me know at andium@gmail.com

    Thank a lot!
     
  7. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    I'm afraid that won't be possible. I do however offer support for my packs for free so feel free to ask any questions that might arise.

    All the Best,
    Andrew
     
  8. Mikechari

    Mikechari

    Joined:
    Dec 29, 2021
    Posts:
    7
    Hello Andrew

    Oh ok :( , still thanks in advance for your time answering questions

    Can you elaborate a bit on this like how do i actually link my input system file to your packages? I am getting this 3 errors when I try to run RTD out of the box:
    upload_2022-1-24_10-33-2.png

    Also i saw in few years back posts that there is a "manual" for using RTD? is there any other documentation besides the API page and the youtube videos?

    Thanks again and sorry if my questions are noobish still getting there :)
     
  9. Mikechari

    Mikechari

    Joined:
    Dec 29, 2021
    Posts:
    7
    Hello Andrew any update on this? I am kind of stuck with the input system

    I have my project build around the new input system and I still cant find a way to adapt it to RLD I tried to start at MouseInputDevice.cs and change the Input. parameters to the new input system, but from there the old input system is all over the code.

    How I can use the new input system with RLD?

    Thanks in advance! :)
     
  10. lizzilizzi

    lizzilizzi

    Joined:
    Apr 5, 2015
    Posts:
    7
    Hey Andrew,

    Thank you for the support so far, it's been a huge help.

    I've noticed that my fbx assets exported from blender are not selectable on click, even with the read/write access ticked. When I open that same asset in 3DS Max and export as a .3ds and tick read/write, the asset is now selectable with a click.

    Any idea why the Blender .fbx asset does not work, but the .3ds one does?

    This might not be something you can help with, but I thought I'd post it just in case you or someone else has been able to fix this issue. I'd like to use Blender/fbx cos it's free, and hoping I won't need to use 3DS for the assets.


    Thanks :)
     
  11. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    I'm afraid I have no idea what could be causing this :). FBX files should work with no issue. Maybe there are import settings that have to be set. Can you please click on a FBX model and show me how the Inspector looks like? Who knows, maybe I can figure something out :D

    Cheers,
    Andrew
     
  12. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    Ahhh... Sorry about this. I have 2 packs: Runtime Transform Gizmos and Runtime Level design and it seems I only support the new Input system for the first one, RTG. However, there is no reason why RLD shouldn't support it also. So please give me some time and I will get back to you :)

    Cheers,
    Andrew
     
    Mikechari likes this.
  13. Mikechari

    Mikechari

    Joined:
    Dec 29, 2021
    Posts:
    7
    Hello, I guess this reply was for me :p, sure thanks for looking into it really appreciate it, I will be around. :)

    Cheers
     
    XGT08 likes this.
  14. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Yes indeed :D The reply was intended for you :)
     
  15. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    I have submitted an updated version on the store. It should be available for download in say about 15-20 minutes.

    The only thing you need to remember is that you will need to go to Edit->Project Settings->Player and set the Active Input handling to Both. This is necessary because there were some things I couldn't figure out how to do with the New Input System and in those cases I still use the old one.

    Cheers,
    Andrew
     
    Mikechari likes this.
  16. Mikechari

    Mikechari

    Joined:
    Dec 29, 2021
    Posts:
    7
    Hey Andrew I will give it a try

    If I can help with anything I followed this migration guide for old to new input systems, I hope it helps!

    https://docs.unity3d.com/Packages/com.unity.inputsystem@0.9/manual/Migration.html

    Thanks!
    Mike
     
  17. Mikechari

    Mikechari

    Joined:
    Dec 29, 2021
    Posts:
    7
    Hi Andrew,

    I have a question related to the RTPrefabLibDb creator, I would like to have two different ones, one for the map parts and another for player tokens, Is there an option for this?

    Or maybe have a way to hide certain libraries based on a condition, and show another ones?

    And another question

    When one or many elements are selected the default mode is move gizmo is there an option to set the default mode when selectin one or many objects to object2object snap instead?

    Also is there an option to show the green box that appears when move gizmo is on (the one that shows the selected element), but on the object2object snap?

    Thanks in advance!
     
    Last edited: Feb 3, 2022
  18. lizzilizzi

    lizzilizzi

    Joined:
    Apr 5, 2015
    Posts:
    7
    Hi Andrew,
    I've attached the Unity inspector settings of one of the FBX models. potplant fbx inspector.PNG
     
  19. jtdev

    jtdev

    Joined:
    Apr 13, 2014
    Posts:
    12
    Hello, Andrew, thank you for such a great asset!

    We are trying to make it work in URP with Base/Overlap cameras and are having gizmo rendering issues. Hope you can help!

    We have a simple base camera and an overlap camera (for ui).

    After setting up all the correct layers for objects and cameras, if the overlap camera is enabled the gizmos are rendered multiple times in different spaces on screen.

    We have tried adding the Overlap camera to the camera ignore list to RLD and that did not work.

    Looking at the gizmo rendering code it seems to properly do camera checks, and placing breakpoints shows it's only being called once for the base camera.

    The gizmo still renders for different cameras. I suspect this might be an issue with the grid and other GL render code.

    Update: I tried it with two base cameras and had the same issue. Any combination of base/overlap cameras seem to render the gizmo and it can't be culled.

    Any help would be appreciated, thanks!
     
    Last edited: Mar 7, 2022
  20. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hello,

    I am trying to create a small setup to test this, but having not much experience with URP, I don't know exactly what I am doing :) I created a base camera and an overlay camera and I wanted to change the viewport size of the overlay camera so that I can check if both cameras render the gizmos, but the viewport is missing in URP cameras.

    Can you please describe your setup in more detail? Or maybe just send me a package which can be used to reproduce the issue?

    Thanks,
    Andrew
     
  21. dmenefee

    dmenefee

    Joined:
    Oct 14, 2019
    Posts:
    129
    Hello. I just started playing with this and ran the demo. It appears that object dragging is very unreliable. Very occasionally, when I select and then click one of the arrows on the move gizmo, the object moves. Most of the time, when I click and then start dragging the mouse, the selection is changed to whatever is under the mouse at that moment. What am I missing? I haven't changed anything; it's a clean install. I have both new and old input systems enabled, too. I couldn't find any demo readme to help me with setup issues...

    Edit: if I turn on VSync, the move gizmos start working normally. If this is expected behavior, please add it to the setup documentation so others who have turned off VSync won't have the same problem. Thanks!
     
    Last edited: Mar 11, 2022
  22. jtdev

    jtdev

    Joined:
    Apr 13, 2014
    Posts:
    12
    Hi, I have put together a clean URP sample project to demonstrate the multi camera rendering issue.

    I have added 2 cameras to the scene, one base cam and one overlay cam. Each cam has it's culling mask set to the proper layer (base is world objects, overlay is ui). You can see when you Play the scene the bounding and gizmos render multiple times.

    Hope this helps debug, and maybe I'm just doing something silly and it's an easy fix :)

    Picture showing the issue
    https://1drv.ms/u/s!AigyjzR2iHxwhdh18a6WTLlhD40h2w?e=Mhn5pw

    Unity 2020.3 project
    https://1drv.ms/u/s!AigyjzR2iHxwhdh2UKfA39t4W8tqhQ?e=zuEvts

    Thanks!
     
  23. vishal

    vishal

    Joined:
    Aug 8, 2012
    Posts:
    14
    Hi Andrew,

    I'm using your asset for app development. I have some query

    1. How to enable/disable vertex snapping
    2. How do we know which objects have been deleted (To unregister from another module)
    3. When is your plugin going to have HDRP support?
     
  24. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    VSync is not required. It should work either way. Just make sure that when you click and drag you are actually clicking on the gizmo. If you click on the object, then the selection will be updated accordingly. So click and drag on the gizmos handles :)

    Cheers,
    Andrew
     
    dmenefee likes this.
  25. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    Thanks a lot! :) I will take a look at this ASAP.

    Cheers,
    Andrew
     
  26. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    Thanks for contacting me :)

    1.
    Code (CSharp):
    1. RTObjectSelectionGizmos.Get.GetGizmoById((int)ObjectSelectionGizmoId.MoveGizmo).UseVertSnapEnableHotkey = false;
    2.
    Code (CSharp):
    1. RTObjectSelection.Get.WillBeDeleted += OnSelectionWillBeDeleted;
    where OnSelectionWillBeDeleted should look like this:

    Code (CSharp):
    1. private void OnSelectionWillBeDeleted(List<GameObject> parents)
    2. {
    3.     // Do stuff ...
    4. }
    Note: Please send me an e-mail (octamodius@yahoo.com) for this second point so that I can send you an updated pack. I had to change the WillBeDeleted event to accept the list of objects to be deleted.

    3. Not currently planed and I don't know if/when it will be available.

    Cheers,
    Andrew
     
  27. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    I was just about to start implementing a solution only to realize that it is already implemented. :)
    You should get the right results by calling the following function:
    Code (CSharp):
    1. RTObjectSelection.Get.AddRenderIgnoreCamera(ignoredCamera);
    Cheers,
    Andrew
     
  28. dmenefee

    dmenefee

    Joined:
    Oct 14, 2019
    Posts:
    129
    Thanks! I was very careful to click only on handles, even adjusting my camera angle to avoid any chance of accidentally clicking elsewhere, zooming in, etc. It seems that my machine performance may play a part, as without turning on VSync in the editor I get hundreds of fps. With VSync, I’m playing 60, and clicking is more reliable. I still occasionally see instances where a click does not seem to register, and I need to try again. I don’t know, maybe I’m the only one seeing this… at any rate, I’m very impressed with the quality of the product and am making excellent headway on my racecourse editor. Cheers!
    Dave
     
  29. vishal

    vishal

    Joined:
    Aug 8, 2012
    Posts:
    14
    Hi Andrew,

    We are getting some exception error after destroying an object. Could you please help me out to solve this issue.

    MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    RLD.GameObjectEx.FilterParentsOnly (System.Collections.Generic.IEnumerable`1[T] gameObjects) (at Assets/Plugins/Runtime Level Design/Scripts/Runtime Package Common/Extensions/GameObjectEx.cs:283)
    RLD.RTObjectSelection.Render_SystemCall (UnityEngine.Camera renderCamera) (at Assets/Plugins/Runtime Level Design/Scripts/Selection/RTObjectSelection.cs:731)
    RLD.RLDApp.OnRenderObject () (at Assets/Plugins/Runtime Level Design/Scripts/RLDApp.cs:178)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     

    Attached Files:

  30. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    Just make sure to deselect the objects you are about to delete before deleting them:
    Code (CSharp):
    1. RTObjectSelection.Get.RemoveObjects(objectList, false);
    objectList is of type List<GameObject> and if you are deleting a parent, make sure you also include its children in the list to make sure they are also deselected.

    The second parameter allows you to specify if Undo/Redo is supported for the remove operation. Since you are deleting the objects, you should pass false in this case.

    Cheers,
    Andrew
     
  31. NeptuneEarth

    NeptuneEarth

    Joined:
    Dec 20, 2020
    Posts:
    6
    How can we turn the prefab library into a drag and drop prefab library instead of the default one we have right now?
     
  32. vishal

    vishal

    Joined:
    Aug 8, 2012
    Posts:
    14
    Hi,

    1. Is it possible to select the face of the selectable object green bounding box?

    And can we snap object to object via its bound face?

    2. Also i need to change hotkeys programmatically, is it possible and how?
     
  33. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hello,

    1. No, this is not possible.
    2. Each module which uses hotkeys has a Hotkeys property which you can call. For example, RTObjectSelection.Get.Hotkeys returns an instance of ObjectSelectionHotkeys. This instance has 5 proeprties which return a Hotkeys instance. This is the instance that needs to be modified.

    Example:
    RTObjectSelection.Get.Hotkeys.DuplicateSelection.Key = KeyCode.U;
    RTObjectSelection.Get.Hotkeys.DuplicateSelection.LCtrl = false;

    The code above changes the duplicate selection hotkey to U and it no longer requires the pressing of LCtrl key.
     
  34. dmenefee

    dmenefee

    Joined:
    Oct 14, 2019
    Posts:
    129
    Hello! Is there an API I can call to determine whether any game objects were modified by gizmos? I want to popup a confirmation box if the user tries to exit the editor without saving. Thanks!
     
  35. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    This should work with the gizmos drag events. Please see this page in the doc. Search for the Gizmo Drag Begin/Update/End section.

    Cheers,
    Andrew
     
    dmenefee likes this.
  36. dmenefee

    dmenefee

    Joined:
    Oct 14, 2019
    Posts:
    129
    that is an excellent idea! Thank you
     
  37. dmenefee

    dmenefee

    Joined:
    Oct 14, 2019
    Posts:
    129
    Feeling stoked. My in-game racecourse editor for my space racing game (working title "Fusion Racer", don't hate it please) is very nearly complete. I just need to pull in Steam Workshop integration so players can publish their creations. Anyway, today I added an automated racing guide creator to place these scifi looking hoops along the course so players know where to go (only visible during game play, as they would needlessly clutter the editor)... I'll show that later when I push a recording of a race with my VR rig. For now, here's a clip of the racecourse editor, showing placement of assets along the racecourse spline (built using Dreamteck Splines, an amazing tool), and showing a fly-through tool that players (and *I*) can use to check the course during editing. All of this is done using RLD, which is absolutely fantastic. I'm creating libraries dynamically, loading from scriptable objects that store the assets used to populate the course. Because it's a spline, the assets can be dragged to change the course shape.
     
    Last edited: May 7, 2022
    XGT08 likes this.
  38. dmenefee

    dmenefee

    Joined:
    Oct 14, 2019
    Posts:
    129
    Hello. Looks like there's an initialization order bug in the code. In RTPrefabLibDbUI.cs on line 27, the RTPrefabSearch component may not have processed Awake() when this code executes, resulting in a null exception due to the fact that the _searchField member is not yet initialized.
     
  39. dmenefee

    dmenefee

    Joined:
    Oct 14, 2019
    Posts:
    129
    Also, though I haven't created a repro yet, it appears that the runtime build is not receiving mouse clicks, at least in my game. The game works fine in play mode in the editor, so there may be another initialization issue or something along those lines.

    Note: the UI elements in the scene are working fine, too. It's just the assets managed by RLD which are not getting any clicks. I set a breakpoint in the code to confirm this.

    Edit: I was able to resolve this by setting VSync to 1. Without Vsync, mouse clicks are randomly lost; with VSync set to 2, no mouse clicks are received. This may only be a problem with very high framerates (mine gets over 200).
     
    Last edited: May 15, 2022
  40. shpkng

    shpkng

    Joined:
    Apr 15, 2019
    Posts:
    7
    Hello, I'm making an architecture building application and I think this asset is perfect. But I've got two questions.
    1). I'm in a group with 10 guys, but I'm the only developer, how many seats should I pay for?
    2). Is modifying allowed? I will publish my app and I want to make some changes to both codes and models.
     
  41. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    Answered via e-mail :)
     
  42. jh092

    jh092

    Joined:
    Sep 2, 2018
    Posts:
    34
    Hi there,

    I have an object that I simply cannot click select, it is very strange.

    I can drag select over it and it becomes selected, but it just will not click select. Other objects will click select just fine.

    Strangely though, if I add a mesh collider to this object I can click select it, but without a mesh collider it won't select. If I change to a box collider it still won't select.

    Any thoughts please, could it be a characteristic of the mesh somehow perhaps?

    Many thanks

    John
     
  43. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hello,

    Make sure the mesh has the Read/Write enabled checked in the import settings. The plugin needs to access the mesh data to build some required data structures.

    Cheers,
    Andrew
     
  44. jh092

    jh092

    Joined:
    Sep 2, 2018
    Posts:
    34
    Ah, thanks Andrew for your help.

    John
     
  45. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    No problem :)
     
  46. ak05

    ak05

    Joined:
    Sep 5, 2017
    Posts:
    4
    Quick question, what parts of this asset work with WebGL?
     
    Last edited: Jul 12, 2022
  47. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    I honestly haven't really tested it with WebGL, so I can't say for sure. All I can say, it's not a platform I officially support.
     
  48. ak05

    ak05

    Joined:
    Sep 5, 2017
    Posts:
    4
    Thanks! The asset seems nice, I have one question regardint the camrea movements

    I got the asset running (BTW the demo scene does not react to any mouesclicks, but new scene and Tools> RTB>Initialize did the trick).

    I have a question regarding orbit. What is the pivot point considered for orbiting?

    Thanks!
     
  49. ak05

    ak05

    Joined:
    Sep 5, 2017
    Posts:
    4
    OK
    OK, never mind the first question...I have figured that out, it was due to another issue.

    So, If I select Orbit on the RMouse and Look around on the RMouse+LShift, it will only Orbit, regardless of LShift is pressed or not. If I set LALT+RMouse to Orbit and LShift+RMouse to Look around everythng works as exepcted. It seems that the modifier key is only taken into account if there is no other function programmed to RMouse without a modifier key. Can you replicate this? Is this a Bug?
     
  50. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,705
    Hi there,

    Holding down ALT + RMB just orbits the camera around the last established focus point. So the orbit point is calculated using an offset value for N units in front of the camera. This means te orbit point is always located in front of the camera at N units distance from it. The offset is automatically calculated when you press F to focus on a game object or group of objects.

    Just tested this out and seems to work. But maybe I misunderstood? Can you explain again what issue you are encountering? :)

    Cheers,
    Andrew
     
unityunity