# 在检视器中创建效果

在 Text Animator 中，除了内置可直接使用的效果外，你还可以创建你自己的 **直接从检查器中**，无需编写任何脚本。

{% hint style="info" %}
附言：如果你想改为通过 C# 编写自定义效果，请查看 [编写自定义效果（C#）](/text-animator-unity/2.x-zh/xiao-guo/chuang-jian-ni-zi-ji-de-xiao-guo/bian-xie-zi-ding-yi-xiao-guo-c.md)
{% endhint %}

创建新的 Effect ScriptableObject 时，你可以在 Project 视图中前往“Special”部分 -> Create -> Text Animator -> Special Effects。

<img src="/files/92947f1779bfbcefa98384481417509067150b46" alt="" width="600">

这些效果允许你创建已存在效果的自定义组合，或从头开始创建你自己的效果。

{% hint style="warning" %}
要使用某个效果，请记得将其添加到数据库并在 TextAnimator 组件中引用，如此处所述 [数据库](/text-animator-unity/2.x-zh/xiao-guo/wei-ni-de-wen-ben-tian-jia-xiao-guo/shu-ju-ku.md)
{% endhint %}

## 常用模块

检查器效果可能具有一些 “模块”[^1] 通用的，让你以不同方式控制动画。

### 时间模式 <a href="#modules" id="modules"></a>

在某些效果的 Scriptable Object 中，你可能会看到一个“时间模式”部分/模块。

一个 **时间模式** 处理效果随时间（和字符）如何对字母进行动画，包括速度和字符延迟。

<img src="/files/f112986545d081338c60e84919d9c0991083c7aa" alt="" width="600">

<table><thead><tr><th width="185">字段名称</th><th>说明</th></tr></thead><tbody><tr><td><strong>开始延迟</strong></td><td>在开始整个效果动画之前等待的时间</td></tr><tr><td><strong>使用统一时间</strong></td><td>如果启用，动画将对所有字符使用相同的时间。如果禁用，动画将基于字符的“存活”时间播放。</td></tr><tr><td><strong>波形大小</strong></td><td>对每个字符逐步应用的时间偏移。这对于创建波浪状效果很有用，比如第一个字符略低于第二个，依此类推。</td></tr><tr><td><strong>时间</strong> <strong>速度</strong></td><td>动画的基础速度</td></tr></tbody></table>

### 发射 <a href="#emission" id="emission"></a>

控制整个效果的影响强度和持续时间。

<img src="/files/a1cf9923b3cdf28382342a9d508f7f873ca73e7d" alt="" width="600">

<table><thead><tr><th width="153">字段名称</th><th>说明</th></tr></thead><tbody><tr><td><strong>循环次数</strong></td><td>动画将重复的次数。‘-1’表示无限</td></tr><tr><td><strong>持续时间</strong></td><td>一个循环应持续多长时间</td></tr><tr><td><strong>随时间的权重</strong></td><td>循环期间效果的强度。你可以让其始终为 1，从而使动画始终开启，或者可以让其淡入或淡出。 </td></tr></tbody></table>

{% hint style="info" %}
*要创建消失效果，只需让“***随时间的权重**`"` *像出现效果那样从 1 变为 0，当需要时 Text Animator 会反向播放它。*
{% endhint %}

#### 动画曲线 <a href="#animation-curves" id="animation-curves"></a>

每当你在检查器的任何模块中看到动画曲线（[Unity 文档](https://docs.unity3d.com/ScriptReference/AnimationCurve-ctor.html))（例如“随时间的权重”），请记住你可以编辑“后包装模式”，使其在一个循环结束后循环、往返或钳制。

<img src="/files/e1c43ae260ccfe5f45dec881d7f27617c9ebdf18" alt="文本 动画 器 unity 后包装 模式" width="300">

（例如，如果你正在创建一个重复或循环 X 次的动画，你可能希望将后包装模式设置为“循环”，以便动画在第一周期结束后不会停止。）

### 效果类型 <a href="#recommendations" id="recommendations"></a>

你可以创建并使用的“自定义检查器效果”有两种类型

* [曲线效果](/text-animator-unity/2.x-zh/xiao-guo/chuang-jian-ni-zi-ji-de-xiao-guo/zai-jian-shi-qi-zhong-chuang-jian-xiao-guo/qu-xian-xiao-guo.md)：让你在时间上选择不同的移动、缩放、旋转曲线等
* [复合效果](/text-animator-unity/2.x-zh/xiao-guo/chuang-jian-ni-zi-ji-de-xiao-guo/zai-jian-shi-qi-zhong-chuang-jian-xiao-guo/fu-he-xiao-guo.md)：让你将现有效果组合在一起

[^1]: 执行特定功能的类，例如控制字符的时间或发射——它们在任何出现的地方都会以相同方式工作


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.febucci.com/text-animator-unity/2.x-zh/xiao-guo/chuang-jian-ni-zi-ji-de-xiao-guo/zai-jian-shi-qi-zhong-chuang-jian-xiao-guo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
