Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Sethhalocat · Oct 18, 2014 at 01:40 AM ·

A character customization

I have some what of.a idea how to do this but I'm not sure about the GUI or how to set it up. I'm going to work on a 3d RPG game and I want to make the 2nd scene a character customization. I would like a GUI function that let's me scroll side ways to choose between several objects. This is where the problem appears. I don't know how to make a scroll GUI or a way to make a object pop up and the other object be destroyed. I absolutely hate asking for help but I need this to work...

Script should Include

1 scroll with 10 objects and a way to have this object to Cary through scenes and another script with 1 scroll with 10 scripts that will be added to the character but not all 10. Againg, I'm sorry for asking.for so much and I'm not one to all ways ask for help, and if u give me opinions then be ware that I need examples because I'm still teaching myself scripting, preferably make this in java, thank you so much and sorry...

Comment
Add comment · Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tanoshimi · Oct 18, 2014 at 05:27 AM 0
Share

You don't need to apologise for asking for help ;) However, it's generally a good idea to show what you've already tried. The GUI page of the manual has an example in UnityScript for a horizontal slider, so you can start with that. Read the value the slider is set to, and use that to show/hide (using renderer.enabled) the appropriate object in your scene.

avatar image Sethhalocat · Oct 18, 2014 at 05:30 AM 0
Share

To be honest, I'm scared of starting a script from blank. I have never done it before. I strongly appreciate the help and will rep port back when I'm finished testing it out if it dosnt work

avatar image tanoshimi · Oct 18, 2014 at 05:36 AM 1
Share
 a.) Right click in your Project window -> Create Javascript
 b.) Go to http://docs.unity3d.com/$$anonymous$$anual/gui-Controls.html and copy the section under the heading "HorizontalSlider"
 c.) Paste it into your blank script, save, and then drag the script onto an object in your scene
 d.) Play your game

Get that bit working first. Then edit it a little bit at a time to get to what you really want it to do. An array of gameobjects would be a good idea that you can call gameObject[i].renderer.enabled = true; depending on the value of the slider is one approach.

avatar image Sethhalocat · Oct 18, 2014 at 05:59 AM 0
Share

I did all that straight after my comment and just read that. var hair : GameObject; var hSliderValue : float = 0.0;

 function OnGUI () {
     if (hSliderValue) = 1;
     {
         Instantiate(hair, transform.position, transform.rotation);
     }
 }

It dosnt work

avatar image MrSoad · Oct 18, 2014 at 09:30 AM 0
Share

Hi Sethhalocat try this :

 function OnGUI () {
     if (hSliderValue == 1) {
         Instantiate(hair, transform.position, transform.rotation);
     }
 }

If you want to make a variable equal a value you use "=". If you want to check that a variables value equals something then you use "==". And put the whole of your compare statement in the ( ).

Hope that helps.

Show more comments

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

28 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Teleport to where I click 2D 2 Answers

How to import the object from server to unity 2 Answers

Setting Scroll View Width GUILayout 1 Answer

Can someone help me fix my Javascript for Flickering Light? 6 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges