using System.Collections; using System.Collections.Generic; using UnityEngine; public class PosterOn : MonoBehaviour { public void PosterOnWall() { if (PAINT.SEL != "" || PAINT.SEL != "ON") { GameObject.Find(PAINT.SEL).GetComponent().material.mainTexture = Resources.Load("PosterM1") as Texture2D; GameObject.Find(PAINT.SEL).GetComponent().material.mainTextureScale = new Vector2(1, 1); GameObject.Find(PAINT.SEL).GetComponent().material.SetFloat("_Metallic", 0.4F); GameObject.Find(PAINT.SEL).GetComponent().material.SetFloat("_Glossiness", 0.7F); } } }