Hey guys,
I was able to use this scrpt and modify it to make an oject plane into a link, but now I want to make multiple objects into seperate links. I think I need to define the oject name and assign the specific link to that object. But I'm having some trouble with the coding. please help.
This is what I have so far.
using UnityEngine;
using System.Collections;
public class NorthCamlink : MonoBehaviour {
bool isHighlighted = false;
Material originalMaterial;
Material redMaterial;
MeshRenderer meshRenderer;
GameObject baseObject;
string obj_name;
// Use this for initialization
void Start () {
obj_name = this.gameObject.name + "Base";
baseObject = GameObject.Find( obj_name );
meshRenderer = baseObject.GetComponent<MeshRenderer>();
originalMaterial = meshRenderer.material;
}
// Update is called once per frame
void Update () {
}
void OnMouseDown(){
{
}
}
}
I figured it out. Thank you for posting links