Hi guys. Do you have idea on how to change texture to a 3d objects? My goal is to change the texture2d to a 3d object like image in blender but it has an extension .obj here is my code. Any suggestion will be appreciated.
using UnityEngine;
using System.Collections;
using System.Text.RegularExpressions;
public class test1 : MonoBehaviour {
public static string print = Try.aw;
public GUIStyle B;
public Texture2D A;
public Texture2D C;
bool CorrectValue;
bool a;
void OnGUI() {
if(GUI.Button (new Rect (100, 100, 40, 40), "", B)) {
if(int.Parse(print) == 1){
CorrectValue = true;
} else {
CorrectValue = false;
}
if(int.Parse(print) == 2){
a = true;
} else {
a = false;
}
}
if(CorrectValue) {
GUI.DrawTexture(new Rect(500,200,200,200),A);
}
if(a) {
GUI.DrawTexture(new Rect(300,200,200,200),C);
GUI.DrawTexture(new Rect(200,100,200,200),C);
}
}
}