Cleanup and ensuring the UIParticleSystem is disposed on Destroy correctly.
Resolves: https://github.com/Unity-UI-Extensions/com.unity.uiextensions/issues/412development
parent
60eed9b87a
commit
12f6174469
|
@ -6,8 +6,8 @@ namespace UnityEngine.UI.Extensions.ColorPicker
|
|||
{
|
||||
|
||||
[RequireComponent(typeof(Text))]
|
||||
public class ColorLabel : MonoBehaviour
|
||||
{
|
||||
public class ColorLabel : MonoBehaviour
|
||||
{
|
||||
public ColorPickerControl picker;
|
||||
|
||||
public ColorValues type;
|
||||
|
@ -83,5 +83,5 @@ public class ColorLabel : MonoBehaviour
|
|||
else
|
||||
return Mathf.FloorToInt(value).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -59,8 +59,10 @@ namespace UnityEngine.UI.Extensions.ColorPicker
|
|||
private void OnDestroy()
|
||||
{
|
||||
if (image.texture != null)
|
||||
{
|
||||
DestroyImmediate(image.texture);
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void OnValidate()
|
||||
|
|
|
@ -7,8 +7,8 @@ namespace UnityEngine.UI.Extensions.ColorPicker
|
|||
{
|
||||
|
||||
[RequireComponent(typeof(InputField))]
|
||||
public class HexColorField : MonoBehaviour
|
||||
{
|
||||
public class HexColorField : MonoBehaviour
|
||||
{
|
||||
public ColorPickerControl ColorPicker;
|
||||
|
||||
public bool displayAlpha;
|
||||
|
@ -97,5 +97,5 @@ public class HexColorField : MonoBehaviour
|
|||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -52,8 +52,10 @@ namespace UnityEngine.UI.Extensions.ColorPicker
|
|||
private void OnDestroy()
|
||||
{
|
||||
if (image.texture != null)
|
||||
{
|
||||
DestroyImmediate(image.texture);
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void OnValidate()
|
||||
|
|
|
@ -96,10 +96,8 @@ namespace UnityEngine.UI.Extensions
|
|||
{
|
||||
effectRoot.SetActive(true);
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
void OnDestroy()
|
||||
{
|
||||
if (!Application.isPlaying)
|
||||
|
|
|
@ -388,6 +388,7 @@ namespace UnityEngine.UI.Extensions
|
|||
{
|
||||
currentMaterial = null;
|
||||
currentTexture = null;
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
public void StartParticleEmission()
|
||||
|
|
Loading…
Reference in New Issue