3.0.0-preview.14

# [3.0.0-preview.14](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.13...v3.0.0-preview.14) (2020-08-11)

### Bug Fixes

* read-only properties in the inspector ([f012b23](f012b238d9))
pull/120/head
semantic-release-bot 2020-08-11 15:19:14 +00:00
parent e036d254a8
commit 2b3bf91655
3 changed files with 22 additions and 6 deletions

View File

@ -1,3 +1,10 @@
# [3.0.0-preview.14](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.13...v3.0.0-preview.14) (2020-08-11)
### Bug Fixes
* read-only properties in the inspector ([f012b23](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/f012b238d97aad3fdc3107b1f9a197de869c43e6))
# [3.0.0-preview.13](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.12...v3.0.0-preview.13) (2020-08-11)

View File

@ -162,7 +162,10 @@ namespace Coffee.UIExtensions
{
serializedObject.Update();
EditorGUI.BeginDisabledGroup(true);
EditorGUILayout.PropertyField(_spParticleSystem);
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel++;
var ps = _spParticleSystem.objectReferenceValue as ParticleSystem;
if (ps)
@ -170,12 +173,18 @@ namespace Coffee.UIExtensions
var pr = ps.GetComponent<ParticleSystemRenderer>();
var sp = new SerializedObject(pr).FindProperty("m_Materials");
EditorGUILayout.PropertyField(sp.GetArrayElementAtIndex(0), s_ContentParticleMaterial);
if (2 <= sp.arraySize)
EditorGUI.BeginChangeCheck();
{
EditorGUILayout.PropertyField(sp.GetArrayElementAtIndex(1), s_ContentTrailMaterial);
EditorGUILayout.PropertyField(sp.GetArrayElementAtIndex(0), s_ContentParticleMaterial);
if (2 <= sp.arraySize)
{
EditorGUILayout.PropertyField(sp.GetArrayElementAtIndex(1), s_ContentTrailMaterial);
}
}
if (EditorGUI.EndChangeCheck())
{
sp.serializedObject.ApplyModifiedProperties();
}
sp.serializedObject.ApplyModifiedProperties();
if (!Application.isPlaying && pr.enabled)
{
@ -282,4 +291,4 @@ namespace Coffee.UIExtensions
}
}
}
#endif // [ASMDEFEX] DO NOT REMOVE THIS LINE MANUALLY.
#endif // [ASMDEFEX] DO NOT REMOVE THIS LINE MANUALLY.

View File

@ -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.0.0-preview.13",
"version": "3.0.0-preview.14",
"unity": "2018.2",
"license": "MIT",
"repository": {