public void InsertSubshader(int index, SubshaderType subshaderType) { switch (subshaderType) { case SubshaderType.Surface: _subshaders.Insert(index, CreateInstance <SurfaceShader>()); break; case SubshaderType.Custom: throw new InvalidEnumArgumentException(); #pragma warning disable 0162 break; #pragma warning restore 0162 default: throw new ArgumentOutOfRangeException("subshaderType"); } }
public void AddSubshader(SubshaderType subshaderType) { InsertSubshader(_subshaders.Count, subshaderType); }