Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Customizable Turret System

Discussion in 'Assets and Asset Store' started by ChrisSch, Sep 15, 2015.

  1. AppThing_Dev

    AppThing_Dev

    Joined:
    Jun 9, 2014
    Posts:
    9
    Hey,

    Another question. I am trying to use a pooler for the enemies at the moment if the Enemy Object is not completely "Destroyed" out of the scene the turret does not re-target. Where is the best place to check for this so that if an object is disabled and dropped back into the pool the turret can re-target?

    Thanks.
     
  2. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Hi! Search for "target = null" it should be in OnTriggerExit() in the TurretSystem_Turret.

    That's the only place the target is reset. You can probably change it to "target.gameObject.SetActive(false)", and for the if statement it's in change it to "other.transform.root.gameObject".
     
  3. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Target lead is done! Since its way past midnight, I'll make a full v1.3 overview video tomorrow, and submit the update. :)

    Here's a quick vid:
     
    AppThing_Dev likes this.
  4. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Oops forgot about this vid. Turret System used for a first person shooter. A simple movement controller script is included.

     
  5. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
  6. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Alas, v1.3 is out! :)
     
  7. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Woohoo featured in scripting! :D
     
  8. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Hello @ChrisSch ,

    You'r system is very good (easy to use and easy to make a new turret), great job !

    But i have a little problem with my own FPS Turret.

    i have a lot of little problem, screen :

    http://i.imgur.com/jQhFcYC.jpg

    First :
    i can't move on the Y axis, when i want my turret move to left and right but not up and down :s

    Second :
    As you can see the spark touch the ground BUT the barrel don't aim the ground :/

    Hope you can help me with this :)

    Thank you
     
  9. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Hi! Can you show me the settings above "Turret Types"? Also the expanded hierarchy of the turret.
    The model needs to be parented under some object you assigned as the head, which is added to the "Turret Head" field.
    If your turret is static, and you're using the first FPS example scene, just replacing the barrel cube with your gun model, and re-positioning the muzzle and camera, should do the trick.

    Its a little hard to see on the picture whats going on, so if you can make a short clip of the problem (OBS is a great free opensource recording tool) that would be great. But I think you just forgot to assign something, or its a Unity bug. :)

    Its working for me on 5.0.1 and 5.3 but I'm obligated to ask what version are you using? :D
     
  10. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    PS. v1.4 is awaiting approval. Added a few smaller additions.

    Update v1.4:
    - Min/Max horizontal angle limits
    - Mobile turret option (If checked pools won't be parented to the turret. Fixes weird rotations of projectiles on mobile turrets)
    - Turret Upgrade (for tower defense games)
    - Turret Upgrade Cost
    - Turret sell value
     
  11. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Thanks for you'r reply :)
    I use Unity 5.3.1

    I have make what you say "add my model to the FPS turret exemple" all works perfectly now thank you :D

    Now, i have some question :

    How to add a ShellProjection ?
    How to add a reload sound ?
    How to "block" the rotation ? (i don't want the turret can rotate to 360°)
    How i can add a "Fire Hold" animation ? Because i have make my own fire animation but i can't drag and drop in the "Fire Hold Animation" slot :/

    Thank you
     
    Last edited: Dec 29, 2015
  12. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Shell Projection?
    Take a look at the "Setup Tutorial" scene. There's one with working casings. You can look there for details.
    upload_2015-12-29_22-54-12.png
    Basically you check "Visual Particle", "Is Particle", and add a particle system to that slot at the top. You can put it anywhere you want the particles to come out of. In my example I'm using mesh particles. The script basically enables/disables it when its firing.

    Reload sound? Sorry there isn't any right now. I'll add that in v1.5 or 1.6. I'll write it down so I don't forget. You can add it yourself tho. Quick way to do it takes only a couple lines of code. Just add a public reloadSound AudioSource variable. And just have it play when its reloading. There's a "Reloading" method you can add that reloadSound.Play(); line to. Then add the audio source on your turret with the sound and drag it into the reloadSound field.

    Block rotation? Vertical limits already exist (up and down). And so do horizontal (left and right) but theyre in v1.4, waiting for approval. They'll be right under vertical limits when the update is accepted.
    upload_2015-12-29_23-1-55.png

    Fire hold animation?
    You need to drag the Animator, containing the animation, not the animation itself. You need to know a bit of Mecanim to set that up. And its not something I can explain in short, so I suggest taking a look at Mecanim tutorials in the Learn section.

    Basically its:
    1. Create animator.
    2. Add trigger "OnHold". Default is "FireHold" for the script. So you can use that.
    3. Drag animation into it.
    4. Set it to play when that trigger is called.
    5. Add the animator to the turret parts you want.
    6. Drag that part into the "Fire On Hold Anim" slot of the turret script.
    7. Type "OnHold", or whatever you named the trigger. Default is "FireHold".

    And it should work. But that doesn't make much sense if you don't know how to work with Mecanim.

    Hope this helps.
     
  13. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Thank you for all the doc :)

    I'm waiting the 1.4 for the Horizontal limits.
     
  14. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Little bug with you'r Shell Particule with the FPS Mode, when the simulation begin all is good but when the simulation is stoped the light in the scene is shut down :/

    I have without FPS mode (like the scene tutorial) and all works good. I have the same option check but when the FPS mode is activated the light bug appear :S
     
  15. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Ummm I'm not sure what you mean. My turret script does nothing to, or with, lights. Maybe its a unity bug?
     
  16. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Yeah maybe ^^ this is strange .... when the particle is simulate the light bug ... but only in FPS mode

    Strange :s
     
  17. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    1.4 is released! :)
     
    Defcon44 likes this.
  18. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    having a problem, as earlier in this thread i mentioned about changing the speed if using a missile, and using the projectile script, can you tell me where i put this script, do i add it to the turret or what as the missile launcher in the scene demo does not have the script applied, when i do drag it onto the missile launcher and tick the is missile upon playing the scene the turret just vanishes, please give a quick description of what i need to do to use the script so i can change the missile speed.

    thanks in advance
     
  19. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Hey, I don't know what you mean, all the projectiles use the TurretSystem_Projectile.cs script, and its attached to all projectiles.

    upload_2016-1-27_23-47-52.png

    Just drag it onto whatever you want to be the projectile, and set the speed. And turn speed is how fast the missile turns towards the target. Then prefab it and drag it into the turret "Projectile" field.
     
  20. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    i see got it now, but another problem, i loaded the scene demo, removed all but the missile launcher added an enemy with the rotate and forward script so the enemy is always moving, all working fine, then i copy the enemy and rename it both have the same AirEnemy tag moved one a bit so they are both visible, the turret will kill one enemy then it does not detect the other one,if i use the player control and kill one enemy when press to fire next missile at enemy 2 it just explodes in the turret, it is only detecting one enemy, if i fire 2 missiles quickly they will both go to the same target then the second target is again not detected, both targets are in the detection sphere of turret, after the first target is destroyed the turret starts the no target random movement so it is only finding one target any help please
     
    Last edited: Jan 28, 2016
  21. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    any help for above problem please, i cant get the missile launcher to retarget after the first enemy is killed, it will not find any more targets even though there are some within range, i see earlier in this thread there was a similar problem but that was when the user was pooling the enemies which i am not.

    help
     
  22. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    @melonhead So you're using the same turret from the demo scene? Latest version of the turret system? Can you show me the turret and enemy inspector screenshot? Also which version of Unity are you using? 5.3 tends to have a lot of bugs from what I've read.

    I did the same as you, deleted all turrets except the missile one, and added rotation and move forward scripts to enemy cubes but its working for me.

     
  23. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    USING UNITY VERSION 5.1.2f1 TURRET VERSION 1.4 just done some testing and NONE of the demo scenes will find more than one enemy, take the last demo in the folder called TUTORIAL EXAMPLE TOP DOWN PLAYER CONTROLED, i extend the target sensor to cover all 4 enemy cubes, then untick the top down player control, now press play, it will find one enemy ( usually the bottom left as shown in the game window ) and destroy it, then after that it just returns to its default position and will not destroy the other 3 enemies, this is happening in all demos and any scene that i try to create, the auto turret is only finding and destroying one target and no more. this isnt making sense, i do not want to use a later unity version as thay seem to have problems with fps on mobile devices, i can see from your post video that it works on your version but mine is not. i am just trying to get fraps to record it
     
  24. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    two vids in this rar file, i dont have a youtube account all settings are as the demo loads except for changing the target sensor and the airenemy tag to all cubes in scene demo and the target sensor and the top dow control in the mobile demo and as you can see they find one target then nothing else.
     

    Attached Files:

  25. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    just tested something on the mobile demo, setup by removing the player control remove range coloder so that i can set the target sensor manually, set it to cover the 4 enemy targets and pressed play killed one target then nothing so while still in play i lowered the target sensor below the other 3 targets then extended it back beyond and the turret kiled another target, reduced and extended again and it killed the 3rd target and again for the 4th target, so it is only finding targets when the range is reduced then increased over a new target if that helps. maybe there is a code fix you can post for this

    this seems to do the same if i leave the target sensor covering all 4 targets then let it kill one enemy then turn off the is trigger on the sphere collider in the target sensor and turn it back on it then finds the next target then turn off and on again and finds the next target.
     
    Last edited: Jan 29, 2016
  26. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    any fix for this problem above, it it just not retargeting after the first enemy is killed?


    also tested turret system v1.3 in a clean project and still behaving the same, only targeting one enemy then no more after killing the first enemy.


    if leave it in play mode after first kill and then move one of the other enemies out of the sensor range and then bring it back into range it will detect and kill it.

    i have tried changing the target = null in the script as erlier in this thread but no joy still wont search for new targets that are already in the sensor range.

    need help with this? i will now go through you video and check all my settings are the same but as it is demo scene and i have not changed any there shouldnt be a problem
     
    Last edited: Jan 30, 2016
  27. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    can you clear up something for me , if there are 2 enemy targets in the sensor range at start of play, the turret is auto and the enemies do not have movement or say they fly into the sensor range but never leave, will the turret kill only one target until the other enemy leaves the sensor range and then returns back into range as this seems to be what is happening can you please try the mobile demo where the cubes do not move and just set the sensor to cover all cubes and turn off the manual turret control and tell me if it kills all targets or just one until one is moved out of range then brought back in using the editor window as it only seems to retarget when enemies enter the sensor area and not ones that are already in it apart from killing one enemy, so the turret is not detecting enemies that are already in the target area until they leave and re-enter which is not what i thought was meant to happen
     
    Last edited: Jan 30, 2016
  28. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Hi @melonhead, sorry for the late reply, I was away all day.

    It sounds to me like OnTriggerStay() is not working, only OnTriggerEnter() is happening.
    And to answer your question, when there's two targets in range, and the one the turret targeted leaves, it will target a new one, but since that's not happening to you, its again hinting that OnTriggerStay() isn't happening.

    Target check is happening periodically in OnTriggerStay(), how frequently it depends how you set the "On Trigger Stay Optimization". Its on 30 by default, so its not every single frame. Higher value means less frequent check.

    It would be best if you made a new project with only the turret system, set it up as instructed in "IMPORTANT NOTE.txt" and sent it to me over email at damaged.grounds@gmail.com. Just in case I'll download Unity v5.1.2f1 to test it.
     
  29. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    it did occur to me yesterday that the ontriggerstay might not be excecuting as there had been a known problem in some unity versions of 5 not executing ontriggerstay it was something to do with rigidbodies and child objets but i have downloaded the example of the problem and it did test ok and the stay was working, i have put a debug.log in the ontriggers and found this, the ontriggerstay debug.log is never activated but if then change the ontriggerstay function to ontrigger enter and vise versa and then while running move an enemy into the sensor which should then execute the ontriggerenter which was the ontriggerstay code it still does not execute the debug.log so it seems that this portion of code is never executed even when changing its function to ontriggerenter and moving enemy into the sensor.

    as i said the easiest way to replicate this problem was to load the mobile scene and turn off the player control so there are 4 enemies already in the sensor zone, the turret then turns to the bottom left and kills the enemy then rotates back to ide ( or random movement if set ) but will not detect anymore enemies that are already in the sensor untill they are moved to retrigger the ontriggerenter, or if after turret kills first enemy leave playing and select the turrets target sensor then switch off and back on the sphere collider it will then find and kill one more of the enemies the back to idle then do the same on the sphere collider and it will the find the 3rd enemy and so on, so it just seems that it needs a way to turn off and back on the sphere collider of the target sensor when the turret goes into idle mode, this would then fix the problem

    the ontriggerstay optimization seems to be set to 1 in the code but when i change it up or down it makes no difference, so it really is odd. hope we can get it working. if still need me to make to new project let me know

    thank you

    i hope the videos show what i mean
     
    Last edited: Jan 31, 2016
  30. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    I have just fixed the problem by adding a call to turn off and back on the sphere collider in the target sensor range collider, it does take 4 lines of code though so if there is a shorter way of coding it please let me know, i just hope it dont create another problem later on, but seems ok at the moment, so for some reason it does seem that ontriggerstay isnt being called as confirmed by putting a debug ,log call in the ontriggerstay function, i added the new call in the idle function so that ontriggerstay is bypassed
     
  31. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    @melonhead Yeah I remember the bug too, I think I had it as well. Just looked at the release logs of 5.1.3 and confirmed its fixed in it, so if you can it would be good to update to that version if you don't want the latest.

    Unity v5.1.3 "(703073) - Physics: Fixed an issue where OnTriggerStay would not be called on children in compound colliders."

    You can find that version here.
     
  32. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    CHEERS, good to get to the bottom of it!!!
     
  33. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    at the moment my bypass seems to be working fine, but if it becomes a problem i will have to bite the bullet and update unity..

    thanks for all the help.
     
  34. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    No problem. :)
     
  35. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    thought i would try unity 5.3 and there are some yellow warnings about particle emission naming convention changes upon importing the asset, i wasnt going to upgrade unity but found out that i needed to upgrade to use the new advertising system built into 5.2 and above, and the fps problem has been found to be the automatic api selection of gle 3.0.
     
  36. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Haha yeah I get those from Unity's Standard Assets too. lol
    Its not an issue, everything will work the same. At least for a while until its completely deprecated. But not to worry I'll eventually release and maintain a version for 5.3 as well. :)

    Ps. If you're making something cool with the turrets, you can show it here. :)
     
  37. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    it'l be quite a while... !!!
     
  38. ionside

    ionside

    Joined:
    Apr 7, 2011
    Posts:
    43
    Hi ChrisSch, Thanks for the handy plugin. A few question I have. If I create instances of objects and they're parented in another object, the turrets can't detect them. I went through the turret script and removed 'root' from all the lines which fixed that issue but want to know - is there a critical reason for the turret to only look at the top most object?

    Top down view mode, the turret seems to be a little unpredictable, I'm assuming it's trying to face the extent of the mouse position. If I make a plane as a ground this helps a little but then the turret fires at the plane unless an enemy object is on the mouse position... would be great if the turret y-axis stayed at a specific height when there's no target.
    Is there a correct way of setting a scene up for this?

    Thanks,
    Rob
     
  39. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Hi. I set it to root because otherwise it, or the projectiles, would try and get the health from the object hit, which isn't the one holding the health script (usually its a child/part of the turret), and then it throws errors. That isn't happening to you? Also, if clutter is the reason you're parenting to other objects (so you can hide them), I made another handy script to hide/show objects in hierarchy, I'll probably include it in the next update release.

    About the top-down aiming. I see what you mean. I'll see if I can include that in the update too. For the moment, if you don't need the turret to tilt, uncheck tilting so it stays on the same height all the time.

    PS. Is your top-down turret mobile? And what version of Unity are you using?
     
  40. ionside

    ionside

    Joined:
    Apr 7, 2011
    Posts:
    43
    Thanks for the fast reply, @ChrisSch . I'm using 5.3.2 at the moment.
    I do see what you mean by the errors being thrown now, I was ignoring them for the time being, to be honest.

    The top down turret is mobile and tilt would be used (air and ground enemy).

    As for the enemies under a parent object, I'm hoping to using some flocking, and the flocking needs the eney object as a child of the flocking agent, if I destroy an agent it breaks the simulation.

    Thanks again.
     
  41. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Ah I see. Try this.

    Throw this in somewhere in the TurretSystem script as a new function. And projectiles if you're using them.

    Code (CSharp):
    1. public GameObject ParentWithTagGO(GameObject child, string tag) //forward the hit GO and its tag
    2.     {
    3.         Transform t = child.transform; //get the GO transform
    4.         while(t.parent != null) //while the transform has a parent
    5.         {
    6.             if(t.parent.tag == tag) //check against a tag
    7.                 return t.parent.gameObject; //and if it hits the "Enemy" tag or something, return the object
    8.  
    9.             t = t.parent.transform; //climb up the hieararchy
    10.         }
    11.         return null; //if it doesnt find anything
    12.     }
    And instead of "TriggerDamage(hitGO, damageAmount);" change it to TriggerDamage(ParentWithTagGO(hitGO, hitGO.tag), damageAmount);

    Now you can get any parent of the hitGO with the tag you want. Might include this in the next update. Just need to test it more.
     
  42. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Featured on the front page! And a staff pick! Woo! :D
    *basking in glory*
    dfd.png

    PS. Guys in case you didn't see the vid on the asset store page, the latest update brings third person view (when you check the first person box) with an addon script. Forgot to edit the "Features" list in the description. There's a demo scene showing how its set up. :)
     
  43. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Hello,
    I'm having major problems with this... I have one turret working well, If I duplicate it and put it somewhere else, at a higher elevation... The bullets just explode right when shot. This seems to be a common way it breaks if I scale or rotate, or almost anything. I followed the read me, assigning the layer and excluding it. Even a duplicate that's just over a meter away doesn't work well, shoots a few meters and hits something invisible. (nothing is there).
    thanks
     
  44. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Hey, is that a new turret you made? Are the examples working correctly? If the bullets explode right away, it could be happening that they're colliding with the barrel they're coming out of (or any other part of the turret), or the layers aren't set so they explode when they find themselves in the turret sensor trigger. I don't know what you mean about rotating. Also what Unity version are you using? Some of them had/have bugs with triggers.
     
  45. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Hi,
    This is using the included prefabs as protoypes, I've also tried turning off all collisions on the turrets to see if that was it.
    I've tried using 360 as max for both axis of tracking, since they are tracking the enemy through different elevations.
    BTW when the turret works, its awesome. I'm sure its a bug or setup issue...

    I'm using Unity 5.3.4p1, which is a solid build for the Rift.
    Thanks

    Update
    "I've had separate issues using custom tags and the turrets never turning off. Works really great when I have the tag set to Player, but not Enemy (they never stop searching and shooting even when out of shoot range)."
    I believe this is from trying to taget an empty object on my player, not the top level. Can't target children?

    Update2:
    Seems to be working much better if my player uses the AirEnemy Tag, as opposed to Player.
    So it seems to ba a tag related issue. Does the main componenet overrride the missle enemy tag settings? Whats the best way to set it up to track "Player"?

    Update 3:
    Seems like editing the Min Vertical Angle and Max affects all Turrets, not jut the one I'm editing. If I change it from the -70,70 al the turrets look randomly or at some other point. They are not prefabs...strange that changing one breaks all.
    thanks!
     
    Last edited: Jun 29, 2016
  46. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    These issues are all very weird. Yes the tag and health were suppose to be on the parent object at first, but I think I've changed that recently and that isn't the case anymore. Either way the example scenes should be working just fine. If they're not then there's some other issue.

    As for tags remember that projectiles have their own tag they deal damage to. So if you change the target tag on the turret you also need to change it on the projectile prefab.

    As for angles that shouldn't be happening at all. The scripts don't interact at all. There's no statics or anything, and something like that shouldn't be happening. I guess I'll have to download your Unity version to see if I get the same results.

    PS. When turrets don't have a target they can look randomly as a cosmetic "idle" function.
     
  47. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Update v1.6 is out. I posted it on the new forums but I guess it stayed there. It addresses an issue in v1.5 and adds a new feature, for

    Update v1.6:
    - Fixed turret not losing track of target once it leaves the range trigger
    - Added an "Auto Fire" feature. Useful for cardboard
    - Optimized scenes
     
  48. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    This system has been pretty helpful and I've managed to easily modify it as I need but thought I would just point out that when I destroy instantiated prefabs containing turrets it didn't seem to cleanup the pooled objects that are created. It appears there are no functions for OnDestroy calls. Maybe I'm missing something? I'll implement myself but maybe add it to the todo list, just a little pointer to improve. ;)
     
    ChrisSch likes this.
  49. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    I'm glad you like it, and that's a good idea, I'll add it to the ToDo list! :)
     
    Beloudest likes this.
  50. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    Code (CSharp):
    1.     void OnDestroy(){
    2.         Destroy (pool);
    3.     }
    that will do it, man that was hard. Hehe
     
    ChrisSch likes this.