You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-15 04:30:09 +00:00
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))
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user