当前位置:网站首页>【Unity】插件TextAnimator 新手使用说明
【Unity】插件TextAnimator 新手使用说明
2022-06-23 16:53:00 【C#李哪托#C】
新手购买玩TextAnimator不知道如何上手,使用文档不知道从何处看起(没错就是我),简单介绍一下该如何使用,不是太严谨的使用说明,如有问题欢迎指正。
1.添加组件
TMP Text文件添加组件
添加了TextAnimatorPlayer会自动帮你添加TextAnimator
2.
添加相应的标签到富文本中


3. 通过代码控制其显示和关闭
/// <summary>
/// 显示文本
/// </summary>
/// <param name="_text">_text</param>
public static void ShowText(TMP_Text _text)
{
if (_text.GetComponent<TextAnimatorPlayer>() !=null)
{
TextAnimatorPlayer textAnimatorPlayer = _text.GetComponent<TextAnimatorPlayer>();
textAnimatorPlayer.StartShowingText(true);
}
else
{
Debug.LogError("TextAnimatorPlayer is NULL");
}
}
/// <summary>
/// 文本消失
/// </summary>
/// <param name="_text"></param>
public static void DisappearingText(TMP_Text _text)
{
if (_text.GetComponent<TextAnimatorPlayer>() != null)
{
TextAnimatorPlayer textAnimatorPlayer = _text.GetComponent<TextAnimatorPlayer>();
textAnimatorPlayer.StartDisappearingText();
}
else
{
Debug.LogError("TextAnimatorPlayer is NULL");
}
}
这样就可以控制它的显示和关闭了,剩下的API文档都写的有,可以自己去查
边栏推荐
- [tool C] - lattice simulation test 2
- Detailed explanation of ssl/tls principle and packet capturing
- Analytic analog-to-digital (a/d) converter
- Analysis of three battery capacity monitoring schemes
- [mae]masked autoencoders mask self encoder
- 论文阅读 (52):Self-Training Multi-Sequence Learning with Transformer for Weakly Supervised Video Anomaly
- 【ESP8266-01s】獲取天氣,城市,北京時間
- Kdevtmpfsi processing of mining virus -- Practice
- A set of code to launch seven golang web frameworks at the same time
- The draganddrop framework, a new member of jetpack, greatly simplifies the development of drag and drop gestures!
猜你喜欢

全局组织结构控制之抢滩登陆

org. apache. ibatis. binding. BindingException: Invalid bound statement (not found):...

Reading papers (51):integration of a holonic organizational control architecture and multiobjective

JSON - learning notes (message converter, etc.)

Paper reading (50):a novel matrix game with payoffs of maximal belt structure

论文阅读 (50):A Novel Matrix Game with Payoffs of Maxitive Belief Structure

Customer service system building tutorial_ Installation and use mode under the pagoda panel_ Docking with official account_ Support app/h5 multi tenant operation

论文阅读 (54):DeepFool: A Simple and Accurate Method to Fool Deep Neural Networks

SimpleDateFormat在多线程环境下存在线程安全问题。

视频异常检测数据集 (ShanghaiTech)
随机推荐
【ESP8266-01s】獲取天氣,城市,北京時間
ACM players take you to play with the array!
[tool C] - lattice simulation test 2
How to make a badge
Troubleshooting and modification process of easycvr interface dislocation in small screen
Deploy LNMP environment and install Typecho blog
QML类型:Loader
Go unit test
Year end: the "time value" and business methodology of live broadcast E-commerce
How to make a shirt certificate
Self taught programming introduction, what language to learn first?
Tencent three sides: how to duplicate 4billion QQ numbers?
[learning notes] tidb learning notes (III)
Nanny level teaching! Take you to play with time complexity and space complexity!
Listen attentively and give back sincerely! Pay tribute to the best product people!
论文阅读 (47):DTFD-MIL: Double-Tier Feature Distillation Multiple Instance Learning for Histopathology..
What if the website is poisoned
Postgresql_ Optimize SQL based on execution plan
Cross browser common events
Vulnerability in McAfee epolicy orchestrator