|
Post by gshooter on Mar 28, 2017 2:30:29 GMT
Hello DT, I am having a small issue with integrating UniBulletHell (UBH) with CoreGameKit (CGK). - Added the bullet prefab (a simple sprite rendered image) into the Pool Boss.
- I adjusted the values there with Preload Qty of 500 and then tried to either Allow Instantiate More to 1000. (I have tried to use the recycling option as well).
- No matter what happens, after about 300-400 bullets (or within 10 seconds), I get an insane amount of warnings "This bullet is already added in m_bulletList."
I've noticed that when I start the game in the editor, it creates a Bullet Object Pool and puts the bullet clones into it. The Pool Boss also has these clones but over time, they disappear and go into the bullet object pool. Thank you for your time.
|
|
|
Post by DarkTonic Dev on Mar 28, 2017 3:47:06 GMT
I don't understand that last sentence and I don't use that plugin (UniBulletHell). Does it have its own pooling (Bullet Object Pool sounds like it)? If so, you'll going to have to modify code so that you're only using one product's pools all the time.
|
|
|
Post by gshooter on Apr 18, 2017 21:19:11 GMT
Hey DT, I need to figure out how to return the UbhBullet object to the pool using the "UbhObjectPool.instance.ReleaseBullet" method. Log ------------------------------------------------------------------ DarkTonic.CoreGameKit.PoolBoss:Despawn(Transform) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/PoolBoss/PoolBoss.cs:858) DarkTonic.CoreGameKit.Killable:DespawnPrefab() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1275) DarkTonic.CoreGameKit.Killable:DespawnThis() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1442) DarkTonic.CoreGameKit.Killable:DespawnOrRespawn() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1401) DarkTonic.CoreGameKit.Killable:Despawn(EventType) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:1377) DarkTonic.CoreGameKit.Killable:PerformDeath(String, Boolean) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:933) DarkTonic.CoreGameKit.Killable:LateUpdate() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/Combat/Killable.cs:497) ------------------------------------------------------------------ For some reason, in the killable.cs, I can not reference the "UbhObjectPool". Here is a picture of what I attempted in the killable.cs script: i.imgur.com/nbothYQ.pngThank you for your time.
|
|
|
Post by DarkTonic Dev on Apr 18, 2017 21:30:17 GMT
You'll need to add a "using someNamespace;" at the top of the whatever script if you want to use a class in a different namespace (go look at the UbhObjectPool class and see what the namespace is). You shouldn't do that directly in Killable because every time you update CGK your update will be reverted. You should probably do it in a subclass of Killable that you create so that doesn't happen.
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on May 9, 2017 20:35:13 GMT
Hello DT, I am having a small issue with integrating UniBulletHell (UBH) with CoreGameKit (CGK). - Added the bullet prefab (a simple sprite rendered image) into the Pool Boss.
- I adjusted the values there with Preload Qty of 500 and then tried to either Allow Instantiate More to 1000. (I have tried to use the recycling option as well).
- No matter what happens, after about 300-400 bullets (or within 10 seconds), I get an insane amount of warnings "This bullet is already added in m_bulletList."
I've noticed that when I start the game in the editor, it creates a Bullet Object Pool and puts the bullet clones into it. The Pool Boss also has these clones but over time, they disappear and go into the bullet object pool. Thank you for your time. Contact Hironari (the creator of the UniBulletHell), he's a really helpful guy, i'm sure you'll work it out together.
|
|
|
Post by DarkTonic Dev on May 9, 2017 21:09:48 GMT
I've heard that as well.
|
|
|
Post by lifevirus on May 12, 2017 21:21:54 GMT
I'm the one who originally contacted Hiornari about the use of UniBulletHell and CoreGame Kit. There's a specific define that you have to change in the UbhObjectPool script if you haven't done so already. Open that up and remove the comment from the define and it should work properly though I don't use that many bullets for my game. If that was already done you may need to contact him directly then.
|
|
|
Post by DarkTonic Dev on May 12, 2017 21:58:25 GMT
Cool, thanks for the tip!
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on May 13, 2017 11:34:55 GMT
One more thing, it may appear to you that both pools are active, but don't worry, with define uncommented it only uses CGK's object pool.
|
|
|
Post by DarkTonic Dev on May 13, 2017 17:28:21 GMT
Oohhhhh, hmmm, interesting.
|
|