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
1
Question by BroVodo · Apr 21, 2015 at 02:45 PM · uisliderassign-variable

I can't assign new UI sliders to variable slots in 4.6.2f1

I need to assign 2 sliders to variable slots to control them by script. I want to get the current volume of sound and music and set the position of the slider accordingly. I have done this successfully before.

The problem is that when I drag and drop the sliders to the variable slots (that are exposed in the component script ) they don't assign.

I have made a new scene in the same project and the assignment still doesn't work.

I have made a new project and everything works as it should. I can drag and drop to assign in a clean project.

Other UI and components assign/work fine. It's just the sliders and just in this project, regardless of the script that they are in.

Previous sliders are still assigned, But no sliders are showing up in the browser that appears when you click on the dotInsideCircle to the right of "None (Slider)".

alt text

sliderserror.jpg (74.4 kB)
Comment
Add comment · Show 3
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 DwaynePritchett · Apr 22, 2015 at 02:37 AM 1
Share

I wonder if you should make a public GameObject variable, and drag and drop the Slider Object onto it. Then, take the slider "component" of it. Can't remember, it's been awhile since I was on Unity. Just a thought since no one has helped you yet.

avatar image BroVodo · Apr 22, 2015 at 04:05 AM 0
Share

Thank you for the suggestion, I will give that a try. I was considering GameObject.Find, but this is a better solution.

avatar image BroVodo · Apr 23, 2015 at 07:56 AM 0
Share
 _musicVolumeSlider = _musicVolumeSliderGO.GetComponent< Slider >();

isn't working either. Unity considers this project devoid of sliders.

Also updating to 4.6.4f1 didn't solve problem.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by dantheman272 · Aug 24, 2016 at 10:07 AM

I was having this problem in Unity 5.4.0f3, and in case anyone is looking for a solution and comes across this (or if you are still having this problem) I had to rename one of my scripts. If you have a "Slider" script, Unity will use that instead of the UnityEngine.UI. My Slider script happened to contain definitions for many of the same things as the UnityEngine.UI (for sliders at least) so it took me quite a while to figure it out. Anyway, best of luck, hope you have solved this before now.

Comment
Add comment · Show 1 · 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 BroVodo · Aug 25, 2016 at 09:24 AM 0
Share

Thanks for the reply, it's been so long I can't remember what I did, or what I was working on! So I won't be able to pick the correct answer between you and Zen_Hap, giving you both a bit of Rep ins$$anonymous$$d.

avatar image
1

Answer by Zen_Hap · Aug 24, 2016 at 10:54 AM

Select the slider and scroll down to the Events section, ten drag the music object in and select Audio.Volume. Done!

Also, I just finished updating my game, (also made in Unity!) Buzzle! It is an Endless Bouncer/Runner arcade style game and I hope you like it! Be sure to download and play it for free! Link: www.gamejolt.com/games/buzzle/138631

Comment
Add comment · Show 2 · 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 BroVodo · Aug 25, 2016 at 09:22 AM 0
Share

Thanks for the reply, it's been so long I can't remember what I did, or what I was working on! I will check out your game.

avatar image Zen_Hap BroVodo · Oct 19, 2016 at 04:37 AM 0
Share

Thanks! :)

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

2D slider (UI 4.6) for color picker (world space) 0 Answers

Create a slider which refers to a value in another script 2 Answers

HIdden cursor slider issue 1 Answer

Updating UI Slider through another script 1 Answer

4.6 UI Player Movement with Slider. 0 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