You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-16 13:10:07 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0fba1dc9f |
@@ -1,11 +1,3 @@
|
|||||||
## [3.3.10](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.9...3.3.10) (2022-02-17)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* annoying warning for [ExecuteInEditMode] ([b6b2c72](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/b6b2c72b198566e2880a22831c937eff7e9eff28)), closes [#180](https://github.com/mob-sakai/ParticleEffectForUGUI/issues/180)
|
|
||||||
* PrefabStageUtility class is not experimental after 2021.2 ([0fd5d7a](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/0fd5d7affe707fa9e92abd6e192bf400dfb1a80a))
|
|
||||||
|
|
||||||
## [3.3.9](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.8...3.3.9) (2021-08-02)
|
## [3.3.9](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/3.3.8...3.3.9) (2021-08-02)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using UnityEngine.UI;
|
|||||||
namespace Coffee.UIExtensions.Demos
|
namespace Coffee.UIExtensions.Demos
|
||||||
{
|
{
|
||||||
#if UNITY_5_3_OR_NEWER
|
#if UNITY_5_3_OR_NEWER
|
||||||
[ExecuteAlways]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(CanvasRenderer), typeof(ParticleSystem))]
|
[RequireComponent(typeof(CanvasRenderer), typeof(ParticleSystem))]
|
||||||
public class UIParticleSystem_Demo : MaskableGraphic
|
public class UIParticleSystem_Demo : MaskableGraphic
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,11 +17,7 @@ namespace Coffee.UIParticleExtensions
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
// If current scene is prefab mode, create OverlayCamera for editor.
|
// If current scene is prefab mode, create OverlayCamera for editor.
|
||||||
#if UNITY_2021_2_OR_NEWER
|
|
||||||
var prefabStage = UnityEditor.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage();
|
|
||||||
#else
|
|
||||||
var prefabStage = UnityEditor.Experimental.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage();
|
var prefabStage = UnityEditor.Experimental.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage();
|
||||||
#endif
|
|
||||||
if (prefabStage == null || !prefabStage.scene.isLoaded) return null;
|
if (prefabStage == null || !prefabStage.scene.isLoaded) return null;
|
||||||
if (s_InstanceForPrefab) return s_InstanceForPrefab;
|
if (s_InstanceForPrefab) return s_InstanceForPrefab;
|
||||||
|
|
||||||
|
|||||||
@@ -212,12 +212,8 @@ namespace Coffee.UIExtensions
|
|||||||
DestroyImmediate(p);
|
DestroyImmediate(p);
|
||||||
DestroyImmediate(cr);
|
DestroyImmediate(cr);
|
||||||
|
|
||||||
#if UNITY_2021_2_OR_NEWER
|
|
||||||
var stage = UnityEditor.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage();
|
|
||||||
#elif UNITY_2018_3_OR_NEWER
|
|
||||||
var stage = UnityEditor.Experimental.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage();
|
|
||||||
#endif
|
|
||||||
#if UNITY_2018_3_OR_NEWER
|
#if UNITY_2018_3_OR_NEWER
|
||||||
|
var stage = UnityEditor.Experimental.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage();
|
||||||
if (stage != null && stage.scene.isLoaded)
|
if (stage != null && stage.scene.isLoaded)
|
||||||
{
|
{
|
||||||
#if UNITY_2020_1_OR_NEWER
|
#if UNITY_2020_1_OR_NEWER
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Coffee.UIExtensions
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Render maskable and sortable particle effect ,without Camera, RenderTexture or Canvas.
|
/// Render maskable and sortable particle effect ,without Camera, RenderTexture or Canvas.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ExecuteAlways]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[RequireComponent(typeof(CanvasRenderer))]
|
[RequireComponent(typeof(CanvasRenderer))]
|
||||||
public class UIParticle : MaskableGraphic
|
public class UIParticle : MaskableGraphic
|
||||||
@@ -313,6 +313,20 @@ namespace Coffee.UIExtensions
|
|||||||
ClearPreviousMaterials();
|
ClearPreviousMaterials();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ClearMaterials()
|
||||||
|
{
|
||||||
|
// Clear mask materials.
|
||||||
|
s_PrevMaskMaterials.AddRange(_maskMaterials);
|
||||||
|
_maskMaterials.Clear();
|
||||||
|
|
||||||
|
// Clear modified materials.
|
||||||
|
s_PrevModifiedMaterials.AddRange(_modifiedMaterials);
|
||||||
|
_modifiedMaterials.Clear();
|
||||||
|
|
||||||
|
canvasRenderer.Clear();
|
||||||
|
ClearPreviousMaterials();
|
||||||
|
}
|
||||||
|
|
||||||
private void ClearPreviousMaterials()
|
private void ClearPreviousMaterials()
|
||||||
{
|
{
|
||||||
foreach (var m in s_PrevMaskMaterials)
|
foreach (var m in s_PrevMaskMaterials)
|
||||||
@@ -447,6 +461,7 @@ namespace Coffee.UIExtensions
|
|||||||
_bakedMesh = null;
|
_bakedMesh = null;
|
||||||
|
|
||||||
base.OnDisable();
|
base.OnDisable();
|
||||||
|
ClearMaterials();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "com.coffee.ui-particle",
|
"name": "com.coffee.ui-particle",
|
||||||
"displayName": "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.",
|
"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.10",
|
"version": "3.3.9",
|
||||||
"unity": "2018.2",
|
"unity": "2018.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Reference in New Issue
Block a user