Skip to content

Instantly share code, notes, and snippets.

@dev-chee
Created November 20, 2019 03:51
Show Gist options
  • Save dev-chee/584157a12aa53f9db4eaf532c4865ee0 to your computer and use it in GitHub Desktop.
Save dev-chee/584157a12aa53f9db4eaf532c4865ee0 to your computer and use it in GitHub Desktop.
Update level music assets.

修改场景音乐

  1. 在Music.xls配置对应的音乐资源名称(注意,不含路径和扩展名)
  2. 在Levels.xls中关联对应的音乐ID到场景
  3. 如果音乐资源文件路径与扩展名已经更改,请修改如下代码
   // File: Assets/GamePlay/Basic/AssetUtility.cs

   public static string GetMusicAsset(string assetName)
   {
       string path;
       if (_musicPaths.TryGetValue(assetName, out path))
           return path;

       // FIXME: 修改这个格式化字符串
       return string.Format("Assets/_RS2Art/Res/Base/Music/{0}.mp3", assetName);
   }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment