I’m trying to “highlight” all parts of a model with a certain name. It works perfectly in player but in standalone build I get a NullReferenceException. Object reference not set to an instance of object. Dont understand why it would work in player but not the build. Any ideas? Thanks!
GameObject[] partsList = GameObject.FindGameObjectsWithTag("Part");
foreach(GameObject part in partsList){
if(part.name.Equals(guid)){
part.transform.renderer.material.SetColor("_Color", Color.blue);
}
}