Hello I am having problems to run this script, The idea is when the user touch one object all objects with the same tag change color but now only the one touched is changing color. Any tip is more than welcome Tks 
using UnityEngine;
using System.Collections;
public class Highlight : MonoBehaviour {
public Color defaultColor;
public Color selectedColor;
public GameObject TagName;
void Start(){
}
void OnTouchDown () {
if(TagName.tag == "Top") renderer.material.color = selectedColor;
}
void OnTouchUp () {
if(TagName.tag == "Top") renderer.material.color = defaultColor;
}
void OnTouchStay () {
if(TagName.tag == "Top") renderer.material.color = selectedColor;
}
void OnTouchExit () {
if(TagName.tag == "Top") renderer.material.color = defaultColor;
}
}
Function FindGameObjectsWithTag() returns array of GameObject. If you change color, you must write new function. But, I hope, that onTouchDown(), onTouchUp() and etc already define somewhere. And, I hope, for your object you use, for example, standart Diffuse shader:
public Color defaultColor;
public Color selectedColor;
public GameObject TagName;
void Start(){
this.myColorChange(defaultColor);
}
//Create function for change color
public void myColorChange(Color col) {
GameObject[] fullG = GameObject.FindGameObjectsWithTag("door");
foreach(GameObject gmo in fullG) {
gmo.renderer.material.color = col;
}
}
void OnTouchDown () {
this.myColorChange(selectedColor);
}
void OnTouchUp () {
this.myColorChange(defaultColor);
}
void OnTouchStay () {
this.myColorChange(selectedColor);
}
void OnTouchExit () {
this.myColorChange(defaultColor);
}
I hope that it will help you.
@zharik86 Hi I have a TouchScript attached to my camera, returns all touch events maximum 5 in the screen, working in iOS, if you want I can send to you.
Let me explain in steps what the project should do:
1- There are many buttons (cubes) each one showing one color and the color name in the left side of the screen like a menu
2- There are meshes from Blender with TAG named as colors
3- There are other cubes made in Unity that will change the the specifc color
4- If the user touches any button from the menu, all related TAGs will change to a specific color for this group (TAG).
5- If the user touches any mesh then every object in the scene with the same TAG of this mesh will change the specific color
6- Any time one object is touched the panelInformation in the bottom of the screen will show a different information, please check the name of the files
Check the screen shot 1: link text
Check the screen shot 2: link text