Search Unity

World Building EasyRoads3D v3 - the upcoming new road system

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

  1. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Did you try it as a T Crossing as well?
     
  2. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    T Crossings are essentially an X Crossing with either the left or right side in active.

    Depending on which side is active (General Settings > T Crossing > Swap Turn button) indeed either the left or right "UV Tiling" slider changes will visually not update the crossing because that connection side is not visible.

    Thanks,
    Raoul
     
  3. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Hello gang,

    I am attempting to to create my road network via code. I can create a road and attach a connection to the end, but I am having trouble understanding how to connect an additional road to that connection.
     
  4. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi James,

    Find below a breakdown of the workflow for road objects and connection objects and the scripting API:

    ERRoadNetwork class

    public ERConnection[] LoadConnections ()
    public ERConnection GetConnectionPrefabByName (string name)

    Then you can either attach the connection prefab (sourceConnection) directly to the road

    ERRoad class

    public ERConnection AttachToEnd(ERConnection sourceConnection, int connectionIndex)
    public ERConnection AttachToStart(ERConnection sourceConnection, int connectionIndex)

    Or the connection prefab can be instantiated in the scene followed by connecting the roads

    ERRoadNetwork class

    public ERConnection InstantiateConnection(ERConnection sourceConnection, string name, Vector3 position, Vector3 eulerRotation)

    Connect road objects to already existing connection objects

    ERRoad class
    public bool ConnectToStart(ERConnection connectionObject, int connectionIndex)
    public bool ConnectToEnd(ERConnection connectionObject, int connectionIndex)

    The logic of which connection index to connect to is currently something you have to code. The ERConnection class has for example something like:

    public int FindNearestConnectionIndex(Vector3 position)

    which can be useful to find the nearest crossing connection to the start or end of a road object. The first or last marker position can be passed.

    Your question is covered by the second part, ConnectToStart(), ConnectToEnd() in the ERRoad class

    Hope this helps,

    Raoul
     
  5. JamesWjRose

    JamesWjRose

    Joined:
    Apr 13, 2017
    Posts:
    687
    Thanks Raoul,

    Yea, I have read through the API (I TRY not to annoy developers) *MY* problem is that I need examples. I go through this again and see what I can work on. No worries. Not your issue.

    Have a great weekend
     
  6. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Here is an example using the free demoadditional demo scene assets. But also see the extra notes at the bottom, what I noticed when running this inside the Unity editor. The scripting API is primarily intended for runtime road creation.

    Code (csharp):
    1.         ERRoadNetwork roadNetwork = new ERRoadNetwork();
    2.         ERRoadType roadType = roadNetwork.GetRoadTypeByName("Primary Road");
    3.  
    4.         Vector3[] roadMarkers1 = new Vector3[] {new Vector3(275f, 48f, -500f), new Vector3(325f, 48f, -500f)};
    5.         Vector3[] roadMarkers2 = new Vector3[] {new Vector3(335f, 48f, -510f), new Vector3(335f, 48f, -540f) };
    6.         Vector3[] roadMarkers3 = new Vector3[] {new Vector3(325f, 48f, -550f), new Vector3(275f, 48f, -550f) };
    7.         Vector3[] roadMarkers4 = new Vector3[] {new Vector3(265f, 48f, -540f), new Vector3(265f, 48f, -510f) };
    8.  
    9.         ERRoad road1 = roadNetwork.CreateRoad("Road 1", roadType, roadMarkers1);
    10.         ERRoad road2 = roadNetwork.CreateRoad("Road 2", roadType, roadMarkers2);
    11.         ERRoad road3 = roadNetwork.CreateRoad("Road 3", roadType, roadMarkers3);
    12.         ERRoad road4 = roadNetwork.CreateRoad("Road 4", roadType, roadMarkers4);
    13.  
    14.         ERConnection sourceConnection = roadNetwork.GetConnectionPrefabByName("Primary Road Crossing");
    15.  
    16.         ERConnection connection1 = road1.AttachToStart(sourceConnection);
    17.         ERConnection connection2 = road2.AttachToStart(sourceConnection);
    18.         ERConnection connection3 = road3.AttachToStart(sourceConnection);
    19.         ERConnection connection4 = road4.AttachToStart(sourceConnection);
    This creates a block of 4 road objects with the "Primary Road Connection" attached to the start of each road object. By using AttachToStart() the connection instance will align with the road object.

    API1.jpg

    Code (csharp):
    1.         // Connect the end of road 1 to connection 2
    2.         int nearestConnection = connection2.FindNearestConnectionIndex(road1.GetMarkerPosition(1));
    3.         road1.ConnectToEnd(connection2, nearestConnection);
    4.  
    5.         // Connect the end of road 2 to connection 3
    6.         nearestConnection = connection3.FindNearestConnectionIndex(road2.GetMarkerPosition(1));
    7.         road2.ConnectToEnd(connection3, nearestConnection);
    8.  
    9.         // Connect the end of road 3 to connection 4
    10.         nearestConnection = connection4.FindNearestConnectionIndex(road3.GetMarkerPosition(1));
    11.         road3.ConnectToEnd(connection4, nearestConnection);
    12.  
    13.         // Connect the end of road 4 to connection 1
    14.         nearestConnection = connection1.FindNearestConnectionIndex(road4.GetMarkerPosition(1));
    15.         road4.ConnectToEnd(connection1, nearestConnection);
    This will connect the end of each road object to the nearest connection index of the repective connection instance.

    API2.jpg
    What I saw when running this directly inside the Unity editor, it only works once. A Unity restart is required. Perhaps that is what was not working on your end. This issue has been fixed.

    Thanks,
    Raoul
     
    JamesWjRose likes this.
  7. MatheusPereiraBarros

    MatheusPereiraBarros

    Joined:
    Feb 21, 2015
    Posts:
    10
    Hi, there!

    I want to build roads with concrete islands in middle, like image below.




    How to make a custom prefab to build this with EasyRoads3D? Any tutorial?

    Since now, many thanks and Merry Xmas!
     

    Attached Files:

  8. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi MatheusPereiraBarros,

    Are you looking for info how to model this or how to setup the model?

    And are these the only road sections you need or do you also have a specific intersection model that you want to import into the system.

    In the case of the latter and custom intersection models are involved, than in theory the start of the island (the rounded part) could be part of the intersection model. The road object will automatically inherit the full road shape including the island shape.

    But we would probably simply create a model of the island and use the Procedural side object type to generate it in the scene. This side object can be auto activated for the specific road type, that way it will be generated instantly on each new instance of this road type.

    This can be done in two ways. Create a single mesh and define the start / end sections in the Side Object Manager through the Mesh Editor Window. Or, in your modelling app, break the island in three groups and use "_start", "_middle", "_end" in the names of the respective mesh sections/groups. That way the system will automatically extract the mesh data as needed.

    All this is covered in the Procedural Side Object tutorial



    Please ask if you have further questions.

    Thanks and Merry Christmas!

    Raoul
     
  9. MatheusPereiraBarros

    MatheusPereiraBarros

    Joined:
    Feb 21, 2015
    Posts:
    10
    The second case: setup existent model to procedural generation.

    Yees, I believe that this solves my question. I will check up video tutorial and keep testing in my scenes. Thanks, Raoul!
     

    Attached Files:

    raoul likes this.
  10. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Gotcha, not sure why I wasn't being able to change it before =)

    Note I am having an issue with the T Crossing..

    Prior to adding a road:

    upload_2021-12-25_9-19-9.png

    Now when I try adding a road to the left or right, the main position nodes of the T Crossing left/right changes... see screenshot:

    upload_2021-12-25_9-20-11.png
    Same effect on the right side... I need it to remain where it is so I can calculate the length of the road accordingly, otherwise it messes up my numbers,

    Thoughts how this can be resolved?


    Note even after removing the newly created road, the T crossing remains uneven:

    upload_2021-12-25_9-30-6.png
     
    Last edited: Dec 25, 2021
  11. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Can you try to disable "Activate Bending" in the Connection prefab settings, the "General Settings". That will force 90 degree corner angles and the connection sizes will remain the same.

    Thanks,
    Raoul
     
  12. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Yessir that works, thank you =)
     
    raoul likes this.
  13. Funtyx

    Funtyx

    Joined:
    May 3, 2017
    Posts:
    37
    upload_2021-12-29_23-56-43.png
    Can't figure out how to inherit the road curb at the intersection so that it appears bulky on the road. In your RA Road example, the road curb is three-dimensional, but you haven't applied any side objects there. How to make a voluminous curb on the road?
     
  14. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Funtyx,

    The "RA Road" road type is an example of how custom road shapes can be done in v3.2. The curb is actually part of the road shape. The road shape is derived of the "X Crossing RA Prefab" which is based on a model imported into the system.

    From the drawing it is not entirely clear what you like to do.

    In general, in v3.2 built-in sidewalks can be created by setting the sidewalk shape on the crossing prefabs. Are you familiar with that concept? The green handles at each crossing corner can be toggled on/off. This will set the sidewalk active state on connected roads.

    So sidewalk options are integrated in the road network itself, that way they will also be generated on intersections. But they can also be created with the side object system. In that case, the sidewalks can be added manually on intersections.

    In v3.3, available in betas, the sidewalk system will get a further upgrade. Sidewalk presets can be set in the General Settings tab in the Inspector. The default sidewalk type can be set per road type. They can be generated automatically or activated / deactived per individual road. Hopefully next week a new beta will be available with new crosswalk options.

    Thanks,
    Raoul
     
  15. MatheusPereiraBarros

    MatheusPereiraBarros

    Joined:
    Feb 21, 2015
    Posts:
    10
    Hello, Raoul.

    I was watching more videotutorials about EasyRoads and I saw a thing that interested me:



    The 3D model of roundabout and road in this old video (
    ) in image above, but, I can't found in demo package, and not found in EasyRoads3D main package too.

    Is it possible for you to make these 3D models available?
     
  16. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735

    Hello MatheusPereiraBarros,

    These were example assets for the Custom Connection system in early v3 beta packages.

    I will see if I can find these assets.

    Thanks,
    Raoul
     
    MatheusPereiraBarros likes this.
  17. MatheusPereiraBarros

    MatheusPereiraBarros

    Joined:
    Feb 21, 2015
    Posts:
    10
    Nice!

    I hope you find and share these models.

    Happy new year and good wishes!
     
  18. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    I will check backups of the early v3 packages next week and let you know.

    Happy New Year!

    Raoul
     
  19. cr281164

    cr281164

    Joined:
    Mar 5, 2013
    Posts:
    14
    For some reason I am not getting the Move Tool Gizmo when I click on a marker. I get the Rotation Tool no problem but not the Move Tool. I thought I noticed in your most recent demo that you do not seem to get the Move Tool either?
     
  20. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello cr281164,

    There are no known issues with this, so hopefully you have further info.

    Which Unity version and EasyRoads3D version do you use?

    And where exactly did you see that that we do not get the Move Tool either? Perhaps that will help identifying the problem.

    Thanks,
    Raoul
     
  21. cr281164

    cr281164

    Joined:
    Mar 5, 2013
    Posts:
    14
    I am using Unity 2020.3.25f1. The info tab says I am using EasyRoads3D v3.3.b4 but the version I had downloaded from the Package Manager was 3.2.1f2. Either way, I doesn't seem to work on either. The video I saw was the V3 Intersections Work in Progress back on page 1 of this forum. The connector showed the Move Tool when you added one but when you selected the marker it did not. I will try to import into a clean project to see if I still have the issue. My project has Gaia in it as well so it may be causing an issue.
     
  22. cr281164

    cr281164

    Joined:
    Mar 5, 2013
    Posts:
    14
    Seems it works with the demo scene in my project so it must be related to my scene. I will eliminate some of the other parts and see if I can work it out.
     
  23. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Unity 2020.3.x should work just fine. There are issues with handles in Unity 2021.2.x up to belief Unity 2021.2.3 this can affect EasyRoads3D behaviour. But this is fixed in the latest Unity releases.

    Regarding the video where you saw this happening, it would be useful if you have a direct link and a timestamp so we can see the exact state of the road network at that point.

    Otherwise, if you want you can email us the project / scene, so we can look at it on our end. The scene can be stripped to required assets only so the issue is still replicated.

    Thanks,
    Raoul
     
  24. cr281164

    cr281164

    Joined:
    Mar 5, 2013
    Posts:
    14
    Thanks. I have got it working. When I initially clicked on a marker it didn't work in my scene. I had to press W twice and it appeared.
     
  25. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Do you mean with the Move Tool already selected? That would be strange.

    Pressing the W key more than once toggles the orientation of the Move Gizmo between horizontal and the road direction. This can be useful for more control in hilly areas.

    Thanks,
    Raoul
     
  26. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hey @raoul

    i'm having this message in console when build the terrain with "Update Terrain Splatmap" setting enabled... This was working properly the other day...

    It's kinda hard for me to debug ER3D... for example i don't understand this message!
    Can you give some hint what could cause this error so i can fix it !?
    Everything seems to have proper references in editor though !

    Thanks !

    upload_2022-1-5_10-14-20.png
     
  27. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi @Vagabond_,

    That is strange, this is related to going through all ERModularRoad components. Looking at the code it is not likely a NullReferenceException error is thrown here.

    Did anything change to the road objects? Can you save the scene and try: General Settings > Scene Settings > Refresh Road Network (near the bottom).

    Otherwise we will have to debug this which should be fairly simple. In that case please let me know which version you are using and which Unity version.

    Thanks,
    Raoul
     
  28. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi raoul. i actually fixed it using you suggestion... as i did duplicated the road in the scene to use it for the mini map i have, the duplicate road left with the "ER Modular Road" component attached... After i removed the component it got fixed, which makes sense as the road wasn't in the Road Network hierarchy but was parented to a separate game object instead !

    However it also throws this error, where i can't find an object called "surface"... any ideas !?
    upload_2022-1-5_13-40-36.png
     
    Last edited: Jan 5, 2022
  29. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Did you manually duplicate the road object or did you use the "Duplicate Object" option in the main road settings in the Inspector?

    This surface object is an hidden object in the hierarchy. It is still not entirely clear what the situation is on your end, but it seems you want to duplicate road objects for a different purpose then using it within the road network creation system. In that case, what you could do is toggle off "Terrain Deformation" in the main road settings. This will remove this surface object.

    But I am not sure if that will work because you mentioned that meanwhile you removed the ERModularRoad component. By doing that the road object is no longer editable. Another way to remove this surface object is through a script on this road object and use:

    hideFlags = HideFlags.None;

    on all child objects. That will show this surface object in the hierarchy.

    Thanks,
    Raoul
     
    Vagabond_ likes this.
  30. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Cheers man... i will try to fix it based on your suggestions !
     
  31. slamon

    slamon

    Joined:
    Oct 11, 2014
    Posts:
    13
    Hello, Raoul! Merry Christmas and Happy New Year!
    It's me again :)
    I just wanted to know: do you plan to introduce Y dynamic crossings in near future releases?

    P.S. Yes, I know that I can do it via custom prefabs and I bought even HD-roads from Unity Store with different ready prefabs. But I cannot use it as fact, because custom prefabs have limited fixed geometry, and if I wish to use it with my different road widths - I have to model it via some graphical editor
     
  32. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi slamon,

    Happy new year!

    Dynamic Y crossings can be done with the Flex Connector in v3.3 which is available in beta releases on our website.

    Thanks,
    Raoul
     
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    @slamon,

    Here is an example of a v3.3 Flex Connector with dynamic angles. The new sidewalk / crosswalk options will be part of the upcoming new v3.3 beta release.

    crosswalk.jpg

    Thanks,
    Raoul
     
  34. slamon

    slamon

    Joined:
    Oct 11, 2014
    Posts:
    13
    Hi, Raoul!
    Yes, I'm trying to use FlexConnector for my purposes, but I have receive strange results:

    If the angle is about 45 degrees - everything is ok. But with more sharper angles there are problems:

    screen_1.png

    screen_2.png

    You can see the main problem:
    screen_3.png
     
  35. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi slamon,

    v3.3 is in beta, so not 100% stable.

    There is a limit in the corner angle, I guess what happens in the first image is related to that although this angle limit should result in something like the below (taking into account the road widths in your image:

    crosswalk2.jpg

    So the question is, what exactly happens on your end? It seems these triangulation issues start to happen at a specific angle? Does that angle more or less match the angle in the above image?

    In image 2 it seems the idea is to split something like a 4 lane road in two 2 lane roads. The way you did that is by using the 2 lane road as the main road and connect the 4 lane road.

    That is a situation not ideal for a Flex Connector, at least not at these road angles. So many different real world road situations, there will always be limitations, especially in an early stage....

    But there are a couple of ways to improve the triangulation in this type of situations from a coding point of view, I have made notes of that.

    One thing you can try with the current beta on your end is, use large corner radiuses for the corners on the wider road. By doing that and using different offset values on the road materials, I get this result:

    crosswalk3.jpg

    Often beta debug conversations like for the first image can better be done in a private conversation because it can easily result in back and forth posts causing a bit of noide here on the public forum :)

    Thanks,
    Raoul
     
  36. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Hi,
    I haven't worked on my EasyRoads road network since last summer, so I got the latest 3.3 beta and I'm trying to switch to the new sidewalk system. I deleted all the sidewalk child objects in the road network, and am adding sidewalks using the 3.3 Preview method. Works great on roads, but I can't figure out intersections. See screenshots -- what do I do to add them? When I have the intersection selected with the Road Network as the active selection, there's no toggle to enable sidewalks. When I select the intersection in the hierarchy, then there is a toggle -- but it adds sidewalks to the connecting roads as well as to the intersection (and the wrong type of sidewalk). Can't figure out how to do this correctly....

    EasyRoads-Intersection sidewalks1.JPG EasyRoads-Intersection sidewalks2.JPG
     
  37. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi Dave,

    The two images show an X Crossing based on the current workflow in v3.2. The 3 handles in each corner are related to this specific system.

    In v3.3 sidewalk presets can be created in General Settings > Sidewalks

    Sidewalks can be auto activated for road types and they can be activated / deactivated per road object.

    This new sidewalk system currently works on Flex Connectors only, the new connection type in v3.3. V3.2 connections can be turned into a Flex Connector, see the "Flex Connector" checkbox in the Inspector in your first image. After doing that the Inspector options will change, sidewalk options will be visible for each connection.

    And at this point changing sidewalk active states and types on road objects will also auto update the state for that road on the connections.

    This is beta, so please backup your scene first before changing the connections in the scene to Flex Connectors.

    Thanks,
    Raoul
     
  38. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Ah, thanks!

    Okay, getting there....but I'm having trouble getting the corner sidewalks to work. When I make Left SIdewalk active here, I get a sidewalk like this:

    EasyRoads-corner1.JPG

    With that gap between it and the other street's sidewalk. But when I make Right Sidewalk active, then I get overlapping polygons with z-fighting and still a small gap:

    EasyRoads-corner2.JPG

    What am I doing wrong now?

    thanks!
    Dave
     

    Attached Files:

  39. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    In the last pages here I have made some comments about the implementation of sidewalks in v3.3. It is complex, your situation is an example of that.

    The Flex Connector setup in your image does not have smooth corners, one road is attached to the other. This means that indeed as visible in your images the sidewalks on both roads on this corner have to be generated separately.

    This will be a lot more stable in the upcoming update, see the image I posted further above. The concept is the same sidewalks generated seperately for both road sections, https://forum.unity.com/threads/eas...-new-road-system.229327/page-204#post-7784787

    If you want I can send a build tomorrow for you to test so you can see if that indeed works better.

    Thanks,
    Raoul
     
  40. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Ah, okay. I'd love to get the new beta, thanks!
     
  41. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Ok, which version of Unity are you using?
     
  42. kanpyo1301

    kanpyo1301

    Joined:
    Sep 22, 2021
    Posts:
    3
    Hello. Thank you for providing a great tool.

    I'm considering implementing EasyRoads 3D in my project, but I'm running into a problem.
    After importing EasyRoads into a newly created HDRP project with Unity 2020.3.20f1 LTS or 2020.3.25f1 LTS, when I select the generated Road Network object, I keep getting NullReferenceException and GUI Error occurs continuously and the GUI of ER Modular Base script is not displayed.
    HDRP 10.7.0.
    I have already applied "HDRP_10_3_2" in SRP Support Packages to my project.
    NullReferenceException.PNG GUI Error.PNG

    However, it works fine in a newly created environment with 2021.2.7f1 HDRP, and seems to occur only with 2020.3.

    // The environment where the problem is occurring
    2020.3.20f1 LTS and 2020.3.25f1 HDRP
    EasyRoad3D Pro v3 v3.2.1f2

    Is there any way to deal with this one?
    I would appreciate your opinion.
    Thanks!
     
  43. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hello kanpyo1301,

    The errors are not clear and there are no known issues in Unity 2020.3.x so there is no staright answer to this.

    How have you been testing this? Upgrading projects, starting new projects?

    Did something went wrong during the package import? Have tried again in a new project just as a test?

    Since you mention HDRP, does everything work well in a standard Unity 2020.3.20f1 LTS?

    What is the very first error that is thrown?

    Was the road network created through the main Unity menu? Have you tried this with the small demo scene? Do you get the same errors when selecting the road network object in this scene?

    Thanks,
    Raoul
     
  44. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    2019.4
     
    raoul likes this.
  45. kanpyo1301

    kanpyo1301

    Joined:
    Sep 22, 2021
    Posts:
    3
    Hi Raoul. Thanks for your reply.
    Please excuse me for my poor English.


    I was checking with a newly created HDRP project to confirm the behavior before applying EasyRoads3D to the production project.
    I will describe the detailed procedure where I confirmed the error.

    1. Create a new HDRP project from Unity Hub, Unity version is 2020.3.20f1.
    2. Right-click on the hierarchy -> 3D Object to create a Terrain.
    3. Import EasyRoads3D Pro v3 (v3.2.1f2) from the Package Manager.
    -> No errors are observed, especially in importing.
    4. Right click on the hierarchy -> 3D Objects -> EasyRoads3D and create new Road Network
    -> Multiple errors are continuously thrown to the console.


    The following is the answer to the question I received.

    //How have you been testing this? Upgrading projects, starting new projects?
    This is a new project.

    //Did something went wrong during the package import?
    //Have tried again in a new project just as a test?
    The package import is working fine. The problem occurs even in a newly created vanilla project.

    //Since you mention HDRP, does everything work well in a standard Unity 2020.3.20f1 LTS?
    Yes, I don't seem to be experiencing any problems with the standard features at the moment.

    //What is the very first error that is thrown?
    The first error is shown in the image below.
    1_TypeLoadException.PNG 2_NullReferenceException.PNG 3_GUI Error.PNG 5_NullReferenceException.PNG

    //Was the road network created through the main Unity menu?
    //Have you tried this with the small demo scene?
    //Do you get the same errors when selecting the road network object in this scene?
    I've tried creating the Road network object both in the main menu and in the hierarchy.
    I also tried with a simple scene (only Main Camera and Directional Light exist), and the symptoms are the same when I create a Road network object using the same procedure.
    capture.PNG

    All of the above issues are not present in 2021.2.7f1, only in 2020.3.20f1 LTS...


    Sorry for the trouble. Thanks!
    kanpyo
     
  46. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi kanpyo,

    Ah, the first error (the in blue highlighted line mentioning "prefabStage") shows the problem and this is confirmed by the fact that you have been using EasyRoads3D also in a Unity 2021.2.x project. All other errors are a result of this.

    The Unity 2021.2 update was one of those Unity updates where quite a few things changed, among which the location of the prefabStage class. It requires a different EasyRoads3D package which is downloaded when the Unity 2021.2 editor is active.

    Unfortunately this is not automatically dealt with when importing the EasyRoads3D package in an older Unity version. The same Unity 2021.2 package will be imported from the cache. This is what causes the problem.

    Can you try to force a new download from the Asset Store in your 2020.3.20f1 project or empty your cache? Does that work better?

    Thanks,
    Raoul
     
  47. kanpyo1301

    kanpyo1301

    Joined:
    Sep 22, 2021
    Posts:
    3
    Hi Raoul.
    Thank you for your reply.


    Luckily, the method you gave me seems to have solved the problem.

    After manually deleting the unitypackage of EasyRoads3D Pro, I re-downloaded it from the package manager in 2020.3.20f1 and followed the same procedure to check the Road Network object, and the error no longer occurs.

    Now I can proceed to check the operation of EasyRoads3D.

    Since the specification of "prefabStage" is different between 2020.3.x and 2021.2.x, I understood that I need to pay attention when different versions of the project coexist.


    Thank you for taking the time to respond. I will contact you if I have any further questions.
    Thank you very much!
    kanpyo
     
    raoul likes this.
  48. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi kanpyo,

    Glad to hear that indeed fixed the issue.

    Yes, in case you will continue to use different Unity versions, Unity 2021.2.x projects does require the package specific to that version. So when it happens again that you get errors when selecting the road network object, try downloading the package again from the asset store instead of from the cache.

    Thanks,
    Raoul
     
  49. NotoMuteki

    NotoMuteki

    Joined:
    Feb 8, 2018
    Posts:
    42
    ER3D Pro v3.3.b2

    When I create road from the Connection, sidewalk material becomes mismatching.
    sidewalk.png
    So I created a new road from "Add New Road" and connected to the Connection,
    but the result was the same.
    In Mesh Renderer settings sidewalk's material is assigned correctly,
    but the actual appearance looks like road material.

    Is there any way to fix this?
    I would appreciate your opinion.
    Thanks!
     
  50. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Hi NotoMuteki,

    What type of connections are you using? I am asking this because the road material seems to be damaged asphalt material from the HD Roads Add On package. This package uses sidewalks as side objects.

    Are you using the new sidewalk system in the v3.3 beta?

    Also, especially for beta versions, it is recommended to upgrade to the latest version. If this is indeed the v3.3 sidewalk system than I can also send an alpha build of the upcoming update. This version includes many sidewalk improvements.

    Thanks,
    Raoul