|
Post by alienhead on Feb 6, 2024 18:28:25 GMT
I'm trying to replace the Instantiates' from a controller package I purchased awhile back. What I'm not understanding with pool boss is it wants a transform variable when I'm requested a gameObject that I have preloaded into the pool. Why can't I simply ask for the gameObject that is preloaded in the pool. This extra step has me thrown off. In other words, how do I simply request a gameObject that is preloaded from the pool.? Here's the error I get when trying to replace a Instantiate command in the controller.
|
|
|
Post by alienhead on Feb 6, 2024 21:12:14 GMT
Also, is it possible to pool a particle prefab? I have a prefab with 3 particle systems attached to it.
|
|
|
Post by alienhead on Feb 7, 2024 14:19:26 GMT
The Docs say the Pool Boss can also be used to pass in and out gameObjects, to refer to the API docs. I have been over every inch of those docs and not mention of how to do this. Any advice?
Oh and is there actually anyone monitoring these forums anymore?
I was really interested in Master Audio asset but not if we can't get the simplest of replies on other stuff.
|
|
|
Post by DarkTonic Dev on Feb 7, 2024 14:50:04 GMT
We reply at least once a day during weekdays. It looks like the first screen shot, you're using the overload that takes a string of the prefab name you want to instantiate. If you at the API website: www.dtdevtools.com/API/poolboss/class_dark_tonic_1_1_pool_boss_1_1_pool_boss.htmlyou'll see there's also one that accepts Transform. We use Transform instead of Game Object so that we don't have to do a GetComponent call to get the Transform. The Transform object is what we use to set its position. We don't need the Game Object for as much, if anything. If you have the Game Object reference already, you can do .Transform and pass that in, and it should be fine. Alternatively, your script may have public Transform fields where you assign prefabs in the Inspector. Just pass that in. But anyway, for your screenshot, put a .Transform after "MuzzleEffect". Yes you can pool Particle prefabs, just pool it like anything else. Here's a mention in the readme. Note: If you want to spawn Particles or audio items, make sure to attach the Timed Despawner script to those prefabs and set the Life Seconds to the amount of time the audio should play or the amount of time the particle takes to disappear. Then these prefabs will return to the Pool. However, if you need a more complete audio solution, we do recommend that you check out our flagship product Master Audio. Point to to which part of the docs you're referring to on your last question. Thanks! Brian
|
|
|
Post by alienhead on Feb 7, 2024 15:04:50 GMT
Thank you very much, it does look like a fine product and I have been trying to get it to work. I'm going back in. Tyvm.
PS: I been watching the videos on Master Audio and that asset looks outstanding, I can't wait to finish up with this pooling stuff and move on to the cool things.
|
|
|
Post by DarkTonic Dev on Feb 7, 2024 15:07:24 GMT
No problem. BTW most of the Master Audio videos are pretty old. The UI generally looks a lot better than what you see in most of them. We will be doing a new video for the next release, which we haven't done for several years. We have several large AAA game studios with bulk licenses for Master Audio and always keep updating it.
Cheers!
|
|
|
Post by alienhead on Feb 7, 2024 22:16:24 GMT
I do hope I'm not being a pest but I have been working on this for 7 hours today and made no head way other than the fact that I actually have the pooling working now. When it comes to my bullets it's another story. I have setup a pool with 50 bullets in it, the first time through everything is fine. After I get a reused one something weird happens. The bullets work up into the point they hit something, then they start moving extremely slow and floating around in the air. The hit on a surface is not detected although the rigid body is still working because when they floating they do collide with stuff. Has anyone experienced this ? What might I do ?
|
|
|
Post by DarkTonic Dev on Feb 8, 2024 0:03:01 GMT
Make sure and reset all state, including any physics forces, in the OnSpawned method (not Start or Awake). That's pooling basics for you.
|
|
|
Post by alienhead on Feb 8, 2024 22:36:16 GMT
Ahh ty, the top down controller had a _impact variable in it, i had to set it back to false to make it work.. TYVM and I love this asset ( now ). Next month I'm going to be getting into the Master Audio so you'll probably be hearing from me again lol. I just got to sweetin the wife up now for another unity asset expenditure.
|
|
|
Post by DarkTonic Dev on Feb 9, 2024 1:39:52 GMT
Any time. You absolutely can't go wrong with our stuff. We'll be here.
|
|