Is there any tutorial how to add custom music to stereo , because i cant figure it out
Hey @Helpmelol2,
What have you already tried doing?
Assuming you’ve already set up your Unity project and master bundle:
- Inside your master bundle, create a folder for your custom stereo songs. E.g.,
Music
. - Add your song.
- For example,
Washington_Loop.ogg
orUnturned_Theme.mp3
.
- For example,
- Export your master bundle.
Then in your mod folders:
- Create an asset file for your stereo song.
- For example,
Unturned_Theme.asset
orWashington.asset
.
- For example,
- Configure your asset.
Here’s a vanilla example:
"Metadata"
{
"GUID" "0308984e8257465187dde707cac0fbe1"
"Type" "SDG.Unturned.StereoSongAsset, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
}
"Asset"
{
"Song"
{
"MasterBundle" "core.masterbundle"
"AssetPath" "Music/Washington_Loop.ogg"
}
"Link_URL" "https://www.youtube.com/watch?v=Dahxcuufnn8"
"Is_Loop" "true"
}
hey soo the link url is needed for this to work? like i did all of this without link url, i can see the songs in radio but cant play them
in some tutorials its said that its optional
Link_URL is optional (also mentioned in the official documentation I’ve linked)!
If you can see your song in the stereo, then the issue might be with your Unity setup. Alternatively, you may want to double-check your AssetPath. This should be 1:1 with its path in your masterbundle.
hmm i will check thanks
like i did it with youtube tutorial which said to get the sound quality (?) below 30 to make the file 2 mb then got the bundle tool checked all the songs i wanted dclicked export each one into diffrent folder and then made the other files
"Metadata"
{
"GUID" "30e4666de39d4897ba119e72e7355f32"
"Type" "SDG.Unturned.StereoSongAsset, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
}
"Asset"
{
"ID" "65022"
"Title" "Axemo lalalal"
"Song"
{
"MasterBundle" "axemo.masterbundle"
"AssetPath" "Music/Axemo - Stop With It (La La La La).mp3"
}
}
thats how the asset file looks
Asset_Bundle_Name axemo.masterbundle
// Path to the asset bundle within Unity.
// Unity subfolders should match 1:1 with dat subfolders.
Asset_Prefix Assets/CoreMasterBundle
// Version 2 is Unity 2017 LTS.
// Version 3 is Unity 2018 and 2019 LTS. Older versions have shader consolidation enabled for backwards compatibility.
// Version 4 is Unity 2020 LTS. 2019 did not need its own version but it is unfortunate they cannot be distinguished, so 2020 gets a new version.
// Version 5 is Unity 2021 LTS.
Asset_Bundle_Version 5
this is the master bundle
i think everything is right
To clarify – did you place your custom, modded items in a folder named “CoreMasterBundle”? What do you see when you open your masterbundle’s .manifest
file in a text editor?
ManifestFileVersion: 0
CRC: 668658578
Hashes:
AssetFileHash:
serializedVersion: 2
Hash: 600c9a5d8c1799f26aed47b278aa4f4a
TypeTreeHash:
serializedVersion: 2
Hash: 9a2ca7bdbd1871f7131daf57de908e0c
HashAppended: 0
ClassTypes:
- Class: 83
Script: {instanceID: 0}
SerializeReferenceClassIdentifiers:
Assets: - Assets/Axemo/Axemo - Stop With It (La La La La).mp3
Dependencies:
uuum theres only this
It looks like you’ve configured your AssetPrefix wrong (in the MasterBundle file) and your AssetPath wrong (in your Stereo Song file).
Your file paths need to be 1:1 between Unity, your mod’s folder, and any game files referencing file paths.
For example, you could change your file path in Unity to be Assets/Axemo/Music
, and then change your MasterBundle file’s Asset_Prefix to Assets/Axemo
.
thanks i will try change it
Okay i did it and it works thanks