unity的GUI
来源:互联网 发布:房产系统源码 编辑:程序博客网 时间:2024/06/05 20:12
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class scene : MonoBehaviour {
public Texture puic;
float a = 0;
bool bl = false;
public void wfun(int id)
{
}
void Start () {
}
void Update () {
}
void OnGUI()
{
//GUI.DrawTexture(new Rect(10,10, 800, 600), puic);
//Debug.Log("123!");
// GUILayout.Button("新的");
// GUI.Button(new Rect(400, 400, 100, 50), "确定");
// GUI.Box(new Rect(0,0,Screen.width,Screen.height),"盒子");
//委托 取反!
if (GUI.Button(new Rect(100, 100, 100, 60), "确定"))
{
Debug.Log("123!");
bl = !bl;
}
if (bl)
{
GUI.Window(1, new Rect(Input.mousePosition.x,Screen.height- Input.mousePosition.y, 300, 250), wfun, "witndow");
// GUI.WindowFunction
}
GUI.HorizontalSlider(new Rect(25,25,100,30),a,0.0f,10.0f);
}
}
using System.Collections;
using UnityEngine.UI;
public class scene : MonoBehaviour {
public Texture puic;
float a = 0;
bool bl = false;
public void wfun(int id)
{
}
void Start () {
}
void Update () {
}
void OnGUI()
{
//GUI.DrawTexture(new Rect(10,10, 800, 600), puic);
//Debug.Log("123!");
// GUILayout.Button("新的");
// GUI.Button(new Rect(400, 400, 100, 50), "确定");
// GUI.Box(new Rect(0,0,Screen.width,Screen.height),"盒子");
//委托 取反!
if (GUI.Button(new Rect(100, 100, 100, 60), "确定"))
{
Debug.Log("123!");
bl = !bl;
}
if (bl)
{
GUI.Window(1, new Rect(Input.mousePosition.x,Screen.height- Input.mousePosition.y, 300, 250), wfun, "witndow");
// GUI.WindowFunction
}
GUI.HorizontalSlider(new Rect(25,25,100,30),a,0.0f,10.0f);
}
}
0 0
- unity的GUI
- Unity GUI的使用1
- Unity GUI的使用2
- unity gui
- Unity GUI
- unity GUI
- unity 3d GUI.HorizontalSlider与GUI.VerticalSlider的介绍
- Unity--GUI 的旋转和自适应屏幕分辨率
- Unity-GUI绘制旋转的Texture
- Unity GUI的选择与评价
- 【Unity3D】Unity GUI的选择与评价
- Unity GUI的选择与评价
- Unity GUI的选择与评价
- Unity GUI自适应屏幕分辨率的方法
- Unity学习笔记(4) --- Unity的界面排版:初识GUI
- Unity GUI Rotation
- Unity GUI基础知识。。。。。
- Unity中的GUI编程
- 定时保存apache日志文件
- 解决数据结构未对齐的异常
- mysql-bin.000001文件的来源及处理方法
- Java多线程交替输出01010......
- vue--点击当前增加class,其他删除class
- unity的GUI
- Retrofit2+RxJava+Okhttp学习笔记
- linux下boost的一个扩展线程池-threadpool-的学习
- 每天一个Linux命令(3):pwd命令------学习笔记
- Eclipse 不能正确识别Android工程
- vb.net Linq实战
- python数据结构之图深度优先和广度优先
- 目标检测的图像特征提取之(二)LBP特征
- android: 调用摄像头拍照