|
Post by onesoftgames on May 5, 2017 10:29:09 GMT
Hi, I am using pool boss in a fighter game. I create an enemy prefab and put it into pool boss. I can use enemy in code but how can i use enemy prefab in unity editor? In my case, I must create a wave of enemies with is follow by a shape, and I want to show it on the editor. Thank!
|
|
|
Post by DarkTonic Dev on May 5, 2017 15:59:24 GMT
Our Core GameKit plugin does that! It has wave set up and wave visualization. Upgrade from Pool Boss is only $15.
You could also put game objects that are spawners (you code) and assign a gizmo or renderer that's in a layer that's optionally not shown in the camera, but Scene View shows it. Then you can see the spawners and the shape of the wave, but not the actual game objects. Otherwise I can't think of a way.
|
|
|
Post by onesoftgames on May 5, 2017 16:36:12 GMT
Hi admin! Thank for your quickly answer! Can we create a component (script mono behavior ) that can attach to prefab and then that prefab will be controllable by our pool system?
|
|
|
Post by DarkTonic Dev on May 5, 2017 17:15:46 GMT
Actually I forgot. You can just put your prefabs in the Scene, it's fine. When they despawn, they will go back into Pool Boss for re-use, with the same-named item. No coding necessary.
|
|
|
Post by onesoftgames on May 7, 2017 9:55:36 GMT
Great! Could you please write some simple steps for that? How to setup pool, how can we drag to scene editor and how we can despawn? Without code?
|
|
|
Post by DarkTonic Dev on May 7, 2017 16:49:52 GMT
How to set up pool: like normal. Go to the Pool Boss Inspector and drag a prefab into the drag area. Then set up its max, etc.
Then place the same prefab into the Scene as many as you want. Despawning will need code like normal:
PoolBoss.Despawn(this.transform);
Although if you decide to upgrade to Core GameKit, which includes PoolBoss, there are a bunch of ways that will despawn automatically (Killable script has a few).
|
|
|
Post by onesoftgames on May 11, 2017 3:41:10 GMT
Thank! I buy CoreGameKit now! I will ask for help using CoreGameKit API soon! Thank admin!
|
|
|
Post by DarkTonic Dev on May 11, 2017 4:00:15 GMT
Excellent, I look forward to helping you if you need any!
|
|
|
Post by toncoder on May 25, 2017 16:36:22 GMT
How to set up pool: like normal. Go to the Pool Boss Inspector and drag a prefab into the drag area. Then set up its max, etc. Then place the same prefab into the Scene as many as you want. Despawning will need code like normal: PoolBoss.Despawn(this.transform);
Although if you decide to upgrade to Core GameKit, which includes PoolBoss, there are a bunch of ways that will despawn automatically (Killable script has a few). I am trying to despawn things within a specific time like Destroy(obj, float time) is able to do, but all I see here is the Timed Despawner, I think it works for certain things, but I want to be able to despawn whatever object is in the pool directly from the Despawn method. Any chance this can be implemented, or can you advice on how to use the Timed Despawner via code to despawn within a certain time frame. eg: 3 seconds or audioclip.length etc
|
|
|
Post by DarkTonic Dev on May 25, 2017 23:26:17 GMT
Either way is about as easy. You can grab the TimedDespawner if it's on the same game object and set the time, then start the timer (assuming "Start Timer On Spawn" is turned off).
var timedDespawner = GetComponent<TimedDespawner> (); timedDespawner.LifeSeconds = 5; timedDespawner.StartTimer ();
Or you don't use TimedDespawner and use a Coroutine like this:
// inside some method StartCoroutine (StartAfter3Seconds(5));
// then another method you are calling above. private IEnumerable StartAfter3Seconds(int secondsToWait) { yield return new WaitForSeconds(secondsToWait);
PoolBoss.Despawn (transform); }
Those are the 2 ways.
|
|