Search Unity

Particle Playground

Discussion in 'Assets and Asset Store' started by save, Dec 4, 2013.

  1. failman

    failman

    Joined:
    Sep 11, 2014
    Posts:
    23
    Hello there! First of all thank you for creating such an amazing asset. I've been using PP2 for a couple of months now and it keeps getting better and better. However, since the 2.2 update some of my particle systems broke.

    I had a GameObject prefab with a PP2 system as it's child. The particle emitter turned on when I tapped that object (by calling Emit() function). The Emit() function was using the emission parameters that were set in the inspector before the 2.2 update. But since the update the Emit() function would ignore the parameters in inspector and this forced me to set all of the emission parameters by code.

    I'm okay with that, just wanted to ensure that this is not a bug. Thanks!
     
  2. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Great work @frontakk! It's awesome to see what can happen when the tool is put in the hands of an artist. :)

    There's a small update out (2.23). It has a couple of mobile adapted example scenes and fixes an issue reported on mobile specifically, where particles would freeze in the middle of simulation when using turbulence or upon heavy setups.
    I'm a bit concerned about mobile performance for some particle system setups (particularly turbulence and skinned meshes), I'll see what can be done for future optimizations. There is a couple of interesting features in the making for optimizing performance overall.
     
  3. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hey there!
    A couple of counter-questions to sort things:
    - Are you using Emit(true) to enable emission or is this scripted emission by Emit()?
    - Is the GameObject of the particle system inactivated when you call Emit()?

    From version 2.2 you need to make sure the particle system's GameObject is enabled before calling for scripted emission, previously this was activated automatically. This was a performance optimization and to make the Emit() overloads, except Emit(true), to be able to be called from another thread than main-thread. Emit(true) should only be called from main-thread (for example in the regular Update loop or a coroutine, but never inside a particle event).
     
  4. failman

    failman

    Joined:
    Sep 11, 2014
    Posts:
    23
    I'm not at my PC right now, I'll look at it bit later. But I think I'm calling Emit() without any arguments.
    The Particle System works, it's just emitting only one particle without taking into account any parameters from the "Particle Settings" tab.

    For an example I had particle count set to 10, particle lifetime sorting set to Burst and some random initial velocity in the inspector. If I call Emit() from code the particle system would emit only 1 particle without any velocity. Prior to version 2.2 ParticlePlayground's Emit() function would've taken into account these parameters
     
    Last edited: Feb 18, 2015
  5. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Ok I think I can see the scenario, that is actually the intended outcome. Any source information (such as birth positions from the Source, Overflow Offset and Source Scatter) will be bypassed with the scripted position upon the parameterless Emit(). The only affecting settings in Particle Settings would be Size, Rotation, Lifetime (unless lifetime overload is used) and Particle Mask.
    Although, what boggles me is that you may have used this differently in a prior version to 2.2. To be continued! :)
     
  6. failman

    failman

    Joined:
    Sep 11, 2014
    Posts:
    23
    So it turned out that I was calling the Emit(bool) function using UnityEvent events. The object was active.
    If I understood correctly, this method overrides Particle Settings from 2.2 ?
     
  7. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Alright!
    Using Emit(true) will basically do this:
    - Set emission to true.
    - Set all particle time to the current time + lifetime sorting.
    - Activate the GameObject.

    This can for instance be used to force a time reboot of the particle system in the middle of simulation. It will make all particles in current simulation reset if yourParticleSystem.emit already is true.

    I'm yet unsure of how you have implemented it, but here's an example of how it can be used:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using ParticlePlayground;
    4.  
    5. public class EmitOnOffWithReset : MonoBehaviour {
    6.  
    7.     public PlaygroundParticlesC particles;
    8.  
    9.     void Update () {
    10.  
    11.         // Emission on/off
    12.         if (Input.GetMouseButtonDown (0))
    13.             particles.Emit (!particles.emit);
    14.         // Emission on with reset
    15.         if (Input.GetMouseButtonDown (1))
    16.             particles.Emit (true);
    17.     }
    18. }
    19.  
    Just to turn emission on/off you could use:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using ParticlePlayground;
    4.  
    5. public class EmitOnOff : MonoBehaviour {
    6.  
    7.     public PlaygroundParticlesC particles;
    8.  
    9.     void Update () {
    10.         if (Input.GetMouseButtonDown (0))
    11.             particles.emit = !particles.emit;
    12.     }
    13. }
    14.  
    Using the overload Emit(bool) is not for scripted emission, it is a more persistent way for enabling emission on a non-scripted particle system.

    Not sure if this helps, in case you have something odd going on in the scene you're always welcome to send it to support@polyfied.com and I'll have a look into it.
     
    Last edited: Feb 18, 2015
  8. failman

    failman

    Joined:
    Sep 11, 2014
    Posts:
    23
    Nice! I now get the difference between particles.emit and particles.Emit(true). Thanks for your help :)
    (However I still may send the an example scene to you just in case)
     
  9. frontakk

    frontakk

    Joined:
    Jan 8, 2011
    Posts:
    292
    Hi save,
    I'm using state source, get strange result.:(
    chromakey function turn on, collapses depth map...
     
  10. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hi! Aah, combining depthmap to the main texture wasn't connected to chroma keying. What we're seeing in your picture is a repeated depthmap as if all pixels from the main texture would still be there.
    I've rewritten the depthmap to be extracted along with all other parameters, it will now also cope with alpha (not only grayscale as previously).
    Quickfix: http://www.polyfied.com/development/unity/playground/pp2.24a01-depthmapfix.unitypackage

    It isn't perfect yet so for the best result keep your depthmap texture the same width and height as your main texture.



    Although you could instead rely on the 0 alpha pixels in the main texture (if you would have a modified version of your T_Mask03) to not create any particle positions at defined areas. I'd recommend to use chroma keying at rare occasions when texture alpha isn't possible. Would that work in your case?
     
  11. frontakk

    frontakk

    Joined:
    Jan 8, 2011
    Posts:
    292
    Hi, quickfix version is works perfect for me;)
    Very thanks!
     
  12. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    hello few question about some particle use:
    does PPwork with ugui? if i want the particle to follow ui slider, follow shapes of uimask etc does it work? like heartstone card overlay for example but using ugui.

    is it possible to use particles without having gc generated?
     
  13. fkhalifeh

    fkhalifeh

    Joined:
    Jul 6, 2014
    Posts:
    2
    Hello,
    How could I trigger the Refresh button from code (like 10 to 15 times per second) , I have kinect feed, so I want a way to tell playground to update to the new texture.
    Note: I am able to update the particle state texture through, particles.states[0].stateTexture = myTexture;
    But in order to update playground, I need to click manually on the refresh button to update manually !

    Please Help

    upload_2015-2-22_14-52-56.png
     
    Last edited: Feb 22, 2015
  14. frontakk

    frontakk

    Joined:
    Jan 8, 2011
    Posts:
    292
    Hi save,
    How to scaling state's scale by script? (C#)
    I'm programing newbee...:(
     
  15. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hi,
    It works with uGUI but does not have any special implemented features for it, the same way Shuriken behaves. You could use state textures which follows the GUI shapes, but any scaling you would have to connect manually through script.

    The GC allocations will differ depending on the setup. On a regular particle system it will be ~12 bytes per system when not using multithreading. Using multithreading will allocate ~357 bytes per thread, where particle systems will get bundled onto calculations once max processor cores / Max Threads setting is exceeded. Procedural meshes will produce GC accordingly to the updated vertices and normals. There's no current way of making PP produce 0 GC allocations, but I'll be looking into options for the multithreading to hopefully produce way less in the future.

    Hi,
    To refresh a state you can use:
    Code (CSharp):
    1. state.Initialize();
    To refresh it between 10 to 15 times per second, you can do something like this:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using ParticlePlayground;
    4.  
    5. public class RefreshStateTexture : MonoBehaviour {
    6.  
    7.     public PlaygroundParticlesC particles;
    8.     public int stateNum;
    9.     public int updateRatePerSecond = 10;
    10.     ParticleStateC state;
    11.  
    12.     void Start () {
    13.         state = particles.states[stateNum];
    14.         InvokeRepeating ("RefreshState", .1f, 1f/(updateRatePerSecond*1f));
    15.     }
    16.  
    17.     public void RefreshState () {
    18.         state.Initialize();
    19.     }
    20.  
    21.     public void SetNewTexture (Texture2D tex) {
    22.         state.stateTexture = tex;
    23.     }
    24. }
    25.  
    Hi,
    You can have a look at the script posted above to get the idea of how to reference a state. Then to control the scale you'll reach it through:
    Code (CSharp):
    1. state.stateScale
     
    Last edited: Feb 23, 2015
  16. failman

    failman

    Joined:
    Sep 11, 2014
    Posts:
    23
    I'll give a snippet :)

    Code (CSharp):
    1.         PlaygroundParticlesC particles = GetComponent<PlaygroundParticlesC> ();
    2.         ParticleStateC activeState = particles.states [particles.activeState];
    3.         activeState.stateScale = 3.0f;
     
  17. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Exeneva likes this.
  18. frontakk

    frontakk

    Joined:
    Jan 8, 2011
    Posts:
    292
    Thanks!
    I'll try it:D
     
  19. Jotunn

    Jotunn

    Joined:
    Jan 10, 2014
    Posts:
    22
    Hi save,
    I create a new scene and add a Particle Playground System by click "New Partice Playground System" button in Playground window.
    When play the scene, Profiler displays PlaygroundC.LateUpdate() GC Alloc 397B on every frame.(Unity4)
    Add more System, GC Alloc is proportional to number of systems.
    And on Unity5(RC3), PlaygroundC.LateUpdate() GC Alloc 0.7KB per system, every frame.

    I locate some Particle PlayGround Systems and must avoid GC while a few minutes, so locate large heap to avoid GC.
    But on Unity5, PlaygroundC.LateUpdate() GC Alloc twice, so I need twice heap... it is difficult.
    Is there any good way to reduce GC Alloc?

    Thanks!
     
  20. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hi Jotunn,
    The GC allocation is proportional to the amount of threads, you should not see further allocations when exceeding the available processors or the Max Threads (specified in Playground Manager > Advanced > Max Threads). This means that if you have an Automatic Particle Thread Method and do not have any Max Threads specified the GC allocated varies depending on the platform Playground runs on.

    One way to keep it low is to just use one calculation thread (Playground Manager > Advanced > Particle Thread Method: One For All), another way is to not use multithreading (No Threads). I'm still not sure why GC allocates twice on Unity 5 and if this is just an Editor thing, but I'll dig into it when I start working on improvements for the multithreading to reduce GC.

    Also try to make use of the particle systems Auto-Pause Calculation (found in Advanced > Out Of View), to disable further calculation calls whenever a particle system becomes invisible.
     
  21. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Exeneva likes this.
  22. Jotunn

    Jotunn

    Joined:
    Jan 10, 2014
    Posts:
    22
    Thanks save!

    I tried Particle Thread Method option.
    OneForAll allocate 385B, No Threads allocate 12B.
    No Threads reduce allocate significantly but increase CPU time, so I will use Particle Thread Methods selectively to suit a situation.
    In addition, No Threads allocate 24B on Unity5.

    Thanks!
     
  23. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Wohey that is beautiful! Perhaps we need to open up an art gallery. :)

    That's great, you can have a look at the Multithreading Skinned Meshes example scene if you need some guidance how to switch thread methods during runtime. Gotta figure out why Unity 5 reports more GC, will hopefully know more soon.
     
    wetcircuit likes this.
  24. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Definitely agree about the art gallery! A 'made with Particle Playground' section might be an awesome addition to the product webpage :)
     
    wetcircuit likes this.
  25. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Agreed! The site is currently in redesign, I'll make sure to add a submission feature for you guys. :)
    Plan is to connect much stronger to user projects and products, where a gallery for cool "randoms" would fit great.
     
    wetcircuit likes this.
  26. frontakk

    frontakk

    Joined:
    Jan 8, 2011
    Posts:
    292
    Hi.
    How to scaling multiple manipulator size?
    my code:

    Code (CSharp):
    1. public class ScaleManipulatorSize : MonoBehaviour {
    2.  
    3.     public float scaleManipulator = 1f;
    4.     PlaygroundParticlesC particles;
    5.  
    6.     void Start () {
    7.         if (particles==null)
    8.             particles = GetComponent<PlaygroundParticlesC>();
    9.         ManipulatorObjectC activeManipulator = particles.manipulators [particles.activeState];
    10.         activeManipulator.size *= scaleManipulator;
    11.  
    12.     }
    13.    
    14. }
    It's works, but scaling single manipulator size...
     
  27. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Maybe I'm doing this wrong but having some issues just getting a particle to emit. I have a particle preset I want to periodically emit particles from a single transform position. I've saved the preset with no transform set. I instantiate a local copy of the preset using InstantiatePreset and turn emit to false to make sure it doesn't do anything.

    When I'm ready to start emiting I set on it sourceTransforms[0].transform to my current target transform (it changes) and set emit to true and then.. nothing. If I fiddle with it in the inspector (toggling random things not emit or render or anything seemingly important) it seems to wake up and start rendering the particles. Am I doing this wrong somehow?
     
  28. frontakk

    frontakk

    Joined:
    Jan 8, 2011
    Posts:
    292
    Hi save.
    My asset FT magiceffect vol01 update using by particleplayground.
     
    ZJP likes this.
  29. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    You would have to loop through the manipulators you want to scale. Your code only calls to scale one manipulator set by the activeState.
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using ParticlePlayground;
    4.  
    5. public class LoopThroughManipulators : MonoBehaviour {
    6.  
    7.     public PlaygroundParticlesC particles;
    8.     public float newSize = 1f;
    9.  
    10.     void Start () {
    11.         foreach (ManipulatorObjectC manipulator in particles.manipulators) {
    12.             manipulator.size = newSize;
    13.         }
    14.     }
    15. }
    16.  
    I can almost say for certain you're doing it the right way. This bug was reported in recently and it seems that a particle system currently must have emit set to true when instantiating, otherwise it won't tick off. A workaround is to set the GameObject of the particle system to disabled instead. Fix will come! :)

    Amazing work yet again! :) I hope to see more content from you and others soon, Playground will in a near future be much stronger connected to its siblings (promotional-wise and accessibility).
     
  30. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Great and nice. PP is an incredible addon. Please do me a favor : next time upgrade this one too.
     
  31. frontakk

    frontakk

    Joined:
    Jan 8, 2011
    Posts:
    292
    Thanks! save.
    I'll try it:)

    I started another works...
    OK next, I'm update cartoonFX volume01.

    ParticlePlayground can using emit by distance method?
    I want to using it by event particle time type.
     
  32. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Yeah toggling the gameobject works. Calling SetParticleCount also disabled the particles requiring toggling the gameobject on and off again.

    Edit: Actually seemingly pretty much doing anything to a particle system via script seems to break it. I've redesigned my particle usage to compensate. My original usage is to have particles that I tether to a script and it manipulates the particles as needed. It seems like intended usage is more like I have a bunch of presets that I instantiate willy nilly as needed and let the system pool them. Is that correct?

    Also what's the best way to get a particle system to act like a child object? To animate within a transform's local space without jitter? Playing around with local space with compensation still looks pretty rough.
     
    Last edited: Feb 27, 2015
  33. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Hello!
    I used the current version of Particle Playground for an iOS project, but unfortunately, when I build the project and run it on iOS, the particles won't show up. Do you have an idea how I could solve this?
    For further information: I tested the build on both, iOS 7 and iOS 8.

    Many thanks in advance,
    Greetings,
    Shu
     
    Last edited: Mar 1, 2015
  34. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Great! The new site is coming along quite nicely and your products will be a great addition.
    You can emit by distance using a simple script, there's an example called EmitOnOffByDistanceC.cs in the package.

    Will make sure to address this in the upcoming update.
    Generally I would suggest to not instantiate anything during runtime but instead activate GameObjects once they're needed, especially if you have effects used repeatedly. There's an example script called SwitchCachedParticleSystemC.cs which will pool a specified particle system. You can also have a look in the example project (Particle Playground 2.2 Video Scene), where particle systems are activated upon call.

    I'm not entirely sure what you mean with jitter, is the particle system synced to the main thread (Advanced > Misc > Sync Particles To Main-Thread)?

    Hi! Are you using the new scripting backend IL2CPP? The current version of Unity does not support multithreading while using IL2CPP, there's two solutions:
    1) http://forum.unity3d.com/threads/particle-playground.215154/page-17#post-1962497
    2) Use Scripting Backend: Mono (2.x).
     
  35. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Here's a (very long) captured sequence... one emitter, 2 vortexes, and turbulence.

    I sort of miscalculated how many frames I was suppose to capture.... so it's basically a lava lamp video... LOL

     
  36. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Hey! Thank you very much for your quick reply! Yes, I am using IL2CPP. Unfortunately, Mono is not an option for me as I need to offer a 64bit version.
    First, when experiencing the problem, I was using the standard release of Unity 4.6.2.
    Then, I tried using 4.6.3, which seemed to solve the problem because it was showing the particles on iPad. On iPhone though, I couldn't even run the app.
    After doing some research, I figured 4.6.3p1 may get rid of the problem. But then, after building the project in 4.6.3p1, I wasn't able to build and run it in Xcode, neither on iPhone, nor iPad.
    Pretty weird, but at the moment I simply can't seem to get this running.
     
  37. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Haha, very soothing! This needs ambient music. :) Would it be alright with you if I add this to the upcoming Playground gallery?

    Hi! Thanks for getting in with the details - and that's unfortunate, I believe we have to wait for Unity getting the multithreading fully implemented for 64bit. You could submit this as a bug so they can have a look at what's going on in the 4.6.3p1 version.
     
  38. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Yes, this sure is a problem that comes with Unity, not with Particle Playground. Thank you for the help! Also, if you are the developer of Particle Playground, thank you for developing! It's a great asset!

    PS:
    I just reported the problem for 4.6.3p1 here:
    http://forum.unity3d.com/threads/unity-4-5-splash-screen-related-crash.248625/
     
  39. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    That's great, hopefully things will be running as expected soon! Hey thanks, its been a long process with many awesome user requests along the way, there's plenty people in this thread who should be highfived. :)
     
  40. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    Sure! that would be great. :)
     
  41. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Oh I thought you were already pooling them when using InstantiatePreset. I'll just pool it myself then.
    When I spawn a Playground particle I do this:
    Code (csharp):
    1.  
    2.     private static void SetPlaygroundParticle(PlaygroundParticlesC presetParticles) {
    3.         if (PlaygroundC.reference == null) {
    4.             PlaygroundC.reference = PlaygroundC.ResourceInstantiate("Playground Manager").GetComponent<PlaygroundC>();
    5.         }
    6.         if (PlaygroundC.reference.autoGroup && presetParticles.particleSystemTransform.parent == null) {
    7.             presetParticles.particleSystemTransform.parent = PlaygroundC.referenceTransform;
    8.         }
    9.         PlaygroundC.particlesQuantity++;
    10.         presetParticles.particleSystemId = PlaygroundC.particlesQuantity - 1;
    11.     }
    12.  
    which looked like what you do on InstantiatePreset and then when I put it back in the pool I call
    Code (csharp):
    1.  
    2.     public static void DespawnParticles(PlaygroundParticlesC presetParticles) {
    3.         PlaygroundC.Clear(presetParticles);
    4.         Despawn(presetParticles.gameObject);
    5.     }
    6.  
    but I noticed the particles are still listed in the Manager. How should I clear them? The spawns are parented to my spawn pool when deactivated.

    Super minor thing I wish "User Preset Path" was an absolute path so I could point it to where I keep my other prefabs instead of being relational to the ParticlePlayground directory (obviously its an easy change but I hate breaking on updates changes).

    I'll try that Sync To Main Thread option. 'Jitter' was that the system rather than stick to the parent transform's position it constantly plays "catch up" following behind it trailing particles.
     
  42. frontakk

    frontakk

    Joined:
    Jan 8, 2011
    Posts:
    292
    Thanks!
    I tried EmitOnOffByDistanceC.cs but my problem solved EmitOnTranslation.cs.
    Thank you for your a lot of sample programs.:)
     
  43. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    All you really need to do is activate and inactivate GameObjects. You don't have to check for the PlaygroundC.reference, once you instantiate a particle system everything will be handled automatically. The Playground Manager will always want to list all particle systems within the scene to check if they need calculation, where any inactive GameObjects will simply be skipped.
    However, if you really want to add/remove systems from the Playground Manager list yourself you can do something like this:
    Code (CSharp):
    1.     void Attach (PlaygroundParticlesC particles) {
    2.         if (!PlaygroundC.reference.particleSystems.Contains (particles)) {
    3.             PlaygroundC.reference.particleSystems.Add (particles);
    4.             particles.particleSystemGameObject.SetActive (true);
    5.         }
    6.     }
    7.  
    8.     void Detach (PlaygroundParticlesC particles) {
    9.         PlaygroundC.reference.particleSystems.Remove (particles);
    10.         particles.particleSystemGameObject.SetActive (false);
    11.     }
    The User Preset Path can be changed in Window > Particle Playground > Settings > Paths.


    Alright great! EmitOnTranslation will let you have any speed on your particle system and have emission "spacings" intact. It's a good alternative for doing confined trails for instance. :)
     
  44. cAyouMontreal

    cAyouMontreal

    Joined:
    Jun 30, 2011
    Posts:
    315
    Hey save, one little question: Is your plugin ready for Unity 5? Right now I don't have any issues (still not on final 5.0 but on RC2) in terms of the rendering part but we have a LOT of freeze in the editor when I open the Playground window or when I launch a scene (even totally empty). This is happening since I deleted the version 1 and installed the version 2 (after deleting any references into the project). Thanks !
     
  45. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hi! Which version of Playground are you running? In case you're not on 2.23 try updating. Version 2.21 had an important update regarding how Playground is fetching its assets. Let me know, if its the very latest there's something new going on which we would have to take a closer look at.
     
  46. cAyouMontreal

    cAyouMontreal

    Joined:
    Jun 30, 2011
    Posts:
    315
    It's the latest one, 2.23.
     
  47. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hmm this is nothing I've seen in previous testing. I'll be doing some tests on Unity 5 (official) for 2.24 soon. Is your project big in terms of included assets? If you want you could send it to support@polyfied.com for me to test what's going on.
     
  48. cAyouMontreal

    cAyouMontreal

    Joined:
    Jun 30, 2011
    Posts:
    315
    Yeah, our project is HUGE in terms of assets. Note that we moved the folder to our Tools folder, and I changed path to this one on your configuration window.
    I don't think I'm allowed to send the project sorry.
    Basically we don't need all the features in your plugin, right now I'm using playground for one single effect, and I'm using it mainly because I can add attractor to particles while Shuriken doesn't do that. The good part is that the build and the playmode in editor is never affected by your plugin in terms of performances, so this is right now not a huge problem, but it slows down a lot our working process. I could try to check the editor profiler to see if there is any more information about what's going on.
     
  49. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    This is most likely connected to Playground trying to localize some assets. As you have moved the folder it will search for the settings file (Playground Settings.asset) when you open the Playground window. Here are some precautions you could take to ensure faster loading:

    1) In PlaygroundSettingsC.cs point the settingsPath to your new folder structure:
    Code (CSharp):
    1. public static string settingsPath = "Tools/Particle Playground/Playground Assets/Settings/Playground Settings.asset";
    This is the only static path which if not exists at the location will commence the searching.

    2) Make sure your Playground Hierarchy icons are assigned to the Playground Settings asset:

    Otherwise it will search for those as well to try to permanently assign those to the settings file, and if the settings file isn't found it will just temporarily assign those to a memory instance of the Playground's settings. This approach was done for upgrading purposes, where you otherwise would have to reinstall Playground to enable the Hierarchy icons.

    3) Make sure the path is set correctly in Window > Particle Playground > Settings > Paths > Playground Path:


    Thanks it would be great if you could just confirm with profiling the Editor, and if the above steps solved your problem.
     
    cAyouMontreal likes this.
  50. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    As I said this is a relational path. Literally in the code it stores it to Playground Main Dir + Preset path. I am saying that you should cut out the Playground dir and just store it at the Preset path directory so that it can be set to anything.

    Actually does "Create Preset" do anything besides make a prefab?