自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 安卓无法加载AssetBundle包

打包AssetBundles时提示:internal error Target platform mismatch。就应该是平台没写对。如果build Settings下面选的是android那么打包的时候就得:BuildTarget.AndroidBuildPipeline.BuildAssetBundles(dir,BuildAssetBundleOptions.None,BuildTar...

2018-09-06 17:09:57 690

原创 手机端访问PC端本地服务器(笔记)

安卓手机平台必须和PC端是同一IP段,即在同一局域网才可以访问。我遇到的问题是:PC启动NetBox.exe服务器,PC浏览器访问的是:loclnost:8080我想让手机访问PC端的服务器,就只要把localhost:8080改成本机的IP:8080即:192.168.1.117:8080就可以了。即在手机上打来浏览器并输入:192.168.1.117:8080就能显示电脑上的浏览器...

2018-09-06 17:01:03 1966

原创 Animation Silder实现动画播时滑动条随之滑动

需要播放动画的各个按钮都挂上AnimSlider脚本并勾掉勾选,并调用isSet()函数和按钮对应的Toggle_1函数,才不会互相干扰using UnityEngine;using System.Collections;using UnityEngine.UI;public class AnimSlider : MonoBehaviour{    public static...

2018-09-06 16:52:47 894

原创 Debug.DrawLine射线需要在scene下才能看到

想要看到射线,需要游戏运行时,同时打开scene,就能在Scene下看到      Debug.DrawLine(ray2.origin, hit.point, Color.red); 

2018-09-06 16:51:21 5254 1

原创 UIActive显示和隐藏

using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;public class UIActive : MonoBehaviour {    public static UIActive Instance;    //-------------...

2018-09-06 16:50:36 1014 1

原创 Unity-Render Texture应用(个人笔记)

如果Cube移动和旋转时,按下空格键,相机拍下的也只是一张照片,不是录像。using System.Collections;using System.Collections.Generic;using UnityEngine;public class CAR : MonoBehaviour {    public GameObject Camera;    void Start ()...

2018-09-06 16:47:28 244

原创 unity(个人笔记)

unity打开工程时,如果工程名字中含有中文或者工程所在路径含有中文,路径多长,都可能导致工程打开出错。下次就知道了,要打开Unity工程,尽量避免这些失误。...

2018-09-06 16:46:11 121

原创 其中关于unity清空txt文本的坑(个人笔记)写得比较乱

我做了一个在线验证,和服务器连接的在线激活在线解绑定的demo:大概是这样的。 在线方式:场景1:客户端发送:a=1&设备号给服务端,服务端判断,返回1(设备号存在,验证成功)返回2(设备号不存  在,验证失败)场景2:客户端发送:a=2&设备号&激活码给服务端,服务端判断,返回1(激活码不正确)返回2(激活成功并绑定设备号)返回3(激活码重复绑定)场景3...

2018-09-06 16:44:19 13476

原创 安卓平台文件目录的说明(笔记)

“file:///”+Application.persistentDataPath+"/"+name;对应安卓平台的路径就是:本地/Android/data/工程对应packetage包(com.***.****)/files/

2018-09-06 16:32:54 256

原创 unity导出webgl版本过程报错MissingMethodException: Method not found: 'UnityEditor.PlayerSettings。。。

MissingMethodException: Method not found: 'UnityEditor.PlayerSettings.WebGL.get_nameFilesAsHashes'.UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, Syst...

2018-08-07 15:14:54 6414

原创 通过ScrollRect和Grid实现菜单的左右滑动效果

 设置ScrollRcet的Width和Hieght,使得要显示的内容不会被挡住。设置ScrollRcet的MoveMent  Type为Clamped,这样左右滑动菜单时,不会显示不想看到的拉伸的背景图。设置ScrollRcet的射线检测,勾掉并勾掉不想显示的其他辅助Image的射线检测,这样才不会干扰屏幕的触摸效果。如果不勾掉,则那些辅助Image会干扰我们触摸操作。Scrol...

2018-07-20 18:00:17 1670

原创 改变的相机位置和角度

//相机位置和角度发生变化 MainCam.transform.localPosition = new Vector3(-5.1f, 18.93f, -7.55f); MainCam.transform.localEulerAngles = new Vector3(49.8473f, 26.4706f, 0.0f);   ...

2017-11-23 09:14:29 1722

原创 Unity替换按钮下的文字颜色

ss_Toggle[i].transform.Find("Text").GetComponent<Text>().color = Color.white;

2017-10-26 09:12:34 2493

原创 Unity 替换按钮下的图片

public Sprite NewImage;public GameObject Btn;Btn.GetComponent.sprite=Newimage;//用Newimage替换按钮当前的Image组件的图片Btn.transform.Find("Image").GetComponent.sprite=Newimage;//用Newimage替换按钮下的子Image组件的图

2017-10-17 17:12:14 4084

原创 Unity 实现按下按钮替换按钮的图片

using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;public class BTManager_Active: MonoBehaviour {    public static BTManager_Active Instance; 

2017-10-16 17:13:22 6830 1

原创 Unity 播放、停止播放、循环播放音频(笔记)

using UnityEngine;using System.Collections;public class AudioPlay : MonoBehaviour { public static AudioPlay Instance; public AudioClip[] FuChuAudio; public AudioSource FCAudio; // p...

2017-08-02 09:43:03 26644

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除