Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Way to get objects script from generator
#2
Follow up on this question, I tried using the createGameObject module to get my wall game objects and call functions.
Using the OnRefresh callback I was able to access the items via createGameObject.GameObjects.Items.

This worked however in an attempt to slightly optimize my preview stuff (basically just applies a material property block to each wall when preview toggle is set) I tried to optimize this by having OnRefresh add the Preview component I needed to a cached list. On every refresh, I'd clear the list and update. This way if I moved the cursor slightly and the preview changed but the wall amount didn't, I wouldn't need to regrab all the wall modules again.

The issue is that I think the way the pooling works, its constantly changing out the objects anytime it regenerates? And thus my caching doesn't work all the time and I'm forced to rebuild the list of the wall modules.

There has to be some better way to handle this right?
Reply


Messages In This Thread
RE: Way to get objects script from generator - by Lupos - 05-12-2023, 02:42 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
  Adjust radius of generated mesh via script? Shackman 1 4 03-26-2024, 01:12 PM
Last Post: _Aka_
  Generating GO only on CPs in Generator GameDeveloperek4123 1 7 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: