hello,
I have a small problem with a script and I do not know where it came from …
My error :

and my code :
using UnityEngine;
using System.Collections;
public class UIBox : ScriptableObject {
public float xSize;
public float ySize;
public string title;
public float titleSize;
public Color titleColor;
public string titleStyle;
public Color backgroundBoxColor;
public Texture2D backgroundBoxTexture;
public UIElements[] elements = new UIElements[0];
public bool display;
public void displayBox(float xSize, float ySize, string title, float titleSize,
string titleStyle, Color titleColor, Color backgroundBoxColor,
Texture2D backgroundBoxTexture, UIElements[] elements, bool display) {
elements = new UIElements[0];
string richTextBefore = "";
string richTextAfter = "";
string titleColorBefore = "<color=" + titleColor.ToString + ">";
string titleColorAfter = "</color>";
string titleSizeBefore = "<size="+ titleSize +">";
string titleSizeAfter = "</size>";
GUIStyle boxStyle;
boxStyle.
if(titleStyle == "bold") {
richTextBefore = "<b>";
richTextAfter = "</b>";
} else if(titleStyle == "italic") {
richTextBefore = "<i>";
richTextAfter = "</i>";
}
title = titleSizeBefore + titleColorBefore + richTextBefore + title + richTextAfter +
titleColorAfter + titleSizeAfter;
if(display == true && xSize >= 0 && ySize >= 0 && titleColor != null && backgroundBoxColor != null) {
GUI.Box (new Rect ((Screen.width / 2) - (xSize / 2), (Screen.height / 2) - (ySize / 2),
xSize, ySize), title);
GUI.BeginScrollView (new Rect ((Screen.width / 2) - (xSize / 2), (Screen.height / 2) - (ySize / 2),
xSize, ySize));
GUI.EndScrollView ();
}
}
}
thank you !!!