/// <summary> /// Find the <see cref="SubstanceGraph"/> associated with a given material. /// </summary> private void Start() { SubstanceGraph graph = SubstanceGraph.Find(mat); if (graph != null) { } }
void GetMat() { Material mat = this.GetComponent <Renderer>().sharedMaterial; substance = SubstanceGraph.Find(mat); }