自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(47)
  • 资源 (13)
  • 收藏
  • 关注

原创 adb常用命令汇总

adb命令常用汇总

2023-04-03 11:01:05 135

原创 VMware中ubuntu20.04突然忘了不可用解决方案

搜了好久都是老版本的答案不成功。

2023-03-21 16:38:10 346

原创 Unity代码切换XR Plug-in Management 内插件

如上图,做编辑器工具时需要代码切换到Cardboard XR plugin, 代码片段如下,拿去用不谢XRGeneralSettings androidXRSettings = XRGeneralSettingsPerBuildTarget.XRGeneralSettingsForBuildTarget(BuildTargetGroup.Android); if (androidXRSettings == null) { ...

2022-02-23 13:31:36 4898 3

原创 Unity2020.1打包安卓报错sdk tools version 0.0 < 26.1.1

其中之一的解决方案。找到安卓adk目录下面的tools文件夹里package.xml文件,修改其中obsolete="true",替换为obsolete="false"然后 试试吧。行的话最好,不行的话再搜别的方法去吧。

2021-10-09 13:44:12 1066

原创 unity编辑器扩展-project窗口中获取选中的文件夹路径

效果图拿去直接用吧。代码如下public static string GetCurrentAssetDirectory() { foreach (var obj in Selection.GetFiltered<Object>(SelectionMode.Assets)) { var path = AssetDatabase.GetAssetPath(obj); if (string.IsNullO

2021-02-24 11:29:56 2581

原创 Unity中RectTransform类扩展 关于Anchor的代码操作

复制下来直接用吧using UnityEngine; public enum AnchorPresets { TopLeft, TopCenter, TopRight, MiddleLeft, MiddleCenter, MiddleRight, BottomLeft, BottonCenter, BottomRight, BottomStretch, VertSt

2021-01-18 11:31:20 671

原创 Unity中 Camera 设置水平FOV

附加到camera直接用.如下图using System;using System.Globalization;using UnityEditor;using UnityEngine; // Lock the cameras horizontal field of view so it will frame the same view in the horizontal regardless of aspect ratio. [RequireComponent (typeof(Cam

2020-09-02 11:26:56 2112

原创 51单片机 对 char 反序列输出,以及注意事项

反序列输出 意思是 比如数值 0xaa (二进制 1010 1010),输出为 0x55(二进制 0101 0101).先上函数unsigned char Reverse(unsigned char _char){ unsigned char data aa = 0x00; unsigned char data bb = 0x00; unsigned char data cc = 0x00; unsigned char i; aa = _char; for (i = 0; i.

2020-06-08 11:36:12 524

原创 Unity内实现类似 UE4函数 MapRangeClamp

float MapRangeClamp(float value, float InFrom, float InEnd, float OutFrom, float OutEnd) { value = Mathf.Clamp(value, InFrom, InEnd); float InLength = Mathf.Abs(InEnd - InFro...

2019-06-16 02:58:39 836

原创 Unity判断顺时针或者逆时针旋转

Vector2 curPos; Vector2 lastPos; Vector2 centerInScreen; void Update() { curPos = eventData.position; centerInScreen = RectTransformUtility.WorldToScreenPoint(null...

2019-06-13 13:49:23 4368 1

原创 已知三点坐标。求组成三角形三个内角角度

void Calculate(Vector2 p1, Vector2 p2, Vector2 p3) { float a = Vector2.Distance(p2, p3); float b = Vector2.Distance(p1, p3); float c = Vector2.Distance(p1, p2); D...

2019-05-15 17:53:47 13045

原创 EpicInstaller-7.16.0-unrealengine.msi 安装失败,解决方法

安装到directX时候提示的才有可能用此法解决哦。found a way to fix DirectX so one can use the original EpicInstallerCtrl+R 输入 regedit 打开注册表找到路径 \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX双击 Version改 "Value da...

2018-11-12 11:36:34 11954 1

原创 安卓命令行输出指定进程日志信息and bat命令结果赋值其他变量

@echo off for /F %%i in ('adb shell pidof com.packagename.youself') do ( set GetPid=%%i)echo 得到PID:%GetPid%adb shell logcat --pid %GetPid% -s Unity用法 :for循环那行pidof后面 包名 换成你自己的包名。...

2018-10-11 18:11:34 513

原创 Unity 输出Debug.log Debug.ErrorLog文件保存到本地

用法:直接挂到第一个场景内的游戏对象上即可。代码如下using System;using System.Collections;using System.Collections.Generic;using System.IO;using UnityEngine;public abstract class MonoSingletonManager&lt;T&gt; : MonoBe...

2018-08-20 16:16:06 4240 2

原创 adb install 显示进度

adb install 如果安装大文件。不知道进度很不人性化啊。所以写了个bat。bat代码如下.用法:如新建myadb.bat文件。命令行:myadb demo.apk@echo offset apkname=%1%::传入apk路径echo 您输入了参数:%apkname% Set filename=%apkname%set filename=%~nx1echo 文...

2018-07-24 15:50:09 5915

原创 unity安卓交互。多个插件共存

unity类AndroidJavaObject内提供静态调用 CallStatic 函数和非静态调用函数Call.。使用多个插件时候最方便的方法。如果你想调用安卓原生接口。而这个接口又不是静态的。你又使用了多个插件。那么你就需要这样做了。安卓类内定义一个静态实例。用静态实例再调用类内其他非静态函数。实例如下代码package com.example.libforunity;import andr...

2018-06-01 18:26:46 1345

原创 Unity中Threading和 协同程序 共同使用的简单方法

简单的使用方法using System.Collections;using System.IO;using System.Threading;using UnityEngine; public class TestScript : MonoBehaviour{ class Config { public string Version; public string Asset...

2018-05-25 12:37:01 878

原创 vuforia + zxing 解析二维码

拷贝下来 直接用。using UnityEngine;using System.Collections;using System;using Vuforia;using System.Threading;using ZXing;using ZXing.QrCode;using ZXing.Common;using UnityEngine.SceneManagement;publ

2016-05-07 10:55:55 2219 1

原创 unity3d中用2D背景当作图片

using UnityEngine;using System.Collections;public class Backdrop : MonoBehaviour{const string SHADER_CODE = "Shader \"UnlitAlpha\"{" +"Properties {" +"_Color (\"Color Tint (A = Opaci

2016-03-23 09:31:33 4225

原创 C# 写简单配置文件插件 SharpConfig 用法

using SharpConfig;Configuration config = Configuration.LoadFromFile(Application.streamingAssetsPath + "/sample.cfg"); Section section = config["General"]; string someString = sectio

2015-10-05 18:09:41 2875

原创 win8系统安装win7 sdk失败说明。

由于现在directShow没有和direcxtx一起发布,而是和windows sdk 打包发布了,可以到官网下载最新的windows sdk 开发包。各个版本区别GRMSDK_EN_DVD.iso x86GRMSDKIAI_EN_DVD.iso ItaniumGRMSDKX_EN_DVD.iso 64位的amd cpu如果你安装的是32位的windows 7,请

2015-06-16 17:27:34 1282

原创 NGUI 响应touchscript 的 tuio动作

using UnityEngine;using System.Collections;using TouchScript;using TouchScript.Layers;using TouchScript.Hit;using TouchScript.Utils;public class NGUICameraTouchLayer : TouchLayer{ private

2015-05-06 16:25:17 2557 2

原创 NGUI中texture序列帧图片播放

using UnityEngine;using System.Collections;public class FullTextureAnim : MonoBehaviour { public int mFPS = 30; public bool loop; public bool mActive = true; public bool isPlayback

2014-12-02 15:42:43 1325

转载 unity3d中类似googleearth的操作

脚本放到球体 就行了var numberAverages : int = 3;private var originalRotation : Quaternion;private var offsetRotation : Quaternion; // Make sure there are always SphereCollider and Rigidbody@script Require

2014-12-01 10:09:47 2255 1

原创 unity3d内用OSC通信

OSC(Open Sound Control )

2014-07-29 17:45:54 3671

原创 unity3D 用RenderTexture截图

private void MakeCameraImg(Camera mCam, int width, int height) { //Image mImage; RenderTexture rt = new RenderTexture(width, height, 0); mCam.pixelRect = new Rect(0, 0, Scr

2014-07-14 18:02:56 3029

原创 unity3D在android 返回键 按两次退出程序。

备用

2014-06-25 16:44:55 1704

原创 unity3d +KinectWrapperPackage手势识别

using UnityEngine;using System.Collections;public class HandsWave : MonoBehaviour { public GameObject leftHand; public GameObject rightHand; public GameObject rightElbow; public K

2014-06-25 10:11:02 3653

转载 多点触摸unity3d

using UnityEngine;using System.Collections;public class Move : MonoBehaviour { //用于绑定参照物对象 public Transform target; //缩放系数 float distance = 10.0f; //左右滑动移动速度 float xSpeed =

2014-03-24 17:45:26 946

转载 unity3D HOOK 键盘事件

using UnityEngine;using System.Collections;using System.Collections.Generic;using System;using System.Diagnostics;using System.Runtime.InteropServices;class InterceptKeys : MonoBehaviour{

2013-12-13 14:29:26 2512 1

转载 LineIntersection C#代码 求两点交点——2D

using System.Collections;public class LineIntersection{ public struct Point { public double x; public double y; }; public struct Line { public Point

2013-10-22 14:06:31 1498

转载 ease function 缓动函数 插值算法

各种类型 图标 http://easings.net/zh-cn官网 .http://www.robertpenner.com/easing/unity3D 所用C#代码easing.csusing UnityEngine;using System.Collections;using System;public static class Easing{ //

2013-07-12 20:15:52 3306

转载 C# sqlite

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SQLite;namespace AirLibrary{ /**//// /// 数据库接口类 /// publ

2013-07-05 10:11:52 733

原创 unity3D 查看墙后面的对象 的 Shader

Shader "Pat/VisibleBehindObjects" {Properties { _MainTex ("Base (RGB) TransGloss (A)", 2D) = "white" {}}SubShader { CGPROGRAM#pragma surface surf BlinnPhong alphasampler2D _MainTex;

2013-06-08 15:58:27 1730

原创 MouseOrbit增加中轴缩放功能

var target : Transform;var distance = 10.0;var minidistance = 0.1;var maxidistance = 15.0;var xSpeed = 250.0;var ySpeed = 120.0;var yMinLimit = -20;var yMaxLimit = 80;private var x = 0.0;

2012-11-09 15:54:00 614

原创 unity3d 公告板(billboard)

using UnityEngine;using System.Collections;public class Billborad : MonoBehaviour { public Camera m_Camera; public Vector3 Normal;//面法线 Quaternion direction; // Use this for initi

2012-11-07 14:54:39 1779

转载 Unity3D官方资源完全下载

Unity3D官方资源完全下载1 - GUI Essentials.pdf2 - Scripting Tutorial.pdf2DGameplayTutorial.pdf2DGameplayTutorialProject.zip3DPlatformProject.zip3DPlatformTutorial.pdf

2012-11-06 14:25:08 5226 1

转载 unity3D 添加背景图片

// Copyright (c) 2010 Bob Berkebile// Please direct any bugs/comments/suggestions to http://www.pixelplacement.com//// Permission is hereby granted, free of charge, to any person obtaining a copy/

2012-08-24 16:48:53 4106

原创 OSG + GLSL 实现摇摆的树

#include #include #include #include #include #include #include #include #include #include #include #include #include #include

2011-09-21 09:47:26 2753 3

原创 OSG3.0 +cegui0.7.5 结合(支持中文显示)

cegui0.7.5 必须添加代码 setDefaultFont。设置 默认字体。 用0.6的 就没用就可以显示中文...浪费半天时间 惨啊。也可以改变scheme文件 。。也可以 用代码可以这样写: CEGUI::FontManager::getSingleton

2011-09-17 20:31:58 1843

OutputLogInCurrentDirctory.unitypackage

类似于unity5 之前的版本,output.log文件在exe同级目录输出。注意:要运行exe同级目录的 run.bat 才可以哦。

2020-09-15

Nexus Root Toolkit v2.1.9

google系列手机的root好工具 。还有其他功能可用。请自己发掘。哈哈。全英文界面哦。没发现有中文的。刚刚自己root成功。打开软件后根据提示加载所需文件。都在压缩包里面。

2019-05-09

最新版Visual Studio 2015 Tools for Unity

版本号3.8.0.6。找了好久才找到。目前vs2015商店也搜不到了。

2018-09-05

OSG Export v1.0.0 for max9中文版

osg导出插件 v1.0.0 中文版。官网提供的 插件 用不了 max9..

2011-08-29

中文版 GPU精粹1:实时图形编程的技术、技巧和技艺.part3.rar

中文版 GPU精粹1:实时图形编程的技术、技巧和技艺.part3.rar 人民邮电出版社

2011-08-27

中文版 GPU精粹1:实时图形编程的技术、技巧和技艺.part2.rar

中文版 GPU精粹1:实时图形编程的技术、技巧和技艺.part2.rar --人民邮电出版社

2011-08-27

中文版 GPU精粹1:实时图形编程的技术、技巧和技艺.part1

中文版 GPU精粹1:实时图形编程的技术、技巧和技艺.part1 --人民邮电出版社..

2011-08-27

osgExp1.0 src

osgExp1.0 源码。方便自己编译 ,别人编译的 自己可能用不成 哈哈。

2011-08-27

win32 VC++ 合并 exe 和 Dll..

合并exe和Dll VC++ 合并自定义 dll 资源 保护 dll

2011-07-22

OpenGL 着色语言(橙皮书)中文版3part.pdf

OpenGL 着色语言(橙皮书)中文版 第三部分

2011-06-11

OpenGL 着色语言(橙皮书)中文版2part.pdf

OpenGL 着色语言(橙皮书)中文版 第2部分

2011-06-11

OpenGL 着色语言(橙皮书)中文版1part.pdf

OpenGL 着色语言(橙皮书)中文版 人民邮电出版社

2011-06-11

rpgtest(预编译exe和源码).rar

rpgtest(包含 编译exe 和 源码) 供学习之用...

2011-05-06

空空如也

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

TA关注的人

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