原创 unity 使用百度語音進行語音識別

新建腳本,將下列代碼複製進去即可, using LitJson; using System; using System.Collections; using System.Collections.Generic; using Sy

原创 unity獲取鼠標下有哪些UI物體

public GraphicRaycaster m_CanvasUI; public EventSystem eventSystem; private void Update() {

原创 unity avprovideo插件的使用

1、新建一個MediaPlayer組件 2、在canvas下新建一個AVProVideo組件,並將上一步新建的MediaPlayer組件賦值到avprovideo組件上的mediaplayer上 3、將需要播放的視

原创 unity發佈exe固定寬高比

void SetResolution() { float heightScal = 9.0f; float widthScal = 16.0f; int screenWidth =

原创 unity vrtk知識點

##1、手柄按鈕高亮,模型透明 ## 效果圖: 1、手柄添加VRTK_ControllerActions腳本 2、調用ToggleHighlightButtonOne(true, Color.yellow, 0.5f); //參數

原创 unity 文字轉語音

1、新建一個c#工程,引用Microsoft Speech Object Library類 這樣就可以在我們新建的c#工程裏找到這個dll了,然後我們拖入到unity裏, 2、在unity裏調用方法 完成

原创 unity 無限列表功能(水平方向滑動,豎直方向原理類似)

public static class RectTransformExtensions { public static bool Overlaps(this RectTransform a, RectTransf

原创 Shader-灰頻效果

效果圖: Shader代碼: Shader "Custom/HuiPin" { Properties{ _MainTex("Main Tex",2D)="white"{} _LuminosityAmout("Gray

原创 unity DropDown控件的使用

UGUI中有了下拉列表,這讓我們很方便的製作許多功能,但是這個控件的一些用法我們還是有必有知道的: public Dropdown d1;//獲取一個下拉列表 //單個添加下拉列表的選項 Dropdown.OptionData

原创 Shader—消融效果

效果圖: shader代碼: // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' Shader "Custom/

原创 unity做類似QQ截圖功能

效果: 代碼如下: using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; using

原创 unity編輯器工具—— 可排序列表

效果圖: 公司網絡限制,後面上傳     代碼: using System.Collections.Generic; using UnityEngine; using UnityEditor; using UnityEditorInt

原创 Unity shader實現遮罩效果

這篇文章主要爲大家詳細介紹了Unity shader實現遮罩效果,具有一定的參考價值,感興趣的小夥伴們可以參考一下 本文實例爲大家分享了Unity shader實現遮罩效果的具體代碼,供大家參考,具體內容如下

原创 Unity shader實現消融效果

這篇文章主要爲大家詳細介紹了Unity shader實現消融效果,具有一定的參考價值,感興趣的小夥伴們可以參考一下 本文實例爲大家分享了Unity shader實現消融效果的具體代碼,供大家參考,具體內容如下 效果

原创 unity 製作翻頁按鈕功能

效果圖: UI子父級關係: 代碼中也都有加入註釋,有不懂可私信我。腳本中用到了對象池,我沒有上傳,可根據自己需求做相應變動。 腳本:PageBtnPanelC using System.Collections; using Syst