Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Way to get objects script from generator
#1
Heya again, sorry I know you sorta answered this question in other posts but I was curious in a more broad sense. 

My game uses generators to create gameobjects on splines that have behaviors. In this case my game objects are called "Blocks" and have a bunch of components that drive them. The block is initialized via a setup, and all the modules that are a part of it follow suite. 

I have a few questions

1) Is there a way to get direct access to this type in a fast way? Currently I use OnRefresh to grab the list of them via GetComponent(). GetComponent Ive always heard is rather slow, and considering this is a realtime editor, I was wondering if there was a faster way.
   
2) Are the gameobjects created pooled? I know you said yes however I'm wondering if I were to call a setup function for my blocks, would that setup persist when generating more? 

3) This is more asking for your opinion or advice. 

For spline walls, I generate a few different things. 

- Wall Segment Curvy Generator, this generates walls along the spline but not on any of the Control Points. 
- Custom Tower Generator, this just spawns towers by checking each control point. Currently it can overlap them, but I plan to have a system that checks a tower exists already. Based on the wall type Ill prob have it override it. 
- Collision Collider, this is a collider I generate along the spline to handle checking if I'm intersecting (to not allow building) as well as spline snapping. 

I then feed this all into my core modules and handle behavior such as wall destruction, or previews for building and things.

My question is if you think the way I'm handling it makes sense (mixing generators/custom spawners), or if you think it'd be better to just write my own custom generation system based on all the questions I've asked.

This game needs to run fast as I'm intending to make it for pc/mobile for the client which is why I'm asking so many questions regarding performance as well as what you think would work best.


I really appreciate all the time you've taken to help me out. Any suggestions you have are welcome. 

I've inserted an example of my current layout.
   
Reply


Messages In This Thread
Way to get objects script from generator - by Lupos - 05-12-2023, 02:11 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation Extending Curvy Generator for Advanced Lofting - Feasibility Check amutp 2 4 03-27-2024, 07:25 AM
Last Post: amutp
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 0 7 03-27-2024, 03:23 AM
Last Post: _Aka_
  Adjust radius of generated mesh via script? Shackman 1 3 03-26-2024, 01:12 PM
Last Post: _Aka_
  Generating GO only on CPs in Generator GameDeveloperek4123 1 6 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: