Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Setting up a configurable gui menu??

Discussion in 'Immediate Mode GUI (IMGUI)' started by Tyler Ridings, Nov 2, 2010.

  1. Tyler Ridings

    Tyler Ridings

    Joined:
    Aug 28, 2009
    Posts:
    201
    Ok the title does no justice to my question.

    I have set up a semi truck rig for the game my company is making.But I'm wanting to join the community in to the build by making a web player that has a gui allowing the users to configure the trucks's physics.I have the truck's physics all set up to be configurable in the inspector of unity.But how do i get that into a gui so my users can configure the truck the best way possible.

    Second questions is i want them to be able to save the setting not by something special but just saving the values in a notepad or wordpad file if possible.

    Any help would be wonderful thanks.
     
  2. Jesse Anders

    Jesse Anders

    Joined:
    Apr 5, 2008
    Posts:
    2,857
    There's a number of different aspects to your question. Which part do you need help with exactly?

    Also, is the idea behind saving the settings to a text file that the user can later open the file and restore those settings?
     
  3. skylerkingdev

    skylerkingdev

    Joined:
    Sep 10, 2010
    Posts:
    36
    I am working on something extremely similar, what I'm thinking is that there has to be a way to use the playerprefs and have that save the player name, car setup, car color, etc. I'll let you know what I find out.

    The ideal solution would be to set up something kind of like that car physics setup tool I've seen here on the forums, but I am not quite sure how to make something like that work in multipayer yet.
     
    Last edited: Nov 2, 2010
  4. Tyler Ridings

    Tyler Ridings

    Joined:
    Aug 28, 2009
    Posts:
    201
    The only thing the saved settings file would be used for is really just by me.They get the best setting send it to me and if i think they have a good combination i enter the setting's that the file saved,into the unity game engine.

    And the thing i need most help on is taking the setting panel from the inspector and putting it into a gui so the player can configure the truck exactly like this is set up http://www.alabsoft.com/Unity3D/VehicleEditor_v1_5_Porsche997_Demo.html see how there is a gui on the side to configure the car.I have that in my inspector of unity with is all controlled by var's in my script now i just have to put that onto a gui so the web player can see it.

    I dont need a step by step process just a little help to point me in the right direction.
     
  5. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    With typical vehicle physics, you will likely want a set of sliders to vary the different parameters between their extremes. You will need to create separate controls for all your variables (ie, there isn't any direct way to expose all a class's variables to the GUI during gameplay).

    As regards saving the data, you will probably want to look at the System.IO classes from the Mono library. However, if you want to upload the data to a webserver then this is easily done in Unity using the WWW and WWWForm classes.
     
  6. Tyler Ridings

    Tyler Ridings

    Joined:
    Aug 28, 2009
    Posts:
    201
    Alright thanks for the info.I guess i will just learn some basic gui and that should lead me to getting started.