Changing Font/color on a GUI

I’m trying to use GUISkin to change the font/color on a GUI. Here is my code.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class Menu : MonoBehaviour
{
public int MenuWidth;
public int MenuHeight;
public Texture Image;
public GUIStyle GUIStyle; // set the text style of the frame counter
Rect MenuRect;
// Create a public variable where we can assign the GUISkin
var customSkin : GUISkin;

// Start is called before the first frame update
void Start()
{

if ((MenuWidth == 0) || (MenuHeight == 0))
{
Debug.Log(“Menu size isn’t set”);
}
MenuRect = new Rect(Screen.width / 2 - MenuWidth / 2, Screen.height / 2 - MenuHeight / 2, MenuWidth, MenuHeight);

}

// Update is called once per frame
void Update()
{

}

private void OnGUI()
{
GUI.skin = customSkin;

GUI.Box(MenuRect, “Main Menu”);

GUI.DrawTexture(new Rect(Screen.width / 2 - 30, MenuRect.yMin + 30, 50, 50), Image);

if (GUI.Button(new Rect(MenuRect.xMin + 20, MenuRect.yMin + 130, MenuRect.width - 100, 100), “PLAY”))
{
SceneManager.LoadScene(1);
}

if (GUI.Button(new Rect(MenuRect.xMin + 20, MenuRect.yMin + 225, MenuRect.width - 50, 100), “QUIT”))
{
Application.Quit();
}
}

}

I’m getting any errors, anyone that can help?

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

How to understand compiler and other errors and even fix them yourself:

https://discussions.unity.com/t/824586/8

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: https://discussions.unity.com/t/481379