void Awake() { if (this.gameObject.GetComponent<Texture_2D>()) texture_2D = this.gameObject.GetComponent<Texture_2D>(); else if (this.transform.parent.GetComponent<Texture_2D>()) texture_2D = this.transform.parent.GetComponent<Texture_2D>(); }
void Awake() { if (this.gameObject.GetComponent <Texture_2D>()) { texture_2D = this.gameObject.GetComponent <Texture_2D>(); } else if (this.transform.parent.GetComponent <Texture_2D>()) { texture_2D = this.transform.parent.GetComponent <Texture_2D>(); } }