You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 20:20:06 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f9bbf57bc | ||
|
|
0b9d80da93 | ||
|
|
24d32d8441 | ||
|
|
476c4027ff | ||
|
|
12c748a8cd | ||
|
|
0259ad2464 |
15
CHANGELOG.md
15
CHANGELOG.md
@@ -1,3 +1,18 @@
|
||||
## [3.3.7](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.6...3.3.7) (2021-06-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Refresh() will be called multiple times in the same frame, due to external assets ([0b9d80d](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0b9d80da939580c72ca1471081d7a034edc985d4))
|
||||
|
||||
## [3.3.6](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.5...3.3.6) (2021-05-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* In rare cases, the generated camera (for baking) will not be deactivated ([12c748a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/12c748a8cd4adfd2dc5f085cec77050431f261a4))
|
||||
* remove from "Add Component" menu ([476c402](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/476c4027ff5f70fb9b4c026dd5fc59bf5a876227))
|
||||
|
||||
## [3.3.5](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.4...3.3.5) (2021-02-28)
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Coffee.UIParticleExtensions
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
internal class BakingCamera : MonoBehaviour
|
||||
{
|
||||
static BakingCamera s_Instance;
|
||||
@@ -40,12 +41,11 @@ namespace Coffee.UIParticleExtensions
|
||||
// Find instance in scene, or create new one.
|
||||
return s_Instance
|
||||
? s_Instance
|
||||
: (s_Instance = FindObjectOfType<BakingCamera>() ?? Create());
|
||||
: (s_Instance = Create());
|
||||
}
|
||||
}
|
||||
|
||||
private Camera _camera;
|
||||
// private int _refCount;
|
||||
|
||||
private static BakingCamera Create()
|
||||
{
|
||||
@@ -56,6 +56,7 @@ namespace Coffee.UIParticleExtensions
|
||||
|
||||
var inst = gameObject.AddComponent<BakingCamera>();
|
||||
inst._camera = gameObject.AddComponent<Camera>();
|
||||
inst._camera.enabled = false;
|
||||
inst._camera.orthographic = true;
|
||||
|
||||
// Turn camera off because particle mesh baker will use only camera matrix
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Coffee.UIExtensions
|
||||
static readonly List<UIParticle> s_ActiveParticles = new List<UIParticle>();
|
||||
static MaterialPropertyBlock s_Mpb;
|
||||
static ParticleSystem.Particle[] s_Particles = new ParticleSystem.Particle[2048];
|
||||
private static int frameCount = 0;
|
||||
|
||||
|
||||
public static void Register(UIParticle particle)
|
||||
@@ -41,6 +42,10 @@ namespace Coffee.UIExtensions
|
||||
|
||||
private static void Refresh()
|
||||
{
|
||||
// Do not allow it to be called in the same frame.
|
||||
if (frameCount == Time.frameCount) return;
|
||||
frameCount = Time.frameCount;
|
||||
|
||||
Profiler.BeginSample("[UIParticle] Refresh");
|
||||
for (var i = 0; i < s_ActiveParticles.Count; i++)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "com.coffee.ui-particle",
|
||||
"displayName": "UI Particle",
|
||||
"description": "This plugin provide a component to render particle effect for uGUI.\nThe particle rendering is maskable and sortable, without Camera, RenderTexture or Canvas.",
|
||||
"version": "3.3.5",
|
||||
"version": "3.3.7",
|
||||
"unity": "2018.2",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user