浏览代码

update

/main
siyao 4 年前
当前提交
2c8e50f7
共有 5 个文件被更改,包括 27 次插入17 次删除
  1. 15
      Assets/HuaweiService/Editor/AfterBuildToDo.cs
  2. 7
      Assets/HuaweiService/Android/res/Auth/strings.txt
  3. 7
      Assets/HuaweiService/Android/res/Auth/strings.txt.meta
  4. 8
      Assets/HuaweiService/Android/res/Auth/strings.xml
  5. 7
      Assets/HuaweiService/Android/res/Auth/strings.xml.meta

15
Assets/HuaweiService/Editor/AfterBuildToDo.cs


{
Directory.CreateDirectory(basePath);
}
string sourceFilePath = Application.dataPath + "/HuaweiService/Android/res/Auth/strings.xml";
string sourceFilePath = Application.dataPath + "/HuaweiService/Android/res/Auth/strings.txt";
File.Copy(sourceFilePath,codePath,true);
if (File.Exists(codePath))
{
string stringsFile = File.ReadAllText(codePath);
string appendContent = File.ReadAllText(sourceFilePath);
stringsFile = stringsFile.Replace("</resources>", appendContent);
File.WriteAllText(codePath, stringsFile);
}
else
{
string appendContent = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"+"\r\n"+"<resources>"+"\r\n" +File.ReadAllText(sourceFilePath);
File.WriteAllText(codePath, appendContent);
}
}
}

7
Assets/HuaweiService/Android/res/Auth/strings.txt


<string name="google_game_app_id">Replace me</string>
<string name="facebook_app_id">Replace me</string>
<string name="fb_login_protocol_scheme">Replace me</string>
<string name="tecent_app_id">Replace me</string>
</resources>

7
Assets/HuaweiService/Android/res/Auth/strings.txt.meta


fileFormatVersion: 2
guid: fc1d8b78835a04c1899d9c333d7e3d75
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/HuaweiService/Android/res/Auth/strings.xml


<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="google_game_app_id">Replace me</string>
<string name="facebook_app_id">Replace me</string>
<string name="fb_login_protocol_scheme">Replace me</string>
<string name="tecent_app_id">Replace me</string>
</resources>

7
Assets/HuaweiService/Android/res/Auth/strings.xml.meta


fileFormatVersion: 2
guid: 4bd0293cc87d0461c9b7c19039817a34
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存