Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about generator
#4
(02-11-2021, 06:53 PM)Mos Def Wrote: No worries your support is super ,



To make sure I understood the answer. You mean if the Spot Generator for example created 20 trees and 10 street light ( these are simple game object with sprite renderer) on range from: 0 to 0.25 . and I then updated the generator range to be from 0.25 to 05 and make refresh, then the generator will use these 20 trees and 10 street lights game objects that was already created , I am i right here?



Yes you are right.



Let me explain to you how pooling works in Curvy Generators:



If you select your Curvy Generator game object, you will find that it has zero or multiple components of type Prefab Pool and Component Pool. These components are added automatically to the CG depending on its needs. You are not supposed to add them yourself. The whole pooling process is supposed to be transparent to the users.



Both Prefab Pool and Component Pool behave similarly, and are parametrized similarly.



Prefab Pool, unlike what its name suggests, does not pool only prefabs, but also normal game objects. So no worry, if you use a normal gameobject as an input to your Spot Generator, it will be pooled too. This badly chosen name, and other badly chosen names and weird design decisions do bother me, but since 99% of users don't have to touch anything related to pools, this makes a refactoring of the pooling related code not at the top of my todo list.



If you go to the inspector of one of those pools, you will see something like this (I modified the parameters values):



   



The Debug option allows you to log all what the pool does, so you can know when it creates new objects.



The pool starts empty, so the first batch of your 30 objects will be created at the first CG update. Then at every update, these objects will be pushed in the pool when clearing the existing objects, and popped from it when generating the 30 new objects.



The Min Items option allows you to define a number of objects that should be all the time available at the pool.

The Threshold option is a Max Items option, but badly named.



Every-time the number of items in the pool is outside of those two boundaries, the exceeding/lacking objects will be removed/created, at a speed that is supposed to be the Speed value. But the actual speed is something different. Either I don't get the intention of the person who implemented the Speed thing, or it is bugged (I lean towards the second explanation).



Finally, the pooling is intentionally deactivated in edit mode. Why? I have no idea.

I explained all this just to give you more knowledge about how things work, but keep in mind that you almost certainly don't need to parametrize anything related to pools. Cases where the default parameters need to be modified are rare

Let me know if things are still not clear
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


Messages In This Thread
Question about generator - by Mos Def - 02-09-2021, 08:50 PM
RE: Question about generator - by _Aka_ - 02-11-2021, 09:04 AM
RE: Question about generator - by Mos Def - 02-11-2021, 06:53 PM
RE: Question about generator - by _Aka_ - 02-11-2021, 08:54 PM
RE: Question about generator - by _Aka_ - 02-11-2021, 08:55 PM
RE: Question about generator - by Mos Def - 02-12-2021, 08:16 AM
RE: Question about generator - by _Aka_ - 02-12-2021, 08:25 AM
RE: Question about generator - by _Aka_ - 04-10-2023, 10:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 1 10 04-03-2024, 03:16 PM
Last Post: _Aka_
Exclamation Extending Curvy Generator for Advanced Lofting - Feasibility Check amutp 2 5 03-27-2024, 07:25 AM
Last Post: amutp
  Generating GO only on CPs in Generator GameDeveloperek4123 1 7 03-04-2024, 11:06 AM
Last Post: _Aka_
Question Generator Canvas workflow issues Sacryn 1 7 02-02-2024, 11:22 PM
Last Post: _Aka_

Forum Jump: