gui

滑动条的样式问题
由 lh99998888 于 星期日, 04/10/2011 - 10:46 发表var Sli:GUIStyle;
var SliTh:GUIStyle;
var sliderValue:float;
function OnGUI()
{
sliderValue=GUI.VerticalSlider(Rect(20,20,20,Screen.height-40),sliderValue,0.0,100.0,Sli,SliTh);
}
我给Sli的Normal状态设了一张图片,又给SliTh的Normal状态设了一张图片,但是只能看见滑动条,看不见滑块,哪位高人指点一下,谢谢。
- 1 条评论
- 440 次点击

BitList的一个测试例子
由 lazyducker 于 星期三, 03/02/2011 - 12:41 发表using System;
using System.Collections.Generic;
using UnityEngine;
using Random=UnityEngine.Random;
[ExecuteInEditMode]
public class ListTestPopulator : MonoBehaviour
{
public int ItemCount = 10;
private bool _randomItems = true;
public bool RandomItems = true;
private BitStage stage;
public BitList list;

Makes a GUIText label follow an object in 3D space. Useful for things like having name tags over players' heads.
由 quanshengjie 于 星期六, 02/12/2011 - 13:01 发表Description
Makes a GUIText label follow an object in 3D space. Useful for things like having name tags over players' heads.

Draw lines in Unity GUI
由 quanshengjie 于 星期六, 02/12/2011 - 12:55 发表Description
This script allows you to draw a line between two points in the GUI system.
Usage
Render a line in the GUI system by calling DrawLine and passing it a set of Vector2's for point A and point B of the line.
Optionally, you can pass DrawLine a color and width for the line, as well as using a Rect instead of Vector2's. If you do not pass a width, the line will have a width of 1. If you do not pass a color, the line will be rendered with the GUI.contentColor.
