Search Unity

I want to print the imported obj/fbx file when a button is clicked

Discussion in 'Scripting' started by Jela, Jul 27, 2014.

  1. Jela

    Jela

    Joined:
    Jul 5, 2014
    Posts:
    30
    Hi guys. I need your help. I don't have any idea on how to print the imported obj file when a button is clicked. Will you please give me the code for that? :( please. I need it. Thank you in advance!
     
  2. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
  3. Jela

    Jela

    Joined:
    Jul 5, 2014
    Posts:
    30
    I know how to use button, and I've already displayed the image using gui texture when a button is clicked. I want to know how to display .obj files. Should I still use the gui texture?
     
  4. Sydious

    Sydious

    Joined:
    Apr 1, 2010
    Posts:
    172
    I think what you are saying is that you want to display a 3d model instead of a texture when you push a button?

    If so, then
    1 - import your 3d model fbx file into unity. (drag and drop file into your project)
    2 -Create a prefab game object with the model.
    3 - then instantiate the prefab when you click the button. http://docs.unity3d.com/Manual/InstantiatingPrefabs.html