貝果
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# 試圖將所有Unity遊戲簡轉繁 RT ※不是所有遊戲都適用,目前只用過skul和節奏醫生成功,其他大多數遊戲都沒嘗試,因此本文僅供參考 # 步驟 ## 一般安裝 1. 確認遊戲使用Unity引擎。 2. 對遊戲安裝[XUnity.AutoTranslator](https://github.com/bbepis/XUnity.AutoTranslator),推薦使用ReiPatcher安裝。 3. 調整設定檔,修改檔案`{遊戲root}/AutoTranslator/Config.ini`套用以下設定: ```ini [General] Language=zh-TW FromLanguage=zh-CN ``` ## 缺失文字 1. 若遊戲中有部份文字缺失,則確認遊戲目錄下是否有`Unity.TextMeshPro.dll`,以Skul這款遊戲的情況位於`{遊戲root}/Managed/`目錄下。 2. 對遊戲主程式exe檔案`右鍵>內容>詳細資料`檢查檔案版本,確認是2018年以後的版本。 3. 若有找到TextMeshPro則代表問題是因為TextMeshPro找不到字型所致,以上兩個檢查都確認為真後,到[此處](https://github.com/bbepis/XUnity.AutoTranslator/issues/57#issuecomment-562344581)下載fonts.zip置於`{遊戲root}/`目錄下,並修改ini為 ```ini [Behaviour] OverrideFont=Microsoft JhengHei OverrideFontTextMeshPro=arialuni_sdf ``` ,若不為真則可能無法使用此方法。 ## 修改翻譯來源 參照[此處](https://github.com/bbepis/XUnity.AutoTranslator#implementing-a-translator)方法,製作dll檔,或是直接[點此下載](https://drive.google.com/file/d/16U8E2_plWVlVoY7Dj_jxv0sBpR9tM4R6/view?usp=sharing)後跳到步驟七放到指定資料夾 1. 從[releases](https://github.com/bbepis/XUnity.AutoTranslator/releases)下載並解壓縮`XUnity.AutoTranslator-Developer-{VERSION}.zip`,對應自己的XUnity.AutoTranslator版本。 2. 首先下載開啟Visual Studio2017,安裝時需要.NET套件(可能也要Unity,不確定)。 3. 開啟後點擊`檔案>新增>專案`,選擇`已安裝>Visual C#>.NET Standard`點選類別庫(.NET Standard)選項,輸入專案名後點確定,專案名最好和待會修改的cs文件內取的ID相同。 4. 找到專案目錄,修改csproj檔案,將`netstandardX.X`改為`net35`(可能要先下載 .NET Framework 3.5以上的SDK)。 5. 對專案點右鍵,`加入>參考`,選取步驟一Developer中的`XUnity.AutoTranslator-Developer-{VERSION}/Developer/XUnity.AutoTranslator.Plugin.Core.dll`。 6. 接著參考他給的範例修改cs文件,我的修改如下: ```C# using SimpleJSON; using System; using XUnity.AutoTranslator.Plugin.Core.Endpoints; using XUnity.AutoTranslator.Plugin.Core.Endpoints.Http; using XUnity.AutoTranslator.Plugin.Core.Utilities; using XUnity.AutoTranslator.Plugin.Core.Web; namespace zhConvert { internal class CustomTranslateEndpoint : HttpEndpoint { private static readonly string ServicePointTemplateUrl = "https://api.zhconvert.org/convert?converter=Taiwan&text={0}"; private string _friendlyName; public CustomTranslateEndpoint() { _friendlyName = "zhConvert(繁化姬)"; } public override string Id => "zhConvert"; public override string FriendlyName => _friendlyName; public override void Initialize(IInitializationContext context) { context.DisableCertificateChecksFor("api.zhconvert.org"); } public override void OnCreateRequest(IHttpRequestCreationContext context) { var request = new XUnityWebRequest( string.Format( ServicePointTemplateUrl, Uri.EscapeDataString(context.UntranslatedText))); context.Complete(request); } public override void OnExtractTranslation(IHttpTranslationExtractionContext context) { var data = context.Response.Data; var obj = JSON.Parse(data); var code = obj.AsObject["code"].ToString(); if (code != "0") context.Fail("Received bad response code: " + code); var token = obj.AsObject["data"]["text"].ToString(); var translation = JsonHelper.Unescape(token.Substring(1, token.Length - 2)); if (string.IsNullOrEmpty(translation)) context.Fail("Received no translation."); context.Complete(translation); } } } ``` 簡單來說就是透過繁化姬的API來達到用詞的簡繁轉換,依照網站提供的API來發送請求,並且解析回應取出翻譯後的文本。 7. 點擊`建置>建置方案`,並將`{專案root}/{專案名}/bin/Debug/net35/{專案名}.dll`放到遊戲資料夾內的Translators資料夾下,不同的安裝方式會有不同的路徑,以ReiPatcher安裝的話會在`{遊戲root}/Managed/Translators`。 8. 啟動遊戲後檢查有沒有出現自己設定的翻譯引擎,還有翻譯內容是否正確,遊戲中點alt+0可以叫出UI,可以確認各翻譯引擎翻出來的結果,若dll編寫失敗的話將滑鼠放在選擇翻譯引擎的介面中,灰掉的翻譯引擎上可以看見error log。 9. 在UI中把使用的翻譯引擎換成自己找的引擎,或是透過修改ini來達到同樣目的,此後都會使用這個引擎來修改,可以達成一般Google翻譯API無法達成的用語簡繁翻譯。 # 資料來源 * XUnity.AutoTranslator介紹:https://forum.gamer.com.tw/C.php?bsn=60599&snA=30521 * 自動翻譯主程式:https://github.com/bbepis/XUnity.AutoTranslator * 使用的簡轉繁線上翻譯API繁化姬:https://docs.zhconvert.org # 參考資料(解決問題) * [繁化姬API範例](https://api.zhconvert.org/convert?converter=Taiwan&text=内存不足!没法在视频聊天时播放视频。) * [尋找本電腦可用的非TextMeshPro一般字型](https://github.com/bbepis/XUnity.AutoTranslator/issues/27) * [創建.NET Standard 類別庫](https://docs.microsoft.com/zh-tw/dotnet/core/tutorials/library-with-visual-studio) * [HttpEndpoint class的範例](https://github.com/bbepis/XUnity.AutoTranslator/blob/master/src/Translators/CustomTranslate/CustomTranslateEndpoint.cs) * [C#字串分割](https://stackoverflow.com/questions/20928315/how-can-i-slice-a-string-in-c)

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully