Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a ring of rectangles, then create series of rings to create a cylinder
#3
Hi,

Here is the code modification to avoid your issue. Go to CurvyGenerator.cs, and in the Initialize method, replace the first for loop with this one:
Code:
for (int i = 0; i < Modules.Count; i++)
               {
                   CGModule cgModule = Modules[i];

                   if (!cgModule.IsInitialized || force)
                       cgModule.Initialize();

                   //This happens for example if a generator creates GameObjects that are generators themselves
                   if (cgModule.Generator != this)
                       continue;

                   if (ModulesByID.ContainsKey(cgModule.UniqueID))
                   {
                       Debug.LogError("ID of '" + cgModule.ModuleName + "' isn't unique!");
                       return;
                   }
                   ModulesByID.Add(cgModule.UniqueID, cgModule);
               }

I still recommand you to use GO ring as a way to make the ring, and put the ring itself, stripped from the generator, as an input to the second generator. This way you will use less CPU and memory.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
RE: Creating a ring of rectangles, then create series of rings to create a cylinder - by _Aka_ - 09-07-2019, 10:17 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Heart Create beautiful curves ShiroeYamamoto 3 9 03-26-2024, 06:25 PM
Last Post: _Aka_
  Is it possible to create a road texture at runtime? artsung 1 4 01-30-2024, 09:30 AM
Last Post: _Aka_
  Combine 2 Create Mesh nodes to one single Mesh danne_lindwall 1 13 02-16-2023, 08:25 PM
Last Post: _Aka_
  How to create gaps in spline mesh? linkinballzpokemon 1 6 04-09-2022, 12:29 PM
Last Post: _Aka_

Forum Jump: