Im trying to create a custom plugin for creating quads and assigning texture to them. I get “Instantiating material due to calling renderer.material during edit mode”. Any help on this would be greatly appreciated.
GameObject Game_Quad = GameObject.CreatePrimitive(PrimitiveType.Quad);
Game_Quad.transform.localScale=new Vector2 (Quad_Width,Quad_Height);
Game_Quad.transform.Rotate(0,0,0);
Game_Quad.transform.position=new Vector3(0,0,2f);
Texture2D Tex = (Texture2D) Resources.Load("Assets/Textures/C_1_A", typeof(Texture2D));
Game_Quad.renderer.material.mainTexture = Tex;