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 Triqy · Jan 19, 2014 at 12:29 AM · c#classenum

Viewing Class variables in inspector?

Im not sure how to word this question so this is what i want...lol

in the inspector i want to be able to click the 'Audio' parameter and display the audio varibles in a drop down environment in the inspector.

Example (Inspector view):

  1. *Audio

(Click Audio parameter) - Shows

  • Music

  • SFX

  • Background Noise

  • List item

(Click SFX)

(SFX parameters here)

Im using c# for the code

Thanks.

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
0
Best Answer

Answer by Triqy · Jan 19, 2014 at 12:42 AM

Nevermind... this is the Answer. lol Every time i ask a question I solve it 10 Seconds later on my own.

 public class PlayerScript : MonoBehaviour {
     
     public List<AudioClass> Audio;
     //Audio
     [System.Serializable]
     public class AudioClass{
         
         public AudioClip[] SFX;
         public AudioClip[] Music;
         public AudioClip[] BackgroundNoise;
     }
 }
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 HappyMoo · Jan 19, 2014 at 01:27 AM 0
Share

Well... maybe next time you do those 10 seconds of researching before you post a question. Even most of the stuff you didn't answer yourself could have been googled or learned by going through the Learning $$anonymous$$odules

avatar image Triqy · Jan 19, 2014 at 01:51 AM 0
Share

I've been searching for it for hours...I then give up and ask a question and then 10 seconds later figure it out. It was simply an ironic view then something to take seriously. Here is another version on it without using the Lists parameter.

 public class PlayerScript : $$anonymous$$onoBehaviour {
     
     //Audio
     
     [System.Serializable]
     public class AudioClass{
         public string Name = Audio;
         public AudioClip[] SFX;
         public AudioClip[] $$anonymous$$usic;
         public AudioClip[] BackgroundNoise;
         public bool ButtonClickSound = false;
         public bool BackClickSound = false;
         
     }
     
     public AudioClass[] Audio;
 }
avatar image HappyMoo · Jan 19, 2014 at 02:04 AM 0
Share

You don't get what I mean. UA is swamped by trivial questions and code write requests by people who simply install Unity, click around for five $$anonymous$$utes and the go to ask their first question about how to implement their game.

Spending some time actually going through the learning material that is provided should be common courtesy, as should be to google or search your question here before asking it. Searching with your title on this site gives you multiple results answering your question on the first page.

avatar image Triqy · Jan 19, 2014 at 04:28 AM 0
Share

Ive been a remember on UA since 2011 and use it daily... and search though it daily.. so i don't think what your saying applies to me..lol thanks for the karma fall man. I appreciate it.

avatar image Triqy · Jan 19, 2014 at 04:44 AM 0
Share

I also think its funny on how you went through my profile and down voted a lot of my answers that people view and answer their own questions. lol seems counter intuitive if you ask me. I guess $$anonymous$$arma has found a way to me through the internet! lol

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

19 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

Related Questions

PropertyDrawer: Enum to select extended class 0 Answers

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Automatically create enum based on class children types? (C#) 1 Answer

Accessing Enumeration from another script issue 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