Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Input Spline Shape @ Runtime
#2
For others ... took a while, but I figure this out too.  You create a Generator in the editor and put all your shapes into the editor.  Then create an attribute:

    public InputSplineShape[] Roads;
    
That has a reference to each of the shapes you created in the ditor.

During runtime, after you've constructed the generator, you copy the appropriate shape to the generator for the shape of the road.
    
    var GENERATOR = CurvyGenerator.Create();
    var SHAPE = Roads[0].CopyTo(GENERATOR);

As for the materials, simply assign it to the volume:

    var VOLUME = GENERATOR.AddModule<BuildVolumeMesh>();
    VOLUME.SetMaterial(0,RoadMaterials[0]);


Jake, any other comments/suggestions?
Reply


Messages In This Thread
Input Spline Shape @ Runtime - by Elenesski - 09-13-2016, 04:49 AM
RE: Input Spline Shape @ Runtime - by Elenesski - 09-13-2016, 07:43 PM
RE: Input Spline Shape @ Runtime - by Jake - 09-21-2016, 07:15 PM
RE: Input Spline Shape @ Runtime - by Elenesski - 09-22-2016, 08:44 PM
RE: Input Spline Shape @ Runtime - by Elenesski - 10-02-2016, 08:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Spline Issue Leading to Unity Freeze Pankaj09 1 330 08-24-2026, 11:28 PM
Last Post: _Aka_
  Connecting Multiple Spline Nodes Issue Ritesh Kadam 1 286 08-22-2026, 11:24 PM
Last Post: _Aka_
  Spline Spots from 2 samples. BitBlit 8 1,353 06-30-2026, 11:49 AM
Last Post: _Aka_
  Best way to duplicate a spline with an offset Kapistijn 8 2,755 04-12-2026, 03:18 PM
Last Post: _Aka_

Forum Jump: