playMaker

Author Topic: SmartPool released with custom actions  (Read 22161 times)

brendang

  • Junior Playmaker
  • **
  • Posts: 63
    • Out to Play Interactive
Re: SmartPool released with custom actions
« Reply #15 on: February 18, 2013, 11:02:47 AM »
Jake, did you see my post on your own forum?

Lobohotpants

  • Playmaker Newbie
  • *
  • Posts: 38
Re: SmartPool released with custom actions
« Reply #16 on: March 14, 2013, 11:49:44 PM »
I'm using photon to instantiate my objects over the network.  Can I still use smartpool?  How does the spawning work in this case?

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #17 on: March 15, 2013, 05:26:45 AM »
Hi,

The key question will be if Photon is able to tell you that an object needs to be created instead of creating it directly. So if Photon has an event for this, the use of SmartPool is possible.

I never worked with Photon, so hopefully someone else can answer this. If not, I'm gonna checkout Photon this evening to give you a qualified answer then.

Jake

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: SmartPool released with custom actions
« Reply #18 on: March 15, 2013, 05:43:08 AM »
So i read through this topic and before i buy SmartPool i wanted to know if it is fully functional with PlayMaker. Are there some other errors? And is it compatible with Unity 3.5 ?

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #19 on: March 15, 2013, 06:13:03 AM »
Hi Mayhem,

Quote
So i read through this topic and before i buy SmartPool i wanted to know if it is fully functional with PlayMaker.
Yes, all major commands are covered by custom actions, in detail:
  • Prepare
  • Spawn
  • Despawn
  • DespawnAll
  • Kill
  • Cull
Only GetPoolByItem / GetPoolByName aren't covered, but I can't think of a playMaker scenario that will need those methods. However, I'll implement them if requested by one of my customers.

Quote
Are there some other errors?
Other than what errors? I don't know of any unfixed errors.

Quote
And is it compatible with Unity 3.5 ?
Yes, it is, the AssetStore package was submitted using Unity 3.5.7.

Jake

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: SmartPool released with custom actions
« Reply #20 on: March 15, 2013, 06:29:00 AM »
Allright, thank you :)

Refering to the errors:

For example:

Quote
Hey, in the SmartPool script on the asset store it has a #if UNTIY_4_0  instead of #if UNITY_4_0. Gave me a bunch of errors.

I know that you solved that, but i just wanted to be sure there are not any other problems you might heard of in your forums or something like that :)

Thanks for the support, i will go and grab it :D

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #21 on: March 15, 2013, 08:03:33 AM »
Quote from: Mayhem link=topic=2844.msg15492#msg15492
I know that you solved that, but i just wanted to be sure there are not any other problems you might heard of in your forums or something like that :)

Ah, ok  ;D If I get aware of problems/errors in one of our packages, I'll fix them asap and (if it takes longer) write about temporary workarounds until the updated package arives in the assetstore.

Interestingly I don't get many error reports from our customers. I don't know exactly why. Some errors I found&fixed by myself must have been realized by others, too, so I wonder why noone wrote a short note to get it fixed...

Quote
i will go and grab it

Thank you very much! Don't forget to vote it in the Assetstore, we really appreciate this.

Cheers,
Jake
« Last Edit: March 18, 2013, 03:19:26 AM by Jake »

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: SmartPool released with custom actions
« Reply #22 on: March 15, 2013, 09:25:13 AM »
Just another question, nothing PM specific though.

Is it possible to compare Tags between Objects in the Scene and Objects in the Poolmanager, whether they are spawned or not.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: SmartPool released with custom actions
« Reply #23 on: March 15, 2013, 10:11:00 AM »
Hi,

 I don't see why photon and pooling would not work together just fine. Photon instantiate a prefab that MUST be in the Resources folder, that's the only requirement, then of course the gameObject should have a photon view component attach, but that's not something that would get in the way of the pooling system.

bye,

 Jean

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #24 on: March 15, 2013, 04:37:49 PM »
@jean: I had a quick look at PhotonNetworkInstantiate.cs. Shouldn't it be sufficient to copy&paste this into a new script and replace the prefab instantiation with a call to Pool.Spawn() ?

@Mayhem: Do you want to check if an object was spawned by a pool? That's possible (IsManagedObject() and IsSpawned()), though not accessable through pm actions right now. I can provide those actions, if you want.

Jake

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: SmartPool released with custom actions
« Reply #25 on: March 15, 2013, 04:41:23 PM »
That would be amazing! :D

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #26 on: March 15, 2013, 05:02:28 PM »
Ok, I'll add them. For what scenario do you need them? I ask because I've changed Despawn() in v1.2. If you call it with an unmanaged object, that object now will be destroyed. So calling Despawn(gameObject) ensures that the object will be always gone. Just in case that solves your problem...

Mayhem

  • Full Member
  • ***
  • Posts: 171
Re: SmartPool released with custom actions
« Reply #27 on: March 15, 2013, 08:51:05 PM »
I want it for my Inventory-System and checking which Item was picked up.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: SmartPool released with custom actions
« Reply #28 on: March 18, 2013, 02:57:09 AM »
Hi Jake,

 yes, you will likely have to make a custom action to instantiate your player using a pooling system.

bye,

 Jean

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #29 on: March 19, 2013, 02:45:03 PM »
SmartPool v1.02 has arrived in the AssetStore and the custom actions package has been updated!