refactor
parent
aa2f99ce01
commit
b588e06f75
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"com.unity.ide.rider": "3.0.31",
|
||||
"com.coffee.development": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/Development",
|
||||
"com.coffee.nano-monitor": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
||||
"com.coffee.sub-asset-editor": "https://github.com/mob-sakai/SubAssetEditor.git",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "4a57c0a498ba7ce667290ec39510b1474030471a"
|
||||
"hash": "7a8e5603ab8e9241c8e0f9d29da3a56dbf76ea85"
|
||||
},
|
||||
"com.coffee.nano-monitor": {
|
||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
||||
|
@ -14,16 +14,7 @@
|
|||
"dependencies": {
|
||||
"com.unity.ugui": "1.0.0"
|
||||
},
|
||||
"hash": "4a57c0a498ba7ce667290ec39510b1474030471a"
|
||||
},
|
||||
"com.coffee.simple-scene-navigator": {
|
||||
"version": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SceneNavigator",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {
|
||||
"com.unity.ugui": "1.0.0"
|
||||
},
|
||||
"hash": "4a57c0a498ba7ce667290ec39510b1474030471a"
|
||||
"hash": "7a8e5603ab8e9241c8e0f9d29da3a56dbf76ea85"
|
||||
},
|
||||
"com.coffee.sub-asset-editor": {
|
||||
"version": "https://github.com/mob-sakai/SubAssetEditor.git",
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3e440931f761e4e888510a4e6045287a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -125,7 +125,8 @@ _This package requires **Unity 2018.3 or later**._
|
|||
|
||||
- The default value of `UIParticle.scale` has been changed from `10` to `1`.
|
||||
- `UIParticle` no longer inherits from `MaskableGraphic`.
|
||||
-
|
||||
- Add project settings for UIParticle
|
||||
- enableLinearToGamma: Enables LinearToGamma during mesh baking
|
||||
|
||||
<br><br>
|
||||
|
||||
|
|
|
@ -522,6 +522,7 @@ namespace Coffee.UIExtensions
|
|||
var go = transform.GetChild(i).gameObject;
|
||||
if (go.TryGetComponent<Camera>(out var cam) && cam == _bakeCamera) continue;
|
||||
if (go.TryGetComponent<UIParticleRenderer>(out var _)) continue;
|
||||
|
||||
go.SetActive(false);
|
||||
if (destroyOldParticles)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,6 @@ namespace Coffee.UIExtensions
|
|||
private static readonly CombineInstance[] s_CombineInstances = { new CombineInstance() };
|
||||
private static readonly List<Material> s_Materials = new List<Material>(2);
|
||||
private static MaterialPropertyBlock s_Mpb;
|
||||
private static readonly List<UIParticleRenderer> s_Renderers = new List<UIParticleRenderer>(8);
|
||||
private static readonly Vector3[] s_Corners = new Vector3[4];
|
||||
private bool _delay;
|
||||
private int _index;
|
||||
|
@ -445,22 +444,25 @@ namespace Coffee.UIExtensions
|
|||
|
||||
// Get grouped renderers.
|
||||
Profiler.BeginSample("[UIParticleRenderer] Set Mesh");
|
||||
s_Renderers.Clear();
|
||||
var renderers = ListPool<UIParticleRenderer>.Rent();
|
||||
if (_parent.useMeshSharing)
|
||||
{
|
||||
UIParticleUpdater.GetGroupedRenderers(_parent.groupId, _index, s_Renderers);
|
||||
UIParticleUpdater.GetGroupedRenderers(_parent.groupId, _index, renderers);
|
||||
}
|
||||
|
||||
for (var i = 0; i < s_Renderers.Count; i++)
|
||||
for (var i = 0; i < renderers.Count; i++)
|
||||
{
|
||||
if (s_Renderers[i] == this) continue;
|
||||
var r = renderers[i];
|
||||
if (r == this) continue;
|
||||
|
||||
s_Renderers[i].canvasRenderer.SetMesh(workerMesh);
|
||||
s_Renderers[i]._lastBounds = _lastBounds;
|
||||
s_Renderers[i].canvasRenderer.materialCount = 1;
|
||||
s_Renderers[i].canvasRenderer.SetMaterial(materialForRendering, 0);
|
||||
r.canvasRenderer.SetMesh(workerMesh);
|
||||
r._lastBounds = _lastBounds;
|
||||
r.canvasRenderer.materialCount = 1;
|
||||
r.canvasRenderer.SetMaterial(materialForRendering, 0);
|
||||
}
|
||||
|
||||
ListPool<UIParticleRenderer>.Return(ref renderers);
|
||||
|
||||
if (_parent.canRender)
|
||||
{
|
||||
canvasRenderer.SetMesh(workerMesh);
|
||||
|
@ -471,8 +473,6 @@ namespace Coffee.UIExtensions
|
|||
}
|
||||
|
||||
Profiler.EndSample();
|
||||
|
||||
s_Renderers.Clear();
|
||||
}
|
||||
|
||||
public override void SetMaterialDirty()
|
||||
|
|
Loading…
Reference in New Issue