// Reset to default values. public void Reset() { UpdateMaterials(); for (int i = 0; i < GetGraphCount(); i++) { string m = BocsCyclesShaderConvert.Convert(Smats[i]); m = Regex.Replace(m, "[^a-zA-Z0-9_.:,|=+-;<>/| ]", string.Empty); Nodes[i] = m; } NSync(); BocsCyclesAPI.ObjectDelete(this.gameObject); BocsCyclesAPI.AddMesh(this.gameObject); }
//Delete object protected void OnDestroy() { BocsCyclesAPI.ObjectDelete(this.gameObject); }