This repository has been archived on 2025-06-25. You can view files and clone it, but cannot push or open issues or pull requests.
2025-02-28 14:05:40 +08:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using BITKit;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class TextReplace : MonoBehaviour
|
|
|
|
{
|
|
|
|
[SerializeField] private TextAsset chs;
|
|
|
|
[SerializeField] private TextAsset jap;
|
|
|
|
|
|
|
|
[SerializeField] private string result;
|
|
|
|
|
|
|
|
|
|
|
|
[BIT]
|
|
|
|
public void Replace()
|
|
|
|
{
|
|
|
|
result = string.Empty;
|
|
|
|
|
|
|
|
foreach (var c in jap.text)
|
|
|
|
{
|
|
|
|
if (chs.text.Contains(c))continue;
|
|
|
|
result += c;
|
|
|
|
}
|
2025-02-28 15:03:29 +08:00
|
|
|
|
|
|
|
Debug.Log($"JAP Source Length:{jap.text.Length},after replace:{result.Length}");
|
2025-02-28 14:05:40 +08:00
|
|
|
}
|
|
|
|
}
|