Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Batch processing of the Generator to create a bunch of Meshes
#1
Hi _AKA_,

I imported a bunch of Splines from OSM via JSON and I want to generate street meshes of it. I wrote a code for using the Generator and the included models for generating the different meshes, but and the end i have the same mesh a hundred times. The "generator.refresh(true)" function seems not to work the way I expected it. Confused Smile 

Can you help me out? I will send you a Link with my project in a pm.

Best wishes
HatraE
Reply
#2
Hi,

The reason behind your issue is that you are using the generator before it being initialized. This can happen if you are calling it in the Start method, depending on the order of execution of scripts. The solution is given here: https://curvyeditor.com/documentation/generator/start

In your case, that would mean:
Code:
IEnumerator Start()
    {
        // Wait until the generator is fully intialized before accessing it:
        while (!generator.IsInitialized)
            yield return null;

        if (doRendering)
        {
            ...
        }
    }

Let me know if you still have issues
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Cool! Thanks for the quick response with the individual solution. Worked perfect for me!
Reply
#4
You are welcome
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Issues with generated meshes TurboHans 2 108 10-30-2020, 10:01 PM
Last Post: _Aka_
  Frequent runtime updates of Curvy Generator for simulating plant growth using Splines h4ck3rd4wg 6 411 10-02-2020, 07:57 PM
Last Post: _Aka_
  Letting users create and edit splines at runtime skote 1 408 07-12-2020, 04:49 PM
Last Post: _Aka_
  How to create exactly N gameobjects at spline? ThomasTheTank 1 519 05-24-2020, 01:56 PM
Last Post: _Aka_

Forum Jump: