private void Awake() { material = GetComponent <InstanceMaterial>(); }
private InstanceMaterial ParseMatInstance() { InstanceMaterial mat = new InstanceMaterial(); while (_reader.ReadAttribute()) if (_reader.Name.Equals("symbol", true)) mat._symbol = (string)_reader.Value; else if (_reader.Name.Equals("target", true)) mat._target = _reader.Value[0] == '#' ? (string)(_reader.Value + 1) : (string)_reader.Value; while (_reader.BeginElement()) { if (_reader.Name.Equals("bind_vertex_input", true)) mat._vertexBinds.Add(ParseVertexInput()); _reader.EndElement(); } return mat; }