• 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 /
  • Help Room /
avatar image
0
Question by ColdDrip · Sep 15, 2016 at 01:19 PM · filebrowsercustomization

Questions about file Browser and user assigning file to an object

Hi, I'm building a virtual midi controller with unity. I'm looking into a way for user to change the sound of each individual key either by choosing the sound library int he unity folder or any sound files from their directory.

Is this possible?

I've been looking for tutorials on file browsers and such customiseability, but could not find any. And I'm not really experienced in coding or C# in this matter to come up with my own code :(.

Can anyone help point me to the right direction? What kind of functions I'm looking for, where should I look, what do I need to read?

Comment
Add comment · Show 2
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 Landern · Sep 15, 2016 at 01:21 PM 1
Share

Out of the box, @Eric5h5 had a nice little browser asset for ~$10 you can pick up that takes are of the need to do it yourself, though mobile would be a concern given restrictions on some of the platforms. Take a look, https://starscenesoftware.com/unifilebrowser.html

There are some free ones on the assets store as well, this could be a good starting point if you want to customize from that standpoint: https://www.assetstore.unity3d.com/en/#!/content/18308

avatar image ColdDrip Landern · Sep 21, 2016 at 12:04 AM 0
Share

thank you, I'll look into that. but buying is my last resort right now.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by toddisarockstar · Sep 15, 2016 at 09:10 PM

landern made a good comment about finding a plug in that might make things easier for you. But Unity does do about everything you want with reading and writing files if you want to code it yourself.

       import System;
      import System.IO;
      import System.Diagnostics;
      
      var bt:byte[];
 
 var dir="C:/WhateverFolderOnTheUsersCdrive";     
 
 var info2 = new DirectoryInfo(dir);
        var files2=info2.GetFiles();
        
      
        for(file567 in files2){
       print("i see: "+file567.FullName);
        if(file567.Name.Contains(".mp3"){
        print("i found an mp3 file");
        bt=File.ReadAllBytes(file567.FullName);
        
        }}

  this sort of thing only works on standalone builds

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 ColdDrip · Sep 21, 2016 at 12:05 AM 0
Share

Thank you, I'll try this code. I am currently learning unity and doing a project for school work. That's why plug ins is my last resort.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

69 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 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 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

WebGL browser error after run and built Unity+ARToolkit project 0 Answers

Hi ,I'd like to know , is there a tool that is available that will allow for a player in game to create their own character just like in Sims4 the game ? 0 Answers

problem with dff importer script 1 Answer

Itween downloaded as a .tar file 0 Answers

How do I add all images from a folder like "C:\Users\User\Desktop" to a sprite array?? 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