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. Dismiss Notice

World Building EasyRoads3D v3 - the upcoming new road system

Discussion in 'Tools In Progress' started by raoul, Feb 19, 2014.

  1. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614

    Hi Gerhard,

    So you got this working now? And that is because of the additional placeholder terrains?

    As mentioned in your previous post, I just tested a 4 terrain tile setup and I was writing a reply when your new post came in.

    kml..jpg

    I deliberately added space between the terrain tiles to clearly show the 4 tiles. As visible, the road network is created covering the total bounds of the 4 terrains together.

    If this is still causing issues perhaps you can provide the KML file and exact steps of the terrain setup and road data import setup. Or perhaps send a project directly to us so we can test.

    Thanks,
    Raoul
     
    Last edited: Apr 6, 2023
  2. it-friedl

    it-friedl

    Joined:
    Nov 30, 2015
    Posts:
    14
    Hello Raoul!
    Thanks, yes it works with the additional terrains. I don't know why not all terrains are considered here. The KML is an old one, but I did yesterday's tests with KML from https://overpass-turbo.eu/. I only came up with the idea that it is related to ER because I have been able to use this KML so far. Yes. it's actually 4096 terrains, but it's only on some roads. That's pretty much how it's going to be.
    :)

     
  3. M_G_ELECTRONIC

    M_G_ELECTRONIC

    Joined:
    Oct 9, 2019
    Posts:
    26
    Hi everybody,
    Maybe this question has answer, but could not find it.
    I have been using this asset for a some time now. I have Unity 2022.2 and EasyRoads3D Pro v3.3.b10, From documentations, I have hard time to make:
    - Traffic sign post and traffic signal placement options on intersections, I have tried place then on flex intersection menual but not working. In info placement options on your webside, I did not find this: Posts can be added by adding a new item to the list of posts.
    - Lane Direction Marking decals, for this I have set us as demo scene from v3.3.b10, but also there are not active markings on roads.
    Thank you for help.

    Also maybe did know then could be v3.3 production ready?
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    [
    Hello @it-friedl,

    I will test a KML from the link you posted. But I have a feeling more is involved here and full details of settings are necessary.

    The video looks great!

    [EDIT] I think I may have found how this can be reproduced. Regardless the number of terrain tiles, this appears to happen when the left bottom corner of the full terrain bounds is on the left / below (0,0,0). This is fixed in the next update.

    Raoul
     
    Last edited: Apr 8, 2023
  5. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi @M_G_ELECTRONIC,

    Traffic signs were introduced in beta 10 which was released last week. It turned out there are indeed potentially issues in Unity 2022.2. Today we prepared an update with a new custom UI for Unity 2022.2 with a fix for the issue. This update also includes options to set sign posts for road types so they are auto generated on Flex Connectors, and auto placement for sign posts on One Way roads is also added. I will send it to you tomorrow.

    I am not sure about the second part regarding Lane Direction Markings. This works by setting lane Direction markings in the road type settings. The demo scene does include examples of this. What are the exact steps you take and what exactly does not work here?

    Thanks,
    Raoul
     
  6. M_G_ELECTRONIC

    M_G_ELECTRONIC

    Joined:
    Oct 9, 2019
    Posts:
    26
    Hi,
    thanks for fest response. I made all possible Lane Marking Direction, like in demo scene. But they are not shown on intersections. I will try it tomorrow without unity URP.
    I would like that it will be visible if the are supported.
     

    Attached Files:

  7. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi,

    Just in case, direction markings are currently not generated on intersections. They are created along the full road object and depending on the available lane options on intersections the matching direction marking will be visible over the specified distance.

    The latest v3.3 beta 10 includes various optimizations to speed up the workflow. For example sidewalks are now generated after road shapes changes not during each road shape update while moving markers. The same for direction markings but perhaps that is not fully updated. I will check that.

    Thanks,
    Raoul
     
  8. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    Hi, is there any doc about all the decals options?



    I've found this about start/end decals but it doesn't mention the other options:

    https://www.easyroads3d.com/tutorials/decals.php

    I have tried a few options but I can't get it to work.

    Thanks in advance.
     
  9. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi levelappstudios,

    Start / End decals is part of the current v3.2.

    The other options are v3.3 beta, they are not documented yet in the current manual. Info is available on our website:

    https://www.easyroads3d.com/v3beta.php#laneDirectionMarkings

    So this is used to spawn direction markings on top of the road objects. The "Straight" version will be spawned along the road object, the other options are used near intersections based on the available outgoing lanes for the specific lane at the intersection. This means that the lane data options should be active (the v3.3 "Traffic AI" section in General Settings) and the specific road type should have lane info set.

    The v3.3 beta package on our website includes examples of this.



    Note, that there is an issue with this in the current v3.3 beta 10 ( see the recent posts on this page). meanwhile an update is available for Unity 2022. Let me know if you need the update and in that case, which Unity version you use.

    Thanks,
    Raoul
     
  10. jmclaveria

    jmclaveria

    Joined:
    Oct 16, 2018
    Posts:
    19
    Thanks Raoul, awesome support as usual.

    I’m using Unity 2021.3. I will check the recent posts.

    Regards

    PD: I’m logged with this account in my cell phone, I’m levelappstudios too
     
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi,

    Thanks for mentioning that you are also levelappstudios. I wasn't sure if this was another request.

    Tomorrow, I will send an update for Unity 2021.3.

    Raoul
     
  12. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    To be more specific, I am working with Unity 2021.3.16 and version 3.3b9. I updated to 3.3b10 and was curious to see the new traffic signals and try out the "demo" scene. I've seen previous posts, and if I understand correctly, there are bugs when placing traffic signals, but it's not clear to me if there are also bugs with decals. I've been testing the "Beta Demo Scene," and while the "Default Road" has the "Road Type Decals" assigned, I don't see any markings on the road. Is this a bug, or do I need to do something else to see the road markings?

     
  13. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi levelappstudios,

    There can be Inspector UI issues with the new traffic signs / signals feature in v3.3 beta 10.

    And beta 10 includes several optimizations, as a result direction markings do not display. This does work well in beta 9.

    Both issues are fixed meanwhile. The beta 10 package will be updated but I will already send an update for Unity 2021.3 when ready (later today).

    Thanks,
    Raoul
     
  14. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    Hi Raoul,

    Could you post here when beta 10 is updated for 2021.3 so I can download and try?

    Thanks
     
  15. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi,

    I sent it to you yesterday, can you check your inbox here on the forum?

    Thanks,
    Raoul
     
  16. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    Sorry, I didn't notice I had a message, I thought you would update at the webpage.

    Thank you very much for the update
     
  17. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    We always get email notifications when there are new messages, sorry about that!

    We noticed another issue with direction markings not updating well on already existing road objects. The download on our website will be updated after this is fixed. This will be tomorrow or Friday.

    Thanks,
    Raoul
     
    M_G_ELECTRONIC likes this.
  18. BecOC

    BecOC

    Joined:
    Oct 24, 2022
    Posts:
    3
    That's great yes a lock option in future would be perfect.

    Thank you, I am using Unity 2021.3.3f1

    Yes when using RWT there is the option to not generate connections in which case the roads line up well and straight with the map. I may contact them to discuss the wavy road when connections are inserted.

    That said, your flex connector integration for OSM is the main feature we would want anyway so may just wait for that instead. No rush, but yes when you are happy to send for testing that would be great thank you.
     
  19. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi BecOC,

    Which version of EasyRoads3D do you use, the v3.2.x or the v3.3 beta? The current v3.3 beta on our website already includes this option (run this before importing the OSM file):

    EREditor.OSMCreateIntersections(true);

    Otherwise I will send and update for v3.2.x

    Thanks,
    Raoul
     
  20. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    Hi Raoul, any news about this? No hurries, just interested about the marking roads, I think it adds value to the visual aspect.

    Another question, is there any way to add a Start Object to a side object that is generated with a Mesh Object? My intention is to add a Marker Object signal when a guardrail begins (this guardrail is a concatenated Mesh Object). Let me give you an example with a barrier that does support a Start Object (concrete_barrier_simple_prefab) since it is procedurally generated.



    Thanks in advance.
     
  21. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi levelappstudios and @M_G_ELECTRONIC,

    The beta 10 packages on our website were updated today.

    This includes fixes for:
    - Inspector UI issues for the new Traffic Signs feature
    - Traffic sign orientation issues when the Flex Connector orientation is not (0,0,0), the default value
    - Potentially wrong crosswalk orientations on Flex Connectors in beta 10
    - Direction markings not being visible in beta 10

    The v3.3 beta demo scene was updated accordingly.

    There are indeed no Start / End Object options for the "Mesh Object" side object type. I will add that.

    Thanks,
    Raoul
     
  22. M_G_ELECTRONIC

    M_G_ELECTRONIC

    Joined:
    Oct 9, 2019
    Posts:
    26
    Hi,
    I have tried right now, and I see the same version as before, no new fixes are seen, about signs or lane markings. Does anybody have same problems?
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hello M_G_ELECTRONIC,

    This is a v3.3 beta 10 update, so that is indeed the version that will show in the most right Info tab of the EasyRoads3D toolbar in the Inspector.

    In what way are fixes not seen? What are the exact steps you take and what does not work?

    I had a quick look at the demo scene. I see the direction marking presets are missing in the final build. But these can be recreated using the Primary_Road_Decals material. And I will update the package including these presets.

    Other than that, the 4 fixes in my previous post are all working well on our end.

    Thanks,
    Raoul
     
    Last edited: Apr 15, 2023
  24. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    Try to increase the "Height offset" property in the decal setup, maybe you can't see because Z-fighting. Check the hierarchy root too, there should be an object named "Lane Direction Markings" beneath the road object. If that object isn't there then the road markings are not being created. Remember to activate the AI Traffic and setup de Lane Info too.

    I got it working now, at least for the straights in my motorway. But it's a bit tricky to fine tunning because if I change the decal parameters it will not update in the scene, even if I click on "Update Scene Instances" in the road settings. If I want to see the updated results in the scene I have to move any marker of the road.
     
    M_G_ELECTRONIC likes this.
  25. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    Another issue: If I modify the UV values writing the value then it will not be saved. To be saved I have to move the UVs with the mouse.

     
  26. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    The missing Direction Marking presets in the latest v3.3 beta 10 update happens after road type changes and switching between scenes that share the same road type. This will reset the list of Direction Markings.

    The beta 10 package on our website is updated again so the presets are present. But this bug is not fixed yet, so be careful switching between scenes and making road types changes when using this beta.

    This issue will be fixed on Monday.
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi levelappstudios,

    I will check "Update Scene Instances" on Monday, because this should include changes to Direction marking settings.

    I will also check the UV Editor issue when changing the UV values directly in the fields.

    Thank you for reporting this.

    Raoul
     
  28. M_G_ELECTRONIC

    M_G_ELECTRONIC

    Joined:
    Oct 9, 2019
    Posts:
    26
    Hi,
    I have now download again, since demo was updated, and now lane decals markings are displaying in demo scene, that is cool.
    I have tried to make sign post on flex intersecton that has rotation, and signs are not rotated as predicted.
    Thanks levelappstudios for help. I have got same problems as levelappstudios with reseting positions and one time also deleting the list of Direction Markings.
     

    Attached Files:

  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hello M_G_ELECTRONIC,

    Regarding Flex Connectors with rotations and Sign Posts not aligning well, was the Flex Connector updated? What are the exact steps? I am asking that because the beta demo scene includes a stop sign post example on the T crossing with the long road with retaining walls and tunnel. This Flex Connector does have rotations, the stop sign post is aligned well, also after changing the incoming road angle of that road.

    Yes, fixing the issue with "Update Scene Instances" for direction markings in the Road Types section has already been confirmed in my previous post. This will be updated tomorrow.

    Thanks,
    Raoul
     
  30. mmorsi

    mmorsi

    Joined:
    Oct 14, 2021
    Posts:
    7
    Hello Raoul and the rest of the Easy Roads 3D community! First off, thank you for this great plugin, I've already put it to good use in a project. That being said, I am posting today about a rather concerning issue, particularly EasyRoads 3D is making a web request when the Road Network object is first selected. I wouldn't have caught this were it not for unity displaying a warning about non-secure network connections not being allowed (see the first attached screenshot).

    It's a bit unnerving to see a web request being made from a binary and not being able to inspect the source to see what is being transmitted. I did do a quick preliminary inspection of http traffic originating from my machine (in an isolated environment with only Unity running and non-secure HTTP connections enabled) and it seems the request is for http://www.unityterraintools.com/temp/ERFreePackage.php (see the second attached screenshot).

    Navigating to this website in a browser results in a redirect to the easyroads3d website, so my question is why is this request happening and as it doesn't seem to have any functional impact on the plugin (everything works as normal even if the request fails), could this web request be removed so that we can all have peace of mind? :)

    Thank you in advance for addressing this issue, and again for the great plugin.
     

    Attached Files:

  31. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi Gerhard,

    To minimize posts I will reply to all posts here in one post.

    What do you mean with refresh side objects in this case? refresh a specific side object after side object setting changes? "Update Active Scene Instances" for that specific side object in the Side Object Manager should do that. If that is inconsistent on your end, than please can you provide exact steps how to reproduce this and in what way this is inconsistent? For example, are always the same road objects left out? And in that case do these road objects have different settings and does this happen after very specific side object setting changes? I am asking that because in the video in your last post a popup appears mentioning that customized values are used. This could be relevant here.

    I see you mention "renew, refresh on off" after selecting "Terrain Normal" for the alignment. But this is not specifically mentioned after adjusting the terrain. Was the side object refreshed after adjusting the terrain to align it with the new terrain heights?

    That obviously is not what should happen unless side objects are linked which is possible for certain auto generated side object types like retaining walls, bridges and tunnels.

    And this is unknown so I can't give more feedback on this. Can this by easily reproduced in provided demo scenes so we can see this on our end?

    I cannot clearly see anything in the video that relates to the previous posts?

    What I see in the video is that "My Guard" is deactivated and reactivated. A new guard section is generated? But there is no context to this? Were side object settings changed? Because one of the options for auto generated Barriers / Guard Rail type of side objects is "Road bend Threshold Angle". This can be used to generated side object sections as visible at 0.33.

    Or is this about Road Markers disappearing? Can you consistently reproduce this following the same steps as seen in the video? Or does this only happen after specific side object setting changes?

    I just tested this in the provided v3.2 demo scene on road object "Mountain Road Right_2" which has both auto generated guardrails active and road markings similar as in the video. Deactivating the "Guard Rail" side object does not result in the road markings being removed.

    Thanks,
    Raoul
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614

    Hello mmorsi,

    Glad to hear the tool is useful for you.

    The only thing done here is check for updates / news. No data is sent and it does not affect the tool when there is no connection. We use several plugins that do the same.

    We can definitely change this so it links to the easyroads3d website. Both websites are secure, but I do see that the easyroads3d.com website at the moment does not auto redirect to the secure https connection. We will check and fix that.

    Thanks,
    Raoul
     
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hello Gerhard,

    1. In my previous post I deliberately gave the example in the v3.2 demo scene, easy for you to test. The reason for mentioning this was to show that side objects do not disappear after activating / deactivating another side object. Neither has this ever reported before. And that is also why I asked for exact feedback on how to recreate this.

    Thank you for the info regarding I Connectors. With road object "Mountain Road Right_2" selected I inserted an I Connector at marker 3 and marker 6 of "Mountain Road Right_2_2", the newly created road object after inserting the first I Connector. After this I changed the default "X Position" of the "Guard Rail" side object in the Side Object Manager to -1.5 and pressed "Update Scene Instances". The guardrails on all 3 involved road objects do update accordingly after confirming the changes and the road markers are still visible on all 3 road objects. To keep the original v3.2 demo scene I first duplicated it just in case more testing is required.

    After this I selected marker 2 of "Mountain Road Right_2_2", deactivated the guard rail and activated it again. It only deactivates and activates the guard rails, the road markers remain visible after both actions

    Can you confirm that these exact 3 steps have different results on your end?

    I cannot clearly see the problem in the first image. The "Mountain Wall Barrier Block" preset is visible. This is linked to the "Retaining Wall" preset. So I assume the retaining wall is actually generated here over the same distance? The results of this cannot be compared with the guard rail section that is also visible. These are two different side object types with different rules.

    The second image does show that two auto generated side object types overlap. In this situation the retaining wall side object type does have priority, the guard rail should actually stop and not overlap the retaining wall at all. I will see if this can be recreated with a similar road shape.

    In any case, each section of an auto generated side object is selectable and can be deactivated. So in this case this particular guard rail section can be deactivated.

    And if you actually do want guard rails to be generated on retaining wall sections than this side object preset can be added to the linked side objects list near the bottom in "Auto Generate" section in the Side Object Manager. This may result in a single separate section matching the retaining wall section.

    Thanks,
    Raoul
     
  34. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    Hi Raoul, I have a newbie question. I have watched the custom connection tutorial (
    ) but still don't know how to add side objects to a custom connection, the example in the tutorial is about a train road and I can't fit it in my project.

    I have a custom connector with 4 connections (green dots) and I want to drop some side objects in the middle (red circle), for example trees. The connected roads doesn't allow to extend the side objects (the objects got trimmed at the end or start of the road) and I got no option to drop any side object in the custom connector menu.

    Do I have to activate by default the side object in the Road Type config like in the tutorial? Or maybe is another way to do that?



    Thanks in advance.
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi levelappstudios,

    That is currently not possible as a built-in solution. Side objects require a specific path over which they can be generated which is currently defined by the path of road objects.

    In recent versions side objects are supported on connectors, also custom connectors, in a way that they are auto generated on the connector when the same side object is active on both road objects at a specific connector corner / side. But this will be part of the side object generated for the involved road objects.

    In you situation it seems the idea is to generate them directly on the connector, so that is a different situation.

    Do you want to do this for individual connector instances in the scene or for all instances?

    Before side objects were supported on connectors we added guardrails to the Motorway Custom Connectors in the demo scene (similar connectors as in your screenshot) as child objects. These guardrail sections were created based on the guardrail side object taking the following steps:

    1. Place an instance at of the connector at (0,0,0)
    2. Create road object marked as "Side Object" in the "Add New Road / Object" section. That way no road mesh will be created
    3. Activate the specific side object(s) for this new object
    4. Add markers to define the desired side object shape on top of the connector
    5. Export the generated side object mesh or create a Mesh Asset for a prefab in the project folder
    6. Add this prefab as a child to connection prefab in the project folder

    Perhaps that will work?

    Thanks,
    Raoul
     
  36. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    It can work for me, it's similar to modifying the prefab by adding the necessary objects as children. Thanks for the support!
     
    raoul likes this.
  37. M_G_ELECTRONIC

    M_G_ELECTRONIC

    Joined:
    Oct 9, 2019
    Posts:
    26
    Hi, sorry for late reply
    I have import v3.3 demo in empty project Unity 2021. Found already made flex intersection that was rotated, clicked on it and placed demo sign on each lane. Signs have got rotation as shown in screenshot. I did not update road settings or anything.
     
  38. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi M_G_ELECTRONIC,

    There is no screenshot. It is not entirely clear what the situation is, also because it says that demo signs were placed on each lane. Is this part related to traffic signs being activated for each connected road, or direction markings that are placed on individual lanes? And was the result good or not?

    Thanks,
    Raoul
     
  39. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    Hi Raoul,

    Is there any way to mark the road as reversed, or at least reverse the order of the markers? I am implementing a navigation system, and some one-way roads are facing the opposite direction of what I need. I would prefer to avoid redoing those roads and repositioning the side objects if possible.

    Thanks in advance
     
  40. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi levelappstudios,

    I assume this road type does have a one-way lane direction setup in the Road Type section?

    In that case, there will be an option to set the direction in the Inspector near the bottom of the main "Road Settings" at the top in the Inspector. By default it will display "Traffic Direction: Forward" with a "Reverse" button to change the direction. And in a next update, options for reversing the direction will also be added in the Scene View window on top of the road.

    The road in the middle of the small city block in the v3.3 beta demo scene does have one-way setup.

    Thanks,
    Raoul
     
  41. M_G_ELECTRONIC

    M_G_ELECTRONIC

    Joined:
    Oct 9, 2019
    Posts:
    26
    I have now download demo v3.3b10 and done all things the same as before. This time, I have been more precise and see that for same flex intercestion I get same result.
    If I place STOP sign all works well as my image show, but if place some other sign prefab from your demo, signs got rotated, perhaps because they do not match with road type.
    In the end it was my fault that I have placed signs that did not match with road type. Just to let you know.
     

    Attached Files:

  42. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    How did I miss that button??? Thanks man!
     
    raoul likes this.
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Traffic Signs are individual prefabs, they can be assigned to road types. The advantage of that is that they will be auto generated on v3.3 Flex Connectors for connections that are based on this road type.

    But additional separate traffic signs can also be added to connections. The way rotations are handled will be exactly the same. It depends on the original orientation of the specific prefab whether this will look right.

    The traffic signs in the screenshot do all three have the correct alignment.

    Thanks,
    Raoul
     
  44. M_G_ELECTRONIC

    M_G_ELECTRONIC

    Joined:
    Oct 9, 2019
    Posts:
    26
    Hi,
    Traffic signs really do have correct rotation. Mistake on my end.
     
  45. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi M_G_ELECTRONIC,

    Some of the examples in the beta package are rotated 180 degree based on where they are positioned and which direction they are facing. These are the one-way traffic sign examples.

    It is a matter of using the original rotated 180 degree if you want to position them on the other side.

    Thanks,
    Raoul
     
    M_G_ELECTRONIC likes this.
  46. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    Hi Raoul,

    Is there any way to be notified when the terrain is generated using the "Build Terrain" button? I have been searching through the ERRoadNetwork class but didn't find anything.
     
  47. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    Hi levelappstudios,

    I assume this is indeed scripting API related?

    In which situation do you want to get notified? Or are you looking for a way to get the terrain status?

    This has been added to the ERRoadNetwork class and will be available in the next build:

    public ERRoadNetworkStatus GetRoadNetworkStatus()

    This will return EditMode or BuildMode, Build Mode is the state where the terrain is updated to the road network.

    Thanks,
    Raoul
     
  48. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    Yes, is script related, I would need to get notified just after ER3D modify the terrain when “Build terrain” is pressed.
     
  49. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,614
    It looks like this is inside the Unity Editor. In that case callbacks can be used triggered after pressing "Build Terrain" and, if necessary, after pressing "Back to Edit Mode".

    For example:
    Code (csharp):
    1. // In your editor script
    2. public void OnEnable()
    3. {
    4.     ERRoadNetwork.onBuildModeEnter += OnBuild;
    5. }
    6.  
    7. public void OnBuild(){
    8.     // Your code
    9.     Debug.Log("Enter Build Mode");
    10. }
    Will that work?

    Thanks,
    Raoul
     
  50. levelappstudios

    levelappstudios

    Joined:
    Nov 7, 2017
    Posts:
    84
    Yes, the script would be executed inside Unity Editor. That would be perfect, thanks!
     
    raoul likes this.