Add Your Own Music to Daggerfall Unity
- EpicSpellsword404
- Posts: 50
- Joined: Mon Sep 21, 2015 12:26 am
Add Your Own Music to Daggerfall Unity
https://drive.google.com/open?id=0Bx8-- ... nhHakN6czg
Just put the script in your assets folder, attach it to an audiosource, and add the songs. Hope you like it. I highly recommend doing this with Dan Goondale's remixes.
Edit: This link will always be up to date.
Just put the script in your assets folder, attach it to an audiosource, and add the songs. Hope you like it. I highly recommend doing this with Dan Goondale's remixes.
Edit: This link will always be up to date.
Last edited by EpicSpellsword404 on Sat May 14, 2016 7:25 pm, edited 3 times in total.
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Add Your Own Music to Daggerfall Unity
nice! it is replacing the original music or extending?
- LypyL
- Posts: 512
- Joined: Sun Mar 22, 2015 3:48 am
Re: Add Your Own Music to Daggerfall Unity
very cool! Keep working on it, and soon we could import music from outside the project!
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Add Your Own Music to Daggerfall Unity
Great work! At some point we should collaborate to allow users to replace their default MIDI songs from an external source (same concept as texture replacements).
BTW, I love Dan Goodale's remixes as well.
BTW, I love Dan Goodale's remixes as well.
- EpicSpellsword404
- Posts: 50
- Joined: Mon Sep 21, 2015 12:26 am
Re: Add Your Own Music to Daggerfall Unity
I'm not much of a scripter, I just replaced DaggerfallSongPlayer with AudioSource and sort of bludgeoned the errors to death. I probably won't add any more functionality to this. Thanks anyway.
- EpicSpellsword404
- Posts: 50
- Joined: Mon Sep 21, 2015 12:26 am
Re: Add Your Own Music to Daggerfall Unity
Okay, I decided to keep working on this. I've been trying to add the ablility to load music from the resources folder so that you could potentially add music without editing any scenes. The problem is I'm using Resources.LoadAll() to load the files, but when I try to cast the array to an AudioClip[], it gives me an invalid cast exception. Removing the cast didn't work either. Does anybody know of a solution?
Code: Select all
CityDaySongs = (AudioClip[]) Resources.LoadAll ("Music/CityDaySongs");
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Add Your Own Music to Daggerfall Unity
I'm not in a position to test right now, but try something like:
Use debugger to check that clips is actually populated (non-null, non-zero) and go from there. Let me know how you go, and I'll help if I can.
Code: Select all
AudioClip[] clips = Resources.LoadAll<AudioClip>(path);
- EpicSpellsword404
- Posts: 50
- Joined: Mon Sep 21, 2015 12:26 am
Re: Add Your Own Music to Daggerfall Unity
Thanks a lot for the help! I appreciate it.
Alright, here it is! Just make the appropriate folders in Assets/Resources, put the music files in, and send your ears to heaven!
(weird metaphor )
https://drive.google.com/file/d/0Bx8--6 ... sp=sharing
Edit: Updated Link
Alright, here it is! Just make the appropriate folders in Assets/Resources, put the music files in, and send your ears to heaven!
(weird metaphor )
https://drive.google.com/file/d/0Bx8--6 ... sp=sharing
Edit: Updated Link
Last edited by EpicSpellsword404 on Sun May 08, 2016 11:02 pm, edited 3 times in total.
- LypyL
- Posts: 512
- Joined: Sun Mar 22, 2015 3:48 am
Re: Add Your Own Music to Daggerfall Unity
Nice! You might want to include a comment with the instructions about making the folders (it might not be obvious what you're talking about).
You should keep going and make it so it can load music files from the disk
You should keep going and make it so it can load music files from the disk
- EpicSpellsword404
- Posts: 50
- Joined: Mon Sep 21, 2015 12:26 am
Re: Add Your Own Music to Daggerfall Unity
Adding comment asap. What exactly do you mean by from the disk?
Edit: Link is now up to date with rudimentary readme file.
*fanfare*
Edit: Link is now up to date with rudimentary readme file.
*fanfare*