Giter Site home page Giter Site logo

mob-sakai / particleeffectforugui Goto Github PK

View Code? Open in Web Editor NEW
3.9K 99.0 571.0 23.44 MB

Render particle effect in UnityUI(uGUI). Maskable, sortable, and no extra Camera/RenderTexture/Canvas.

License: MIT License

C# 97.22% ShaderLab 2.78%
unity unity3d ugui ui particle effects component particle-system

particleeffectforugui's Introduction

Hi there 👋

particleeffectforugui's People

Contributors

bamdad-b avatar jakeoconnor-peoplefun avatar lacuscon avatar micromang avatar mob-sakai avatar semantic-release-bot avatar shade-dev01 avatar talessampaio-kazoo avatar wmltogether avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

particleeffectforugui's Issues

Fog

Not a bug, this is just a reminder for everyone,
If you have fog in your scene all canvas particles will have the fog apply
Use custom shaders to ignore the fog

UV Animation is not work.

I add UI Particle component to ParticleSystem, And set UV animation by AnimationClip.
But Animation is not reflected.
Please tell me how to reflect material animation.

like this.
image 1

env: Unity 2018.3.5f1 / UI Particle v2.1.1

Try to change size of particles

Hi, I get trouble with particle system but luckily I found your awesome repo.
But I'm now stuck with the particle size (like below image).
I tried increase Start size but the particles won't be bigger.

My Unity version: 2018.2.1f1
Canvas Render mode: Screen Space - Overlay

Hope to find the solution soon.

When ParticleSystem.Shape is Edge, an exception is thrown in Unity 2019.1

Steps to reproduce the issue

  1. Use Unity2019.1 and ParticleEffectForUGUI2.3.0
  2. Create a Canvas in Scene.
  3. Create a empty GameObject in Canvas.
  4. Add a ParticleSystem component.
  5. Add a UI-Particle component.
  6. Set the ParticleSystem.Shape to Edge.

How to fix it.

Scripts\Editor\UIParticleEditor.cs :602
#if UNITY_2019_1_OR_NEWER
float radius = Call<float> (typeof (Handles), "DoSimpleEdgeHandle", Quaternion.identity, Vector3.zero, shapeModule.radius, true);
#else
float radius = Call<float> (typeof (Handles), "DoSimpleEdgeHandle", Quaternion.identity, Vector3.zero, shapeModule.radius);
#endif

References
https://github.com/Unity-Technologies/UnityCsReference/blame/master/Editor/Mono/EditorHandles/SimpleRadiusHandle.cs#L12

Thank you.

v1.0.0 Release Summary

Let's use particle for your UI!
UIParticle is use easy.
The particle rendering is maskable and sortable, without Camera, RenderTexture or Canvas.

New scaling system

from #15

New scaling system solves the particle effect scaling problem in most cases.

  • All ParticleSystem.ScalingModes are supported
  • All Canvas.RenderModes are supported
  • They look almost the same in all modes

New scaling system scales particle effect well even if you change the following parameters:

  • Camera.FieldOfView
  • CanvasScaler.MatchWidthOrHeight
  • Canvas.PlaneDistance

v1.1.0 Release Summary

Easily to use, easily to set up.

  • Adjust the Scale property to change the size of the effect.
  • If your effect consists of multiple ParticleSystems, you can quickly set up UIParticles by clicking "Fix".

v1.1.0 Texture Sheet Animation scaling problem

env: Unity 2018.2.17f1
When using Screen Space - Overlay mode, any Grid mode texture sheet animation is extremely small and need UISprite.scale set to over 40 to get almost the same size.

UIParticle.Scale does not affect the gizmo of shape module

Hi Mob, thank you for awesome Plugin! It working great, but have 1 inconvenience, when i use Scale factor, particle scaled, but shape of it not scale, it's still small like image bellow, i'm use canvas overlay, i must scale transform of particle to make it working correct. Please check it out, thank you so much!

And why did you need to provide Scale factor when we can use Transform Scale?

bandicam 2018-12-18 17-07-05-352

Particles are generated twice.

Applying the UI particle component to the ParticleSystem will result in two same particles.
Is there a way to avoid it?
ParticleSystemにUI Particleコンポーネントを適用すると、パーティクルが2重に発生します。
回避する方法はありませんか?

env: Unity 2018.3.5f1 / UI Particle v2.1.1

v2.2.0 has 2 warnings

  • UIParticle.cs(59,23): warning CS0649: Field 'UIParticle.AnimatableProperty.m_Type' is never assigned to, and will always have its default value
  • UIParticle.cs(57,11): warning CS0649: Field 'UIParticle.AnimatableProperty.m_Name' is never assigned to, and will always have its default value null

When serializing private fields, Unity will throw a warning about default values. So there should be:

string m_Name = null;
ShaderPropertyType m_Type = ShaderPropertyType.Color; // or any other default one

Or #pragma to suppress those warnings...

Canvas.scaleFactor not take into account

env: Unity 2018.2.17f1
When using Screen space - Overlay and UI scale Mode Scale with screen size, Canvas.scaleFactor should take into account inside UpdateMesh()

Works great.

I add many issues with, UnityUIExtensions using UIParticleSystem with Unity 2018.2.18

Yours worked out of the box, first try. Amazing.

Just appreciate you sharing this.
It was or changing Canvas Render Mode to Screen Space - Camera and fixing all UI scaling, tremendous & painful work.. or using ParticleEffectForUGUI

Can't get it working

Unity 2018.3.7f1
UIParticle 2.2.1

ui_particle_report

When attached UIParticle to my particle system, it will disable the rendering in all layer below.
And, as you can see in the pic, when I set Animatable Properties, it will add ANOTHER shader component above the existed one.... is this as intended?

When moving the transform in world simulation mode, particles don't behave as expected

First, thanks for this great plugin :)

I found 2 issues, when using particles in World Simulation Space:

  1. If your canvas is in Screen Space Camera, moving particles around works as expected. But as soon as you increase the UI Particle Scale, world simulated particles don't behave as expected anymore
  2. If your canvas is in Screen Space Overlay, then no matter what's UI Particle Scale, particles transform don't work. Just try moving particles (in Simulation Space World) around and you'll see

All of this happens in Unity 2018.3.* - didn't test in older versions

Using prefab view will cause a lot of errors

Great assets, works well.

Just one minor issue:
When using the new prefab system from 2018 I get a massive error spam.
Probably because there's no real camera when editing the prefab in the new prefab view.

Didn't work OnParticleSystemStopped Callback

private void Start()
{
    ParticleSystem.MainModule main = _ps.main;
    main.stopAction = ParticleSystemStopAction.Callback;
}

private void OnParticleSystemStopped()
{
    CObjectPool._pInstance.PoolObject(gameObject);
}

Callback not working when use UIParticle

Particle not showing on Android, while on editor it works

I am using Canvas with Render mode- Screen Space - Overlay
I also have a camera set to Solid Color (black) and Culling Mask is Everything, if that matters.
Added a particle into the Canvas as a child, and added UIPartcile and pressed FIX to update Particle Children, everything works perfectly in Editor, while on Android i do not see the particle.
untitled-4

There are no LOG errors - which means it's not shaders or material missing.
I guess it just shows up but hidden for some reason.

v2.0.0 Release Summary

Install UIParticle with Unity Package Manager!

Find the manifest.json file in the Packages folder of your project and edit it to look like this:

{
  "dependencies": {
    "com.coffee.ui-particle": "https://github.com/mob-sakai/ParticleEffectForUGUI.git#2.0.0",
    ...
  },
}

To update the package, change #2.0.0 to the target version.

Particle scaling issues when changing Canvas RenderMode

Hi

Thank you for releasing the awesome UI Particle plug-in,
and please understand that my English is awkward.

There is something that seems to be a bit of a problem when I test it.

I opened the project that I uploaded as an example to Unity (2018.2.5f1) and it worked without any problem. However, changing the Canvas's RenderMode to ScreenSpace-Overlay did not seem to work.

I thought it was a problem in the UIParticle.cs to call the BakeMesh function with the Camera as an argument even though it was not based on CameraRenderMode. In fact, it was too small to render.

To make it work as intended, I need to raise the Scale of the RectTransform to 60, as in the example in ConvertParticlesToUIVertex.

I wonder if the intended behavior is correct.

Rect mask 2D doesn't work

First of all, thank you for this amazing asset!

Regular mask component works just fine, but Rect mask 2D doesn't work as intended.

Severe GC Allocations when using particles

See attached screenshot. 11.8 Kb for particle meshes alone. It's just too much allocations which will incur hiccups and frame skips spent on GC Collect every now and then (it's every ~10 frames on my desktop target - see the second screenshot). GC Collect is much heavier in real cases with actual gameplay stuff going on as the heap is bigger both in terms of memory and objects count, not to mention mobile targets.
Is there a way to completely remove these allocations?

image
image

v0.1.0 Release Summary

This plugin uses new APIs MeshBake/MashTrailBake (added with Unity 2018.2) to render particles by CanvasRenderer.
You can mask and sort particles for uGUI without Camera, RenderTexture, Canvas.

v1.2.0 Release Summary

New scaling system solves the particle effect scaling problem in most cases.

  • All ParticleSystem.ScalingModes are supported
  • All Canvas.RenderModes are supported
  • They look almost the same in all modes

New scaling system scales particle effect well even if you change the following parameters:

  • Camera.FieldOfView
  • CanvasScaler.MatchWidthOrHeight
  • Canvas.PlaneDistance

NOTE: If upgrading from v1.1.0, readjust the UIParticle.Scale property.

UIParticle.Scale - Rendering Order Issue

Hey,

on the pictures below you see a particle behind a blue box.

observation

Picture 1: A particle is scaled by 200. Particle size: 1. Doesn't respect render order.
Picture 2: Another particle is scaled by 1 but the particle size is set to 200. Works nicely.
Picture 3: Both particles are enabled and both are working nicely(?!).
Picture 4: That's the canvas that was used.

Honestly, this is not a big issue since everything works fine as long the particle scale is left untouched. Thank you for making this amazing plugin~ ^__^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.