You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 20:20:06 +00:00
3.0.0-preview.28
# [3.0.0-preview.28](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.27...v3.0.0-preview.28) (2020-09-01)
### Features
* support AnimatableProperty for multiple materials ([062d988](062d9887fb))
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Coffee.UIExtensions
|
||||
private Mesh _bakedMesh;
|
||||
private readonly List<Material> _modifiedMaterials = new List<Material>();
|
||||
private readonly List<Material> _maskMaterials = new List<Material>();
|
||||
private uint _activeMeshIndices;
|
||||
private long _activeMeshIndices;
|
||||
private Vector3 _cachedPosition;
|
||||
private static readonly List<Material> s_TempMaterials = new List<Material>(2);
|
||||
private static MaterialPropertyBlock s_Mpb;
|
||||
@@ -91,7 +91,7 @@ namespace Coffee.UIExtensions
|
||||
get { return _modifiedMaterials; }
|
||||
}
|
||||
|
||||
internal uint activeMeshIndices
|
||||
internal long activeMeshIndices
|
||||
{
|
||||
get { return _activeMeshIndices; }
|
||||
set
|
||||
@@ -190,7 +190,7 @@ namespace Coffee.UIExtensions
|
||||
r.GetSharedMaterials(s_TempMaterials);
|
||||
|
||||
// Main
|
||||
var bit = 1 << (i * 2);
|
||||
var bit = (long) 1 << (i * 2);
|
||||
if (0 < (activeMeshIndices & bit) && 0 < s_TempMaterials.Count)
|
||||
{
|
||||
var mat = GetModifiedMaterial(s_TempMaterials[0], ps.GetTextureForSprite());
|
||||
@@ -264,8 +264,7 @@ namespace Coffee.UIExtensions
|
||||
}
|
||||
|
||||
// Create objects.
|
||||
_bakedMesh = new Mesh();
|
||||
_bakedMesh.MarkDynamic();
|
||||
_bakedMesh = MeshPool.Rent();
|
||||
|
||||
base.OnEnable();
|
||||
|
||||
@@ -283,7 +282,7 @@ namespace Coffee.UIExtensions
|
||||
_tracker.Clear();
|
||||
|
||||
// Destroy object.
|
||||
DestroyImmediate(_bakedMesh);
|
||||
MeshPool.Return(_bakedMesh);
|
||||
_bakedMesh = null;
|
||||
|
||||
base.OnDisable();
|
||||
|
||||
Reference in New Issue
Block a user