GUI.PasswordField

public static function PasswordField(position: Rect, password: string, maskChar: char): string;
public static string PasswordField(Rect position, string password, char maskChar);
public static function PasswordField(position: Rect, password: string, maskChar: char, maxLength: int): string;
public static string PasswordField(Rect position, string password, char maskChar, int maxLength);
public static function PasswordField(position: Rect, password: string, maskChar: char, style: GUIStyle): string;
public static string PasswordField(Rect position, string password, char maskChar, GUIStyle style);
public static function PasswordField(position: Rect, password: string, maskChar: char, maxLength: int, style: GUIStyle): string;
public static string PasswordField(Rect position, string password, char maskChar, int maxLength, GUIStyle style);

Parameters

position Rectangle on the screen to use for the text field.
password Password to edit. The return value of this function should be assigned back to the string as shown in the example.
maskChar Character to mask the password with.
maxLength The maximum length of the string. If left out, the user can type for ever and ever.
style The style to use. If left out, the textField style from the current GUISkin is used.

Returns

string The edited password.

Description

Make a text field where the user can enter a password.

using UnityEngine;
using System.Collections; public class ExampleClass : MonoBehaviour {
public string passwordToEdit = "My Password";
void OnGUI() {
passwordToEdit = GUI.PasswordField(new Rect(10, 10, 200, 20), passwordToEdit, "*"[0], 25);
}
}

GUI PasswordField的更多相关文章

  1. Unity3D入门之GUI基础以及常用GUI控件使用(2)

    1.GUI基础 (1)GUI部分是每帧擦除重绘的,只应该在OnGUI中绘制GUI,按钮:GUILayout.Button(“Hello”); 只读标签:GUILayout.Label() (2)修改控 ...

  2. Unity3D学习笔记(一)GUI控件的调用

    GUI控件:1.在Start中初始化,在OnGUI中调整.2.公有变量才会出现在Inspector面板.3.GUI控件的初始化和处理在OnGUI内完成.4.JavaScript的中文为UTF-8编码可 ...

  3. 2.GUI控件的使用 --《UNITY 3D 游戏开发》笔记

    1.Label 控件 编写脚本文件,直接绑定在main camera上 public class labelScript : MonoBehaviour { //设定一个值来接收外部赋值的字符串 pu ...

  4. unity3d之GUI

    1.Button void OnGUI() { , , , ), "up")) {flg=true; } , , , ), "down")) {flg=fals ...

  5. Unity3D笔记六 GUI游戏界面

    1.Label:标签控件,可以在游戏中用来展示文本字符串信息,不仅可以写字还可以贴图片. 2.Button:按钮控件,一般分图片按钮和普通的按钮,还有一个连续按钮RepeatButton注意,这个在W ...

  6. Unity3D入门

    Unity3D是一款应用广泛的3D游戏引擎,本文主要介绍unity3D的简单应用,安装过程略过. 在游戏的整个开发过程中,游戏界面设计占据非常重要的地位.因为游戏启动后,第一个映入眼帘的就是整个游戏U ...

  7. [转]unity3d 脚本参考-技术文档

    unity3d 脚本参考-技术文档 核心提示:一.脚本概览这是一个关于Unity内部脚本如何工作的简单概览.Unity内部的脚本,是通过附加自定义脚本对象到游戏物体组成的.在脚本对象内部不同志的函数被 ...

  8. unity textFilde

    #pragma strict private var editUsername:String; private var editPassword:String; private var editSho ...

  9. Unity3D脚本中文系列教程(七)

    http://dong2008hong.blog.163.com/blog/static/4696882720140311445677/?suggestedreading&wumii Unit ...

随机推荐

  1. 【Ubuntu Desktop】安装主流桌面

    ubuntu的桌面环境实在多,在这里选了几款主流的桌面环境,大家可以按需安装使用. 1.GNOME 2 Classic 经典老界面 gnome2   after reboot,choose GNOME ...

  2. 《Java从入门到放弃》JavaSE篇:综合练习——单身狗租赁系统(数组版)

    因为现在只学习了基本语法,所以在综合练习之前,先补充关于方法概念. 方法的作用:把一系列的代码放在一起,然后再取个别名.之后通过这个别名的调用,就相当于执行了这一系列的代码. 方法的语法:([]中的内 ...

  3. JavaScript笔记之第一天

    JavaScript 1.JavaScript 显示数据 JavaScript 可以通过不同的方式来输出数据: 使用 window.alert() 弹出警告框. 使用 document.write() ...

  4. Spark Structured Streaming框架(2)之数据输入源详解

    Spark Structured Streaming目前的2.1.0版本只支持输入源:File.kafka和socket. 1. Socket Socket方式是最简单的数据输入源,如Quick ex ...

  5. Python练习28

    [之前发布到本人的51cto博客,现转过来] 无意看到老男孩的博文:合格linux运维人员必会的30道shell编程面试题及讲解 http://oldboy.blog.51cto.com/256141 ...

  6. 点击grid单元格弹出新窗口

    实现功能:点击指定单元格后会弹出新窗口,并且最后一行合计不会触发单元格触发函数 <script type="text/javascript"> grid.on('cel ...

  7. C++中4个类型转换相关的关键字/特点/应用场合

    reinterpret_cast是C++里面的一个强制类型转换符,能够将任何的指针类型转换成其他的任何指针类型:能够将任何的整数类型转换成指针类型,反之亦然:滥用reinterpret_cast强制类 ...

  8. 关于vue的一些总结

    最近学习了一段时间的vue js   除了路由没用过之外  基本上其他的都用过了 对于vue的一些用法  在此做一个总结.  开始使用vue之前 需要导入vuejs这个文件到项目中 <scrip ...

  9. TX2017秋招笔试题之编码

    问题描述: 假定一种编码的编码范围是a ~ y的25个字母,从1位到4位的编码,如果我们把该编码按字典序排序,形成一个数组如下: a, aa, aaa, aaaa, aaab, aaac, - -, ...

  10. Redis集群的相关概念

    1.1 redis-cluster架构图 架构细节: (1)所有的redis节点彼此互联(PING-PONG机制),内部使用二进制协议优化传输速度和带宽. (2)节点的fail是通过集群中超过半数的节 ...