Esempio n. 1
0
        private static void DrawExpression(Rect position, Expression expression, GUIContent label, bool fullWidth, bool foldout, ref bool isExpanded)
        {
            using (new InvalidScope(!expression.HasError))
            {
                using (var changes = new EditorGUI.ChangeCheckScope())
                {
                    var statement = foldout
                                                ? StringDisplayDrawer.DrawFoldoutArea(position, label, expression.Statement, ref isExpanded, fullWidth, false)
                                                : StringDisplayDrawer.DrawArea(position, label, expression.Statement, fullWidth, false);

                    if (changes.changed)
                    {
                        expression.SetStatement(statement);
                    }
                }
            }
        }