public static void DrawTextFxInspectorSection(ScriptableObject objRef, TextFxAnimationManager animationManager, System.Action curveSettingChangeCallback) { // Check that required assets have been loaded CheckAssetReferences(objRef); EditorGUILayout.BeginHorizontal(m_horizontalLayoutBoxStyle, GUILayout.Height(35)); Color cachedColour = GUI.contentColor; #if UNITY_PRO_LICENSE GUI.contentColor = Color.black; #endif GUILayout.Label(" TextFx", m_textFxInspectorBoxTitleStyle, GUILayout.Width(90)); #if UNITY_PRO_LICENSE GUI.contentColor = cachedColour; #endif EditorGUILayout.BeginHorizontal(GUILayout.Width(120)); if (GUILayout.Button(!animationManager.PreviewingAnimationInEditor || animationManager.PreviewAnimationPaused ? m_play_button_texture : m_pause_button_texture, GUILayout.Width(m_inspectorButtonDims), GUILayout.Height(m_inspectorButtonDims))) { if (animationManager.PreviewingAnimationInEditor) { animationManager.PreviewAnimationPaused = !animationManager.PreviewAnimationPaused; } else { if (animationManager.m_master_animations == null || animationManager.m_master_animations.Count == 0) { // No animation defined yet. Open the animation editor window to point user in the right direction. Debug.LogWarning("You need to setup an animation before you can play anything..."); TextEffectsManager.Init(); } else { animationManager.PlayEditorAnimation(); } } } if (GUILayout.Button(m_reset_button_texture, GUILayout.Width(m_inspectorButtonDims), GUILayout.Height(m_inspectorButtonDims))) { animationManager.ResetEditorAnimation(); } if (animationManager.Playing) { // Continue Past Break Button if (GUILayout.Button(m_continue_button_texture, GUILayout.Width(m_inspectorButtonDims), GUILayout.Height(m_inspectorButtonDims))) { animationManager.ContinuePastBreak(); } // Continue Past Loop Button if (GUILayout.Button(m_continue_past_loop_button_texture, GUILayout.Width(m_inspectorButtonDims), GUILayout.Height(m_inspectorButtonDims))) { animationManager.ContinuePastLoop(); } } EditorGUILayout.EndHorizontal(); GUILayout.FlexibleSpace(); GUI.contentColor = cachedColour; #if UNITY_4_6 || UNITY_4_7 if (GUILayout.Button("Open Animation Editor", m_wrapButton, GUILayout.MaxWidth(150), GUILayout.MinWidth(100), GUILayout.Height(29))) #else if (GUILayout.Button("Open Animation Editor", m_wrapButton, GUILayout.MaxWidth(150), GUILayout.MinWidth(100), GUILayout.Height(32))) #endif { TextEffectsManager.Init(); } EditorGUILayout.EndHorizontal(); GUILayout.Space(10); if (animationManager.AnimationInterface != null && animationManager.AnimationInterface.CurvePositioningEnabled) { bool guiChanged = GUI.changed; animationManager.AnimationInterface.RenderToCurve = EditorGUILayout.Toggle("Render To Curve?", animationManager.AnimationInterface.RenderToCurve); if (animationManager.AnimationInterface.RenderToCurve) { animationManager.AnimationInterface.DrawBezierInspector(); } if (!guiChanged && GUI.changed && curveSettingChangeCallback != null) { curveSettingChangeCallback(); } GUILayout.Space(10); } }