然后公开Unity3D的源代码
using UnityEngine;
using System.Collections;
public class Demo : MonoBehaviour {
//人脸识别结果的数据结构
public class face{
public Facemodels[] faces; //人脸数组,最大返回的脸为10张
}
//每张人脸识别结果的数据结构
public class Facemodels{
public int facerectanglex; //人脸矩形框x坐标
public int facerectangley; //人脸矩形框y坐标
public int facerectanglewidth; //人脸矩形框宽
public int facerectangleheigh; //人脸矩形框高
public string base64feature; //人脸的特征值
public int lefteyex; //人脸左眼特征坐标
public int lefteyey; //人脸左眼特征坐标
public int righteyex; //人脸右眼特征坐标
public int righteyey; //人脸右眼特征坐标
public int mouthx; //人脸口型特征坐标
public int mouthy; //人脸口型特征坐标
}
public Facemodels people = new Facemodels();
Texture2D _tex = null;
string _message = null;
载入场景的我会, 先打开你要载入的那几个场景 unity 中file → build settings → add current 然后就能看到添加进去了 代码是: application.loadlevel("scenename"); //根据场景名称 application.loadlevel(0);//根据数字 可以放在 if 里进行场。
Photoshop|
Dreamweaver|
SVG|
WebGL|
Visual Studio|
PowerDesigner|
Eclipse|
Git|
Apache Ant|
Atom|
Composer|
CodeSmith|
Flex|
Gradle|
Maven|
Sublime Text3|
SVN|
Tableau|
Vim|
Chrome开发者工具|
OpenGL|
Unity|
Direct3D|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....