Skip to content

Commit 8a0b2ac

Browse files
committed
修改第一次GUI样式问题
1 parent eced2c8 commit 8a0b2ac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

UnityParticleSystemPreview/Assets/ParticleSystemPreview/Editor/ParticleSystemPreview.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,6 @@ public void SetEditor(Editor editor)
143143

144144
public override void Initialize(UnityEngine.Object[] targets)
145145
{
146-
if (s_Styles == null)
147-
{
148-
s_Styles = new Styles();
149-
}
150-
151146
base.Initialize(targets);
152147

153148
if (m_CacheEditor == null)
@@ -221,6 +216,11 @@ public override GUIContent GetPreviewTitle()
221216

222217
public override void OnPreviewSettings()
223218
{
219+
if (s_Styles == null)
220+
{
221+
s_Styles = new Styles();
222+
}
223+
224224
InitPreview();
225225
if (m_PreviewUtility == null)
226226
{

0 commit comments

Comments
 (0)