Search Unity

Runtime Level Design

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

  1. hanniiel

    hanniiel

    Joined:
    Jun 14, 2013
    Posts:
    39
    Hello there,
    Problem: When Unity Event System Enabled (Canvas) It doesn't allow me to select object to Scale, Rotate, etc..
    Whenever i disable it , works just fine, any Idea, I already tried previous suggestion about IsHovered, on this forum but problem remains.

    Best regards
     
  2. XGT08

    XGT08

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

    Can you tell me if you have a PhysicsRaycaster component attached to your camera?

    Thanks,
    Andrew
     
  3. hanniiel

    hanniiel

    Joined:
    Jun 14, 2013
    Posts:
    39
    No, it's not attached to the camera, I've been struggling the whole day with this kind of issue :,(

    thanks in advance.
     
  4. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    The plugin is configured to avoid selecting UI objects. So UI objects can not be selected. But you should be able to select other types of objects.

    Can you please send me a simple example project so that I can reproduce the issue? Please use the following e-mail address: octamodius@yahoo.com
     
  5. heatblayze

    heatblayze

    Joined:
    Sep 19, 2013
    Posts:
    3
    Hi there, really loving this asset!
    I've noticed that I can't seem to use the volume scale tool correctly when the camera is snapped to the 6 set views (top, bottom, front etc). It tends to scale strangely fast and jumpy.
    It's especially prominent in ortho view, as it just won't scale certain directions.

    e.g. When using the front view, x-scaling is broken; when using side view, z-scaling is broken.

    Here's a video of an ortho example
     
  6. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Hi there @heatblayze

    Thanks for reporting this to me. This issue has been fixed and it will be available in the next update which should be available somewhere this month. This update will be a remake of the current plugin. More info will be posted soon on the forum. If you could wait until then it would be great :)

    Thanks,
    Andrew
     
  7. hanniiel

    hanniiel

    Joined:
    Jun 14, 2013
    Posts:
    39
    Hello there,
    We'd like to customize Axis a little bit with different materials, textures or shapes, the idea is kinda the following:
    can I do this on the plugin? I read the docs, but what part of code should I edit? Best regards and thanks again.
    We wanna do so, cuz our children interact with it.
    295097303.png
     
  8. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    :) I'm afraid that won't be possible. The next update I have planned which will be released this month, will allow much more gizmo customization. However, custom meshes will still not be supported. I believe it can be done (I hope), but it will have to wait a bit.
     
  9. hanniiel

    hanniiel

    Joined:
    Jun 14, 2013
    Posts:
    39
    Thanks for the reply :(, So next update will include like changing materials to put some uvs or so? that'd be okay for now. I need to kinda try it now, any idea of where can I start, to change materials, uvs or so?

    Thanks again :)
     
  10. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    The next update will not include these changes. I said it might be possible in the future but I can not make any guarantees. Custom materials are a problem because I need to use materials which are specific for this kind of purpose.

    It's hard to explain where you would begin. The code for the move gizmo for example exists in Runtime Transform Gizmos\Scripts\Gizmos\TranslationGizmo.cs. But to be honest, I wouldn't know where to start. The code is a bit messy and does not lend itself well to this kind of customization.
     
  11. hanniiel

    hanniiel

    Joined:
    Jun 14, 2013
    Posts:
    39
    I understand, thank you very much, well is an start point. Gonna give it a try :)
    Best regards!
     
  12. hanniiel

    hanniiel

    Joined:
    Jun 14, 2013
    Posts:
    39
    hello,
    When I use Translation, and Scale I can see Axis but when I use Rotation gizmo, seems like are not visible. any idea why is this happening?
    best regards

    I upload_2018-5-17_17-50-8.png
     
  13. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Hello everyone,

    I would like to let you know that I have submitted an update for Runtime Transform Gizmos on the store. It is actually a complete rebuild of the entire pack with new features and improvements. The name was changed to Runtime Level Design. The price has gone up to 50$, but the update is free of charge. So those of you who already own Runtime Transform Gizmos can update as you normally would.

    Note:
    If you are currently working on a project, updating to this new version will most likely cause a lot of compiler errors to appear. Old function calls or classes, may be missing or they had their names changed because the old API is no longer available.

    So why a rebuild?

    When I first started working on RTG, the scope of the project was quite limited and many assumptions were made about what people do or don't need. In fact, I was even unsure of whether or not people actually need such a pack. It turns out they do, and in time, I received many suggestions and requests and at some point it became obvious that in order to keep up the architecture needed to change. Therefore, I made the decision of starting from scratch and I am very happy I did :)

    Why has the name changed?
    From the initial release, RTG contained elements which were not necessarily gizmo specific as the name would have had you believe. Features such as object selection, undo/redo and later surface snapping were pretty much pushing the pack towards more general purpose use. This new version improves those features and adds a few more of those so it made sense that a more generic name should be used. Runtime Level Design seems to describe exactly what this pack is all about.

    Documentation
    Features and UI will now be documented via video tutorials (YouTube Playlist). The API will be documented via online documentation. The online API doc can be found here.

    Note: At this point, there are video tutorials missing and I am hoping to fill in the blanks as soon as I feel up to it. For the moment there are 15 video tutorials available and more will be added soon. If there is something that you need help with, contact me either on the forums or on my support e-mail: octamodius@yahoo.com

    Has the Initialization Step Changed?
    A bit but not much. Please watch Plugin Initialization and Scene & Asset Preparation. Scene and asset preparation is a step which was not documented in the previous version.

    So what's new?
    Feature-wise, we have the following (link to YouTube video tutorial is provided where applicable):

    • Object Extrude Gizmo - You should definitely check this out and make sure you learn how to use it! After all it's really fun and easy to use. Simply put, you click and drag one of the gizmo handles and the gizmo will leave a trail of objects behind. Makes floors, wall sections, or pretty much any other similar structure super easy and fast to build.
    • Object-to-Object Snapping - Another feature which I consider extremely important. Allows you to use the mouse to snap selected objects to nearby objects. Can also be used for prop placement on floors and walls (this is called Flexi-mode and can be activated by holding down LCTRL during a snap session).
    • Selection Rotation via Keyboard - use the X, Y and Z keys to rotate the selected objects around the world axes.
    Note: At this point it is worth mentioning that when building environments out of modular prefabs, a combination of duplicate/snap/rotate/extrude will greatly improve your workflow.

    • Surface Snapping (aka Selection Grab) - This is not entirely a new feature, but it has been greatly improved and new things have been added here such as the ability to rotate/scale/offset objects using the mouse. The feature was previously implemented as part of the move gizmo, but starting with this new version it is linked to the object selection module which means it can be activated regardless of the currently active gizmo.
    • Selection Grid Snap - Snap selected objects to the grid. Works like vertex snapping with the move gizmo, but the difference is that it uses the object bounding volume corners instead of vertices.
    • Universal Gizmo (aka Universal Manipulator) - :) Had many doubts about this one. Aside from the fact that it gave me lots of headaches when implementing the settings/look and feel UI, I am not entirely sure how useful it will be. In any case, I know some of you go crazy about stuff like this and I have actually received a question in the past about whether or not this will actually be available. So there it is. I hope you enjoy :)
    • Runtime Prefab Picker - Starting with this new version there will be a prefab picker available. The prefab picker will allow you to organize prefabs in prefab libraries for categorization purposes. Each prefab library shows a prefab preview which when clicked on, will spawn the prefab somewhere in front of the camera. This feature is optional and can be disabled by deleting the RTPrefabLibDb object from the hierarchy view.
    • Object Groups - Object Groups represent empty objects in the scene that are supposed to act as containers (i.e. parents) for other objects. For example, you might want to have all your trees in the scene sit under a Trees parent. All buildings under a Buildings parent. And so on. Of course you could always do that, but the key thing to remember is that the plugin needs to know about this. By default, when you click on an object in the scene, the entire hierarchy that the object belongs to will be selected. So if, for example, you have a Trees object which parents many tree objects, clicking on one tree, will select all the trees in the scene! However, if you inform the plugin that the Trees object is an object group, the plugin will make a more informed decision about how objects should be selected. In this case, it will detect that the Trees object is an object group and it will not select it. Thus only the objects in the tree hierarchy you clicked on will get selected.
    • Scene Icons - The plugin can now draw icons (in the Unity Editor the term used is gizmos) for lights and particle systems. This can be turned on/off as needed. Icon textures are configurable.
    • MUCH MORE Gizmo Customization Options - Please do not abuse. Start with the default look and work from there but keep in mind that the default look is probably what you want 99% of the time.
    Although some features/improvements have been omitted, the most important ones have been listed. Now let's move on to the API (link to API doc is provided for each item):
    • Gizmo Transform Pivots - This feature was also present in the old version, but the new version introduces 3 new pivot types. Note: The previous version let you change the pivot via hotkeys. This is no longer the case in the new version. You have to use the API yourself to change the transform pivot.
    • Gizmo Events - You can register handlers for different gizmo events. Some of these were available in the previous version, but new ones have been added.
    • Selection Events - There are new events available for the object selection module. Note: It is no longer possible to change the object selection inside selection changed events. There is now a specific way in which customizing the object selection can be done. The PreSelectCustomize and PreDeselectCustomize events must be used for this purpose from now on.
    And many other things which have not been listed :)

    Here are some code changes that might be useful to know about:
    • Singletons are now accessed with Get instead of Instance;
    • There is no more EditorGizmoSystem class. This has been replaced with RTObjectSelectionGizmos;
    • There is no more EditorObjectSelection class. It has been replaced with RTObjectSelection;
    • There is no more EditorCamera class. It has been replaced with RTFocusCamera;
    That's pretty much it for now. Let me know if there are any other things you might want to know about. I expect there will be things which I might have missed so contact me for any questions you might have.

    Thanks for your support,
    Andrew
     
  14. XGT08

    XGT08

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

    I think what is happening there is that you accidentally hid the axes in the Rotation Gizmo Inspector UI.

    In any case, it seems that the new version is now live :) A lot sooner than I was expecting :) Maybe you should give it a try and see if the problem persists.
     
  15. CrazyTegger

    CrazyTegger

    Joined:
    Feb 15, 2015
    Posts:
    57
    I sent an email with a bunch of issues/suggestions for v2, but haven't heard back from you. Would appreciate a response when you have an opportunity.

    Thanks
     
  16. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    I have received absolutely no emial from you. E-mail address is: octamodius@yahoo.com

    You are the same guy who kept requesting stuff from me on the initial release. That wasn't a pleasant experience for me.
    Here is a record of the conversation we had:

    Conv.png

    Just to be clear, if there are bugs I will fix them.

    For features requests, my policy is this:
    1. if I like the idea and it feels like it can improve the pack, I will implement it;
    2. if it is a new type of feature, it will be released as an extension pack;
     
    Last edited: May 22, 2018
  17. CrazyTegger

    CrazyTegger

    Joined:
    Feb 15, 2015
    Posts:
    57
    Yup that was me all right. My apologies that I came across brash and your previous experience with me was unpleasant. Since our initial discussions, RTE has met all my needs (with the exception of groups), and I haven't had any issues with it.

    Here's what I sent in the email a number of days ago:

    Groups - The exact feature I've been needing!!!!!!
    1. If a parent object has an empty child/grandchild/etc object within the group and you click on one of those children, the empty GameObject is what gets selected, rather than the parent group hierarchy
    2. There should be a way to keep Box Render Mode = PerObject and have it only draw the bounding box around the entire group (ie the empty parent), instead of a bounding box around each object in the entire hierarchy. A suggestion is to add a Group Box Render Mode with the same options (this would allow me to select parent down, for group box render mode and keep Box Render Mode = PerObject
    3. I am unable to set an empty game object (with many children, whom also have children) in the editor as a group in RTObjectGroupDB. It appears to work in code however.
    4. Object grouping selection appears to not work when dragging. Selects game objects are selected individually.
    Selection (PerformClickSelect()) causes whole hierarchy to be selected for me
    1. Clicking on a single object in my scene causes the following:
      1. RTObjectSelection.PerformClickSelect()
      2. ObjectPreSelectCustomizeInfo preSelectCustomizeInfo = DoPreSelectCustomize(toBeSelected, ObjectSelectReason.Click);
      3. DoPreSelectCustomize is calling ObjectSelectEntireHierachy.OnPreSelectCustomize(). It should not be selecting the entire hierarchy.
      4. (disabling DoPreSelectCustomize() in RTObjectSelection.DoPreSelectCustomize() fixes the issue, but breaks grouping
    Click Inconsistencies between Mesh with and without collider
    1. With some mesh objects, I can click select them without a collider. With others, it requires a collider. This may be due to grouping issues above

    Drag vs click
    1. Some objects can be selected via drag, but not click. Specifically I noticed this when meshes had no mesh collider.
     
    Last edited: May 23, 2018
  18. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Hi Andrew,

    I noticed in your code a stub for a VR control scheme. What are your plans for this? I have a current game in development for the Oculus Go and wanted to know if it's something that will occur relatively soon or something further out. Basically I want to know whether I should roll my own for our level editor in game in regards to input/canvas UI or if it's something you are already in progress on.

    I like what exists already. Keep up the good work!
     
    XGT08 likes this.
  19. XGT08

    XGT08

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

    :) The VR stub was added there kind of in the early stages of the development after some people asked me about VR support. Some of them managed to derive the InputDevice class and create their own InputDevice implementation for VR. So I though I should add that code there in case somebody implements their own VR thingy. There are no plans for VR though :)

    However, if you plan on implementing VR you could derive the InputDeviceBase class. This one already contains 2 implementations: one for mouse and one for mobile. So that will probably prove useful to you. And then you can activate the macro and create a VR input device instead. If you need any help with the InputDeviceBase class, let me know.

    Note however, that features such as surface snapping, object to object snapping, will most likely not work with VR directly and may require some more teaking. The gizmos though should work with no problem.
     
    wxxhrt and attaway like this.
  20. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    So let's talk about these in order:

    Groups
    That is intentional and is the default behaviour. You can disable this behaviour by writing:

    Code (CSharp):
    1. ObjectSelectEntireHierarchy.Get.SetActive(false);
    After writing this line of code, you will be able to select individual objects;

    There are 3 options already: select the RTObjectSelection object in the RLDApp hierarchy and then click on the General tab. Then use the BoxRenderMode field to change the way in which the boxes are rendered:

    BoxRenderMode.png

    There is no restriction applied to game objects for being object groups. The only thing is that they should be scene objects and not prefabs. It should work with no problem with or without children.


    The role of object grouping was not to be able to select all objects under a group at once. Object grouping can help with scene management in some cases such as when you wish to hide entire areas of your game level. For example, you have a Roof group and it kind of gets in the way so you decide to disable the entire group and all roof objects also geet disabled.

    Now the reason why RLD needs to know about object groups is because when it comes to object selection, the exact opposite of what you would like to happen is going to happen. When you click on an object (or select via selection-rectangle), RLD will by default attempt to select its entire hierarchy. However, without object groups, it could in some cases end up selecting 70% of the entire level! But when an object is marked as a group, RLD knows where to stop. An object group is like a marker inside the object hierarchy that says: Do not go further than this.

    Please have a look inside the docs. This video might also help.

    Already talked about this. It's intentional. If you want to select individual hierarchies, use:
    Code (CSharp):
    1. ObjectSelectEntireHierarchy.Get.SetActive(false);
    I find it hard to believe that this is happenning. Select the RTScene object in the hierarchy and make sure the Physics Mode filed is set to RLD:

    PhysicsMode.png

    Again, weird. I'm afraid I can't reproduce this for now. Probably related to the issue above.
     
  21. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    @CrazyTegger
    If you would like to customize the way in which objects get selected, you can read about PreSelect and PreDeselect Customize events here.
     
  22. CrazyTegger

    CrazyTegger

    Joined:
    Feb 15, 2015
    Posts:
    57
    After looking at it, most of my selection issues was related to prefabs. However, I'm still having one issue where I'm unable to use the editor to group objects.
     
  23. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Can you try the following:

    1. open the Assets\Runtime Level Design\Scripts\Runtime Package Common\Extensions\GameObjectEx.cs file;
    2. inside the file there is a class called GameObjectEx;
    3. find the IsSceneObject function inside that class;
    4. modify it to look like this:

    PrefabInstance.png

    Basicly, you can just copy paste this code inside the function body:

    PrefabType prefabType = PrefabUtility.GetPrefabType(gameObject);
    return prefabType == PrefabType.None || prefabType == PrefabType.PrefabInstance ||
    prefabType == PrefabType.DisconnectedPrefabInstance || prefabType == PrefabType.MissingPrefabInstance ||
    prefabType == PrefabType.DisconnectedModelPrefabInstance || prefabType == PrefabType.ModelPrefab ||
    prefabType == PrefabType.ModelPrefabInstance;
     
  24. CrazyTegger

    CrazyTegger

    Joined:
    Feb 15, 2015
    Posts:
    57
    This is what was there from original 2.0 release:

    Code (CSharp):
    1. PrefabType prefabType = PrefabUtility.GetPrefabType(gameObject);
    2.             return prefabType == PrefabType.None || prefabType == PrefabType.PrefabInstance ||
    3.                    prefabType == PrefabType.DisconnectedPrefabInstance || prefabType == PrefabType.MissingPrefabInstance;
    changing it to:

    Code (CSharp):
    1. PrefabType prefabType = PrefabUtility.GetPrefabType(gameObject);
    2.             return prefabType == PrefabType.None || prefabType == PrefabType.PrefabInstance ||
    3.             prefabType == PrefabType.DisconnectedPrefabInstance || prefabType == PrefabType.MissingPrefabInstance ||
    4.             prefabType == PrefabType.DisconnectedModelPrefabInstance || prefabType == PrefabType.ModelPrefab ||
    5.             prefabType == PrefabType.ModelPrefabInstance;
    resloved the issue.
     
  25. CrazyTegger

    CrazyTegger

    Joined:
    Feb 15, 2015
    Posts:
    57
    Do you have any recommendations on how to disable all keyboard input when an input field has focus? If my users are type into a textbox, I don't want the keyboard actions to be enabled.
     
  26. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Off the top of my head, I would say have a static property inside the Hotkeys class. Something like HasFocus.
    Inside the IsActive functions (there's 2 of them) of the Hotkeys class return false if HasFocus is false.

    You should initialize HasFocus to true and set it to false when you need to let the UI have focus.
    This is the best way I can think of at the moment.
     
  27. hanniiel

    hanniiel

    Joined:
    Jun 14, 2013
    Posts:
    39
    Hi there,
    I tried to build the project for IOS and Android but had following error:
    Assets/Runtime Level Design/Scripts/Runtime Package Common/Input/RTInputDevice.cs(21,32): error CS0246: The type or namespace name `RTTouchInputDevice' could not be found. Are you missing an assembly reference?

    can I have the script for the touch implementation?
    Best regards!!

    email: hanielaustria@gmail.com
     
  28. XGT08

    XGT08

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

    I sent you an e-mail with the fix for this issue.

    Thanks,
    Andrew
     
  29. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    How can I add a prefab for wind zones not showing icons
     
  30. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Wind zones not currently supported.
     
  31. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    ok thanks
     
  32. JenniB

    JenniB

    Joined:
    Feb 15, 2018
    Posts:
    62
    Hello :),
    I tried to initialize the RLDApp dynamically in my unity script with the following code:
    Code (csharp):
    1. RLDApp.Initialize();
    It just works fine, but the following error occurs:
    RTCamera: No target camera was specified.

    To my scene i have a camera attached with the tag "MainCamera" like in the documentation explained.
    This error pauses the Scene. When i disable the pausing state, everything works fine.
    When i look into the RTFocusCamera component, the right camera is attached.

    Can someone help me? :)

    Jenni
     
  33. XGT08

    XGT08

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

    I don't know exactly what is happening there, but the Initialize method should not be called from code. It was designed to be called from the Editor in response to the Initialize menu item.

    If you can give me more details as to what you are trying to accomplish, maybe I can help you out.

    Cheers,
    Andrew
     
  34. JenniB

    JenniB

    Joined:
    Feb 15, 2018
    Posts:
    62
    Hei :)
    Thanks for your answer!

    *tries something* Oh thats my fault :D
    I now saved my Scene after initializing your RLDApp and it does not disappear!
    I can remember that it always disappeared after restarting the application :rolleyes:
    I think I can work with that :D
    Thanks!
     
  35. JenniB

    JenniB

    Joined:
    Feb 15, 2018
    Posts:
    62
    Now i wanted to build an application with your RLDApp attached for Android and the following error occured:

    Assets/Runtime Level Design/Scripts/Runtime Package Common/Input/RTInputDevice.cs(21,32): error CS0246: The type or namespace name `RTTouchInputDevice' could not be found. Are you missing an assembly reference?

    Can you help me with that? :)

    Jenni
     
  36. XGT08

    XGT08

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

    Sorry about that. It will be fixed in the next update. Just replace the RTTouchInputDevice part with TouchInputDevice.

    Please let me know if it worked.

    Andrew
     
  37. JenniB

    JenniB

    Joined:
    Feb 15, 2018
    Posts:
    62
    It worked thanks :)
     
  38. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Great! Thanks for letting me know :)
     
  39. Reddevildragg

    Reddevildragg

    Joined:
    May 19, 2014
    Posts:
    50
    Quick question. What is the best way to disableing the scene gizmo (the top left perspective and rotate selector) I have tried setting the game object inactive and although it does not draw the clicks in that area can still fire the events for setting the camera/rotating the camera

    Thanks :)
     
  40. XGT08

    XGT08

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

    I believe you are using an older version of the pack from what you are telling me because the scene gizmo is no longer represented via a game object. Please update to the latest version then follow the next steps:

    1. open the Assets\Runtime Level Design\Scripts\RLDApp.cs script;
    2. find the OnPostInit function;
    3. inside that function write the following:

    Code (CSharp):
    1. RTGizmosEngine.Get.GetSceneGizmoByCamera(Camera.main).OwnerGizmo.SetEnabled(false);
    You can replace Camera.main with the camera you are using to render the scene. Most of the times it's the main camera though.
     
  41. Reddevildragg

    Reddevildragg

    Joined:
    May 19, 2014
    Posts:
    50
    thats great thanks for the help

    had to also add below to hide the black box in the top corner (not sure if there is a better way but this appeared to work for me)
    RTGizmosEngine.Get.GetSceneGizmoByCamera(RTFocusCamera.Get.TargetCamera).OwnerGizmo.GetWorkCamera().gameObject.SetActive(false);

    Thanks for the help and quick response
     
    XGT08 likes this.
  42. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Yes. Forgot about that. It's a special camera which renders the scene gizmo only. That also needs to be disabled. Good work!
     
  43. nerseus

    nerseus

    Joined:
    Sep 6, 2017
    Posts:
    3
    Is there a way to mark an object as non-selectable?
    I have an app that has some meshes loaded at start and others that are loaded at runtime. Currently both the initial meshes and the runtime-loaded meshes are selectable. I'd like to be able to mark the initial meshes in a way that they can't be selected.

    Thank you,
    Dan
     
  44. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Hi there Dan,

    Yes. It is possible. You have to write:
    Code (CSharp):
    1. RTObjectSelection.Get.Settings.SetObjectSelectable(gameObject, isSelectable);
    OR

    Code (CSharp):
    1. RTObjectSelection.Get.SetObjectCollectionSelectable(gameObjects, areSelectable);
    Hope this helps,
    Andrew
     
    nerseus likes this.
  45. nerseus

    nerseus

    Joined:
    Sep 6, 2017
    Posts:
    3
    That did it. Thank you!
     
    XGT08 likes this.
  46. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Great!
     
  47. JenniB

    JenniB

    Joined:
    Feb 15, 2018
    Posts:
    62
    Hello :),
    is it possible to just select a child Gameobject?
    When I have a child GameObject located far away from the parent and I click on the child Object, the whole Object (parent + child) is selected.

    In my event OnSelectionChanged I just get both Gameobject (method ObjectsWhichWereSelected).
    In this example the duck is a child of the house.
     

    Attached Files:

  48. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    Somewhere in the initialization code, you need to write:

    Code (CSharp):
    1. ObjectSelectEntireHierarchy.Get.SetActive(false);
    You could for example write this in the OnPostInit method of the RLDApp class or in a Start function of one of your own scripts.
     
  49. JenniB

    JenniB

    Joined:
    Feb 15, 2018
    Posts:
    62
    Yes i now tried to use this in my OnEnable() method.
    Code (CSharp):
    1. /* Disable that the whole hierarchy is selected */
    2.         ObjectSelectEntireHierarchy.Get.SetActive(false);
    3.         RTObjectSelection.Get.PreSelectCustomize += OnPreSelectCustomize; /* Own handler */
    But when I use the following function:
    Code (CSharp):
    1. void OnPreSelectCustomize(ObjectPreSelectCustomizeInfo customizeInfo, List<GameObject> toBeSelected) {
    2.         foreach(GameObject selected in toBeSelected) {
    3.             Debug.Log(selected.ToString());
    4.         }
    5.         customizeInfo.SelectThese(toBeSelected);
    6.     }
    The whole object is selected anyway. I just want to move the duck and not the whole object.
     
  50. XGT08

    XGT08

    Joined:
    Aug 1, 2013
    Posts:
    1,905
    You don't need a PreDeselectCustomzie handler. Just ObjectSelectEntireHierarchy.Get.SetActive(false); and it should work.