- 博客(5)
- 资源 (2)
- 收藏
- 关注
原创 在Unity里经常用这个方法读取json数据,做Tips标签展示和选择题都可以用
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using LitJson; /// <summary> /// 简介内容控制 /// </summary> public class TipsContentManager : NewSingleton<TipsContentManager> { public T
2021-08-27 15:50:43
200
原创 Unity调用微软SpeechLib.Dll的C#类实现语音合成功能
using System.Collections; using System.Collections.Generic; using UnityEngine; using SpeechLib; public class Speech : MonoBehaviour { // Start is called before the first frame update void Start() { } // Update is called once
2021-08-11 16:00:24
1265
2
原创 Unity遍历Hierarchy上的所有物体并清除指定组件
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; public class ClearComponent { [MenuItem("我的编辑器/多个物体组件清除")] static void ClearComponentMore() { var allGos = Resources.FindObjectsOfTypeAl
2021-05-07 18:56:26
908
原创 Unity制作Text自适应可滚动公告UI面板
忘性很大,做了好多次。再做又忘了。记一下笔记! 目标:制作一个滚动显示文字的公告面板 功能: text内容文字无论多少字数,都可以正常滚动显示。 第一步:创建两位主角:Image(Image类型UI),content(Text类型UI)。UI层级如下 第二步:在Image上添加Scroll Rect,将contentUI拖入Scroll Rect的content参数。 再添加一个Mask,取消勾选Show Mask Graphic。隐藏遮罩背景图。 第三步:在content上添加Content Siz
2021-04-09 16:41:20
1012
原创 Unity2018新版Webgl和网页通信 基于jslib的Unity和网页中的方法互相调用
Application.ExternalCall()改版弃用 新版jslib官方介绍 首先我们来一个最简单的jslib,用txt创建文件。文件名为__Internalplugins,后缀名为jslib。 关键操作:这个文件必须放在Unity项目的Plugins文件夹下! 代码如下: mergeInto(LibraryManager.library, { Hello: function ()...
2019-05-28 16:27:56
10958
10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人