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
  Generator gameobjects missing offset and rotated beewhale 1 25 5 hours ago
Last Post: _Aka_
  How to rotate generator asteroids patndan74 6 4,351 05-08-2025, 10:07 PM
Last Post: _Aka_
  Method of scattering objects along spline joebain 1 1,638 11-26-2024, 03:20 PM
Last Post: _Aka_
  making objects solid cielpandapie 1 1,539 10-18-2024, 12:17 AM
Last Post: _Aka_

Forum Jump: