feat: shrink rendering by material

NOTE: Performance will be improved, but in some cases the rendering is not correct.

Close #113
This commit is contained in:
mob-sakai
2020-11-20 13:11:08 +09:00
parent 2ec81da048
commit 46a7dddd11
3 changed files with 24 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ namespace Coffee.UIExtensions
private SerializedProperty _spScale;
private SerializedProperty _spIgnoreCanvasScaler;
private SerializedProperty _spAnimatableProperties;
private SerializedProperty _spShrinkByMaterial;
private ReorderableList _ro;
private bool _xyzMode;
@@ -57,6 +58,7 @@ namespace Coffee.UIExtensions
_spScale = serializedObject.FindProperty("m_Scale3D");
_spIgnoreCanvasScaler = serializedObject.FindProperty("m_IgnoreCanvasScaler");
_spAnimatableProperties = serializedObject.FindProperty("m_AnimatableProperties");
_spShrinkByMaterial = serializedObject.FindProperty("m_ShrinkByMaterial");
var sp = serializedObject.FindProperty("m_Particles");
_ro = new ReorderableList(sp.serializedObject, sp, true, true, true, true);
@@ -164,6 +166,9 @@ namespace Coffee.UIExtensions
t.SetMaterialDirty();
}
// ShrinkByMaterial
EditorGUILayout.PropertyField(_spShrinkByMaterial);
// Target ParticleSystems.
_ro.DoLayoutList();