Help With GUI (C#)

Hi Guys,

I have a problem with my GUI texture i have written a script so when the my player enters a trigger the GUI shows up. But i cant seem to get it to work.

Thank You,

using UnityEngine;
using System.Collections;

public class Level_Finish : MonoBehaviour {

	// Use this for initialization
	void Start () {
		GUITexture = false;
	
	}
	
	// Update is called once per frame
	void Update () {
	
	
}
	void OnTriggerEnter(Collider col){
		if (col.CompareTag == "Player") {
			GUITexture = true;	
		}
	}

Assuming this script is on the same game object as the GUITexture, then you can do:

using UnityEngine;
using System.Collections;

public class Level_Finish : MonoBehaviour {

    public GUITexture levelCompleteGUITExture;
	
	void Start () {
		finishFlag.enabled = false;
	}

	void OnTriggerEnter(Collider col){
		if (col.tag == "Player") {
			levelCompleteGUITExture.enabled = true;   
		}
	}
}

Note that GUITexture is the class. You need to manipulate a specific instance of that class since you game can have multiple GUITextures.

Also note that CompareTag() is a method/function.