Search Unity

2018.3 Terrain System and Runtime Scripting Query

Discussion in 'World Building' started by Xrystal, Oct 24, 2018.

  1. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    203
    Thanks for finally starting work on the Unity Terrain. It has been my main use for Unity for a long time and I have finally figured a way of implementing my idea with its existing limitations ( no curvature, rotation capabilities etc so no true space to planet transition ) using fractal noise to generating the heights across the planet. But I have a few questions....

    How much of the existing Terrain and TerrainData scripting api have been changed to utilise these new features ?

    Will the way terrain tiles are generated via scripting api change significantly or at all with these changes?

    Will the new autoconnect tile and instancing flags have a script equivalent for runtime execution when terrain tiles are generated or will we still have to generate neighbour values on each terrain/terraindata object we create via code ?

    I currently use latitude/longitude values to generate height values which when transferred to the terrain and sized dependant on lat/lon per metre ratio allows me to build what looks to be a reasonable facsimile of a runtime planet generator. The normal streaming in of latitude/longitude for future tiles will be positioned next to its neighbour tiles and then stitched by code ready for the terrain LOD system to update based on distance.

    This relies on Terrain and TerrainData script functionality but I have been having problems accessing this information to see what changes if any are in those classes ( so far ). I assume this is a sign that that part of the terrain update hasn't been added to 2018.3. If that is the case then fine, if not why would I get errors regarding not having values such as System.Void on an empty MonoBehaviour class ?

    That's all that immediately spring to mind when I read about the new changes.

    And thanks again for all your hard work on this side of World Building.
     
  2. Xrystal

    Xrystal

    Joined:
    Mar 25, 2014
    Posts:
    203
    I see a lot of views and no resonses so thought I might add that a few days ago I did indeed see a change in the beta scripting documentation that the new items are being added for scripting functionality.

    I will assume that backward compatibility implies no change to existing functionality, although some may have additional functionality.

    I will also assume that the fundamental terrain generation steps haven't changed, just a few extra additional lines to implement/trigger the additional functionality.

    I also realised ( with the help of the scripting documentation ) that the reason I couldn't access the Terrain classes were because they are now under the TerrainModule namespace.