Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4 from Giresharu/3-2020333打卡源工程报错
Browse files Browse the repository at this point in the history
3 2020333打卡源工程报错
  • Loading branch information
Giresharu authored Jun 26, 2023
2 parents 307c4f4 + de1563c commit 69e0b3e
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 25 deletions.
10 changes: 8 additions & 2 deletions Assets/CHANGELOG-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@ TMPro-Player
===
[查看中文版本](./CHANGELOG.md)

[1.1.4](https://github.com/Giresharu/TMPro-Player/releases/1.1.4)
---

### Fixed
* Fixed various compatibility issues in Unity 2020.x version.

[1.1.3](https://github.com/Giresharu/TMPro-Player/releases/1.1.3)
---

### 修复
### Fixed
* Fixed the issue of incorrectly merge-optimizing of nested or interleaved paired tags.

[1.1.2](https://github.com/Giresharu/TMPro-Player/releases/1.1.2)
---

### 修复
### Fixed
* I made a silly mistake, accidentally typed an extra character. It's fixed now.

[1.1.1](https://github.com/Giresharu/TMPro-Player/releases/1.1.1)
Expand Down
6 changes: 6 additions & 0 deletions Assets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ TMPro-Player
===
[View in English](./CHANGELOG-en.md)

[1.1.4](https://github.com/Giresharu/TMPro-Player/releases/1.1.4)
---

### 修复
* 修复了在 unity 2020.x 版本中的各种不兼容问题

[1.1.3](https://github.com/Giresharu/TMPro-Player/releases/1.1.3)
---

Expand Down
6 changes: 3 additions & 3 deletions Assets/README-en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![LOGO](./logo.png)
===
[![Releases](https://img.shields.io/github/v/release/Giresharu/TMPro-Player.svg)](https://github.com/Giresharu/TMPro-Player/releases/latest) [![openupm](https://img.shields.io/npm/v/com.gsr.tmproplayer?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.gsr.tmproplayer/) [![LICENSE](https://img.shields.io/github/license/Giresharu/TMPro-Player)](./LICENSE.md) ![Unity](https://img.shields.io/badge/Unity%20Supported-2020.1%2B-ff69b4.svg)
[![Releases](https://img.shields.io/github/v/release/Giresharu/TMPro-Player?logo=github)](https://github.com/Giresharu/TMPro-Player/releases/latest) [![openupm](https://img.shields.io/npm/v/com.gsr.tmproplayer?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.gsr.tmproplayer/) [![LICENSE](https://img.shields.io/github/license/Giresharu/TMPro-Player)](./LICENSE.md) ![Unity](https://img.shields.io/badge/Unity%20Supported-2020.1%2B-ff69b4.svg?logo=unity) [![bilibili](https://img.shields.io/badge/bilibili-Overview_Video(in_Chinese)-FE7398?logo=bilibili&logoColor=white)](https://www.bilibili.com/video/BV1mV4y117jG/)

[查看中文版](./README.md)

Expand Down Expand Up @@ -60,7 +60,7 @@ In your project's root directory, use the following command:
# Install the latest version
openupm add com.gsr.tmproplayer
# Install a specific version
openupm add [email protected].3
openupm add [email protected].4
```
If you are using a modified version of `com.unity.textmeshpro` and it is not recognized as a dependency, please use the following command to install:

Expand All @@ -73,7 +73,7 @@ openupm add com.gsr.tmproplayer -f
In the Unity engine, open the `Package Manager` and click on the `+` button in the top left corner. Choose `Add package from git URL` and enter the git URL of this project:

```shell
https://github.com/Giresharu/TMPro-Player.git?path=Assets#1.1.3
https://github.com/Giresharu/TMPro-Player.git?path=Assets#1.1.4
```
It is recommended to specify the version number when installing via Git URL to avoid automatically updating to the latest repository instead of the latest version. This ensures that you install a stable repository.

Expand Down
7 changes: 4 additions & 3 deletions Assets/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
![LOGO](./logo.png)
===
[![Releases](https://img.shields.io/github/v/release/Giresharu/TMPro-Player.svg)](https://github.com/Giresharu/TMPro-Player/releases/latest) [![openupm](https://img.shields.io/npm/v/com.gsr.tmproplayer?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.gsr.tmproplayer/) [![LICENSE](https://img.shields.io/github/license/Giresharu/TMPro-Player)](./LICENSE.md) ![Unity](https://img.shields.io/badge/Unity%20Supported-2020.1%2B-ff69b4.svg)

[![Releases](https://img.shields.io/github/v/release/Giresharu/TMPro-Player?logo=github)](https://github.com/Giresharu/TMPro-Player/releases/latest) [![openupm](https://img.shields.io/npm/v/com.gsr.tmproplayer?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.gsr.tmproplayer/) [![LICENSE](https://img.shields.io/github/license/Giresharu/TMPro-Player)](./LICENSE.md) ![Unity](https://img.shields.io/badge/Unity%20Supported-2020.1%2B-ff69b4.svg?logo=unity) [![bilibili](https://img.shields.io/badge/bilibili-介绍视频-FE7398?logo=bilibili&logoColor=white)](https://www.bilibili.com/video/BV1mV4y117jG/)

[View in English](./README-en.md)

Expand Down Expand Up @@ -58,7 +59,7 @@ TMPro Player 是一款基于 TextMeshPro 的富文本标签管理插件,实现
# 安装最新版本
openupm add com.gsr.tmproplayer
# 安装指定版本
openupm add [email protected].3
openupm add [email protected].4
```
如果你使用了魔改的 `com.unity.textmeshpro` ,并且无法正确被识别为依赖时,请使用如下命令安装:

Expand All @@ -71,7 +72,7 @@ openupm add com.gsr.tmproplayer -f
在 Unity 引擎中,打开 `Package Manager` ,点击左上角的 `+` ,选择 `Add package from git URL` ,然后输入本项目的 git 地址即可:

```shell
https://github.com/Giresharu/TMPro-Player.git?path=Assets#1.1.3
https://github.com/Giresharu/TMPro-Player.git?path=Assets#1.1.4
```
建议使用 git URL 安装时指定版本号,否则会默认更新为最新仓库,而非最新版本。有可能会安装不稳定的仓库。

Expand Down
3 changes: 1 addition & 2 deletions Assets/Runtime/TMPPlayerRichTagManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
using UnityEngine;

namespace TMPPlayer {

[Icon("Packages/com.gsr.tmproplayer/Icons/manager.png")]

public class TMPPlayerRichTagManager : MonoBehaviour {

static TMPPlayerRichTagManager instance;
Expand Down
10 changes: 9 additions & 1 deletion Assets/Runtime/TMPPlayerRichTagManager.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions Assets/Runtime/TMProPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace TMPPlayer {

[RequireComponent(typeof(TMP_Text))][Icon("Packages/com.gsr.tmproplayer/Icons/player.png")]
[RequireComponent(typeof(TMP_Text))]
public class TMProPlayer : MonoBehaviour {

public bool isTypeWriter = true;
Expand Down Expand Up @@ -194,7 +194,8 @@ public void SetText(string text, bool isAdditive = false, bool newline = false)
/// </summary>
/// <param name="invokeSingleActions"> 是否需要执行跳过的文字中的单个标签 </param>
public void Skip(bool invokeSingleActions = true) {
if (typeWriterTokenSource is not { IsCancellationRequested: false }) return;
if (typeWriterTokenSource == null || typeWriterTokenSource.IsCancellationRequested) return;
// if (typeWriterTokenSource is not { IsCancellationRequested: false }) return;

typeWriterTokenSource.Cancel();
typeWriterTokenSource.Dispose();
Expand Down Expand Up @@ -346,7 +347,7 @@ void ShowText(bool isAdditive = false) {
lastInvokeIndex = TextMeshPro.text.Length - 1;
// AddUpdateFlags(TMP_VertexDataUpdateFlags.Colors32);
}

// 触发成对 Action
foreach (var tuple in pairedActions.Keys)
tuple.actionInfo.Invoke(this, actionTokenSource.Token, pairedActions[tuple], tuple.value);
Expand Down Expand Up @@ -497,7 +498,9 @@ IEnumerator TypeWriter(CancellationToken token) {
Stack<int> temp = new Stack<int>();

while (true) {
if (!tagIndices.TryPop(out int i)) break;
if (tagIndices.Count <= 0) break;
int i = tagIndices.Pop();
// if (!tagIndices.TryPop(out int i)) break;

RichTagInfo richTagInfo = textTags[i];

Expand Down
2 changes: 1 addition & 1 deletion Assets/Runtime/TMProPlayer.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.gsr.tmproplayer",
"displayName": "TMPro Player",
"version": "1.1.3",
"version": "1.1.4",
"unity": "2020.1",
"description": "基于 TextMeshPro 的自定义富文本标签插件\nCustom Rich Text Tag Plugin Based on TextMeshPro",
"keywords": [
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@ TMPro-Player
===
[查看中文版本](./CHANGELOG.md)

[1.1.4](https://github.com/Giresharu/TMPro-Player/releases/1.1.4)
---

### Fixed
* Fixed various compatibility issues in Unity 2020.x version.

[1.1.3](https://github.com/Giresharu/TMPro-Player/releases/1.1.3)
---

### 修复
### Fixed
* Fixed the issue of incorrectly merge-optimizing of nested or interleaved paired tags.

[1.1.2](https://github.com/Giresharu/TMPro-Player/releases/1.1.2)
---

### 修复
### Fixed
* I made a silly mistake, accidentally typed an extra character. It's fixed now.

[1.1.1](https://github.com/Giresharu/TMPro-Player/releases/1.1.1)
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ TMPro-Player
===
[View in English](./CHANGELOG-en.md)

[1.1.4](https://github.com/Giresharu/TMPro-Player/releases/1.1.4)
---

### 修复
* 修复了在 unity 2020.x 版本中的各种不兼容问题

[1.1.3](https://github.com/Giresharu/TMPro-Player/releases/1.1.3)
---

Expand Down
6 changes: 3 additions & 3 deletions README-en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![LOGO](./Assets/logo.png)
===
[![Releases](https://img.shields.io/github/v/release/Giresharu/TMPro-Player.svg)](https://github.com/Giresharu/TMPro-Player/releases/latest) [![openupm](https://img.shields.io/npm/v/com.gsr.tmproplayer?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.gsr.tmproplayer/) [![LICENSE](https://img.shields.io/github/license/Giresharu/TMPro-Player)](./LICENSE.md) ![Unity](https://img.shields.io/badge/Unity%20Supported-2020.1%2B-ff69b4.svg)
[![Releases](https://img.shields.io/github/v/release/Giresharu/TMPro-Player?logo=github)](https://github.com/Giresharu/TMPro-Player/releases/latest) [![openupm](https://img.shields.io/npm/v/com.gsr.tmproplayer?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.gsr.tmproplayer/) [![LICENSE](https://img.shields.io/github/license/Giresharu/TMPro-Player)](./LICENSE.md) ![Unity](https://img.shields.io/badge/Unity%20Supported-2020.1%2B-ff69b4.svg?logo=unity) [![bilibili](https://img.shields.io/badge/bilibili-Overview_Video(in_Chinese)-FE7398?logo=bilibili&logoColor=white)](https://www.bilibili.com/video/BV1mV4y117jG/)

[查看中文版](./README.md)

Expand Down Expand Up @@ -60,7 +60,7 @@ In your project's root directory, use the following command:
# Install the latest version
openupm add com.gsr.tmproplayer
# Install a specific version
openupm add [email protected].3
openupm add [email protected].4
```
If you are using a modified version of `com.unity.textmeshpro` and it is not recognized as a dependency, please use the following command to install:

Expand All @@ -73,7 +73,7 @@ openupm add com.gsr.tmproplayer -f
In the Unity engine, open the `Package Manager` and click on the `+` button in the top left corner. Choose `Add package from git URL` and enter the git URL of this project:

```shell
https://github.com/Giresharu/TMPro-Player.git?path=Assets#1.1.3
https://github.com/Giresharu/TMPro-Player.git?path=Assets#1.1.4
```
It is recommended to specify the version number when installing via Git URL to avoid automatically updating to the latest repository instead of the latest version. This ensures that you install a stable repository.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![LOGO](./Assets/logo.png)
===
[![Releases](https://img.shields.io/github/v/release/Giresharu/TMPro-Player.svg)](https://github.com/Giresharu/TMPro-Player/releases/latest) [![openupm](https://img.shields.io/npm/v/com.gsr.tmproplayer?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.gsr.tmproplayer/) [![LICENSE](https://img.shields.io/github/license/Giresharu/TMPro-Player)](./LICENSE.md) ![Unity](https://img.shields.io/badge/Unity%20Supported-2020.1%2B-ff69b4.svg)
[![Releases](https://img.shields.io/github/v/release/Giresharu/TMPro-Player?logo=github)](https://github.com/Giresharu/TMPro-Player/releases/latest) [![openupm](https://img.shields.io/npm/v/com.gsr.tmproplayer?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.gsr.tmproplayer/) [![LICENSE](https://img.shields.io/github/license/Giresharu/TMPro-Player)](./LICENSE.md) ![Unity](https://img.shields.io/badge/Unity%20Supported-2020.1%2B-ff69b4.svg?logo=unity) [![bilibili](https://img.shields.io/badge/bilibili-介绍视频-FE7398?logo=bilibili&logoColor=white)](https://www.bilibili.com/video/BV1mV4y117jG/)

[View in English](./README-en.md)

Expand Down Expand Up @@ -58,7 +58,7 @@ TMPro Player 是一款基于 TextMeshPro 的富文本标签管理插件,实现
# 安装最新版本
openupm add com.gsr.tmproplayer
# 安装指定版本
openupm add [email protected].3
openupm add [email protected].4
```
如果你使用了魔改的 `com.unity.textmeshpro` ,并且无法正确被识别为依赖时,请使用如下命令安装:

Expand All @@ -71,7 +71,7 @@ openupm add com.gsr.tmproplayer -f
在 Unity 引擎中,打开 `Package Manager` ,点击左上角的 `+` ,选择 `Add package from git URL` ,然后输入本项目的 git 地址即可:

```shell
https://github.com/Giresharu/TMPro-Player.git?path=Assets#1.1.3
https://github.com/Giresharu/TMPro-Player.git?path=Assets#1.1.4
```
建议使用 git URL 安装时指定版本号,否则会默认更新为最新仓库,而非最新版本。有可能会安装不稳定的仓库。

Expand Down

0 comments on commit 69e0b3e

Please sign in to comment.