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 LexGear · Mar 03, 2015 at 10:44 AM · javascriptguifunctionslider4.6

4.6 - Using new GUI with JavaScript functions

Hi Guys, I'm trying to use the new GUI system with 4.6 with a Javascript function. Only examples I can find online are C#

Is it even possible?

alt text

screen-shot-2015-03-03-at-203620.png (13.0 kB)
Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Rtyper · Mar 03, 2015 at 10:45 AM

It works just fine with JavaScript, just make sure your functions are marked as public and they should show up in that box.

Comment
Add comment · Show 6 · Share
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 LexGear · Mar 03, 2015 at 10:48 AM 0
Share

This is what I've tried. It's still not working. :-/

alt text

alt text

screen-shot-2015-03-03-at-204641.png (88.5 kB)
screen-shot-2015-03-03-at-204653.png (32.2 kB)
avatar image Mmmpies · Mar 03, 2015 at 10:57 AM 1
Share

You can only send 1 variable to the function. A cheat is to send a string value with a delimited text but you probavly just need to tell it which volume control is selected and have it increase with one button and decrease with the other.

avatar image Rtyper · Mar 03, 2015 at 11:00 AM 1
Share

$$anonymous$$mmpies is right, it can only accept a single parameter, and it can only be a string, int, float or object type.

avatar image LexGear · Mar 03, 2015 at 11:09 AM 0
Share

Yep, that was the issue. Thanks guys! So simple.

avatar image LexGear · Mar 03, 2015 at 11:53 AM 0
Share

Ok I'm stuck again. Why does it mean when it says "$$anonymous$$issing"?

alt text

screen-shot-2015-03-03-at-215301.png (13.6 kB)
Show more comments

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

21 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

Related Questions

If String is in List Then... 2 Answers

Setting Scroll View Width GUILayout 1 Answer

How do I use function OnGui to display a 2D texture? 1 Answer

Text wobbles as Content changes 2 Answers

How do i merge these things? 1 Answer


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