Skip to main content

Play Any Song In Your Game Using Unity Plugin

So you want to create games in which user can listen to his own playlist of songs while playing the game.Here's a plugin that you might be interested in.



I have recently created a unity plugin to select a song from your android phone and then you can play it inside your game.Once a song is selected then it will randomly select another song from the playlist once it is finished.

Steps you need to follow
1) Import the plugin inside unity
2) Drag and drop the soundpicker prefab inside your scene.
3) Create a button to select a song.
4) Create a script and write two methods to play and stop your song like this.


5) Don't forget to import the SongSelectorDLL in your script;
6) Its done!

Now let users enjoy their own playlist while playing their favorite games. 

Download Plugin

Comments

  1. Hi Nishant,

    I need some help regarding the plugin that you developed for selecting a music from user device. Please let me know if you can help me. You can email me at noobunity100@gmail.com

    Thanks

    ReplyDelete

Post a Comment

Popular posts from this blog

Create Unity Custom Editor - Basics (Part 5)

In this lesson we will create some layout for our custom inspector to have a better control on the layout of our inspector window We will start with EdiorGUILayout Class In our code write After clicking save when we go back to unity we will see all our GUI elements in a single horizontal line. This is not what we want. So to fix this we add our GUI elements inside BeginVertical and EndVertical Layout. Now our Code will look like this Clicking on save we will notice our layout gets change back to vertical and all the GUI elements get stacked on top of each other One more feature that these layout allow us is adjusting the space between GUI elements In our code we will add In the horizontal layout we add GUILayout.Space(10)  to add 10px space on both ends of the horizontal layout Now we can go further and add space between our GUI elements by adding  GUILayout.Space(10) between our GUI elements In our code we will add Since we are in a Ve...

Eyes detection using Python and OpenCV

In my last post i've worked on detecting the face. In progress to that, i am able to detect eyes as well. Its pretty simple as of now. Here is the result Before After So as you can see it starts detecting eyes as well. I am making a little progress now but, still a lot to learn.  I am super excited to work towards my goal. * The image has been taken from google images and is used only for testing purpose.

Create Unity Custom Editor - Basics (Part 4)

In the last lesson we linked our custom editor script with our test script. In this lesson we are going to create some custom GUI elements. So lets get started with that 1) Jump to the Editor Script and comment out the DrawDefaultInspector() so that we can start adding our own custom elements Lets get started with introducing some GUI elements that we can create inside the inspector The most basic one is a label 2) We will be using EditorGUILayout class to show our label inside the inspector. This class has got tons of other types of functions which you can use Goto this link and checkout the other functions available inside the EditorGUILayout class. I would recommend to spend sometime on those functions provided and try to implement all of those so that you can get an idea of how you can use different GUI elements to represent custom inspectors. 3) Now when we go back to unity we will see a label showing inside our inspector. Now this concludes that ...