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. Notification弹出实现

    Notification的几种基本使用方法,大家肯定都已经烂熟于心,我也不必多说.给一个链接:https://zhuanlan.zhihu.com/p/25841482 接下来我想说的是android ...

  2. C# 隐藏文件

    void SerializeXmlNodes(XmlSerializer serialize, string filePath, List<XmlNode> nodes) { using ...

  3. ThreadLocal类分析

    首先试想一个场景: 多个线程都要访问数据库,先要获得一个Connection,然后执行一些操作.为了线程安全,如果用synchronized锁定一个Connection对象,那么任何时候,都只有一个线 ...

  4. JSP慕课网之Session

    会话保存在服务器的内存里. sessionId可以通过进入http://localhost:8888/进入Tomcat的Manager App进行查看,点击项目的sessions可以看到session ...

  5. 关于C#开发 windows服务进程

    最近在做一个物联网项目,其中有一个模块是需要实现热水工程的自动化补水和回水功能 实现的方式有多种,我选用了VS C#的Windows服务方式. 首先是创建一个windows服务项目(名称随你喜欢的规范 ...

  6. mysql中group by 的用法解析

    1. group by的常规用法 group by的常规用法是配合聚合函数,利用分组信息进行统计,常见的是配合max等聚合函数筛选数据后分析,以及配合having进行筛选后过滤. 假设现有数据库表如下 ...

  7. ASP.NET From表单转实体类

    原由 经常遇到 int Age=Convert.ToInt32(this.txtAge.Text); 这种蛋疼的代码,特写次方法. 之所以抛出异常是希望知道转换失败,格式错误的属性是什么,方便调试. ...

  8. java设计模式系列之设计模式概要(1)

    一.什么是设计模式 设计模式(Design pattern)是一套被反复使用.多数人知晓的.经过分类编目的.代码设计经验的总结.使用设计模式是为了可重用代码.让代码更容易被他人理解.保证代码可靠性. ...

  9. 一、Nginx安装手册

    1 nginx安装环境 nginx是C语言开发,建议在linux上运行,本教程使用Centos6.5作为安装环境. gcc 安装nginx需要先将官网下载的源码进行编译,编译依赖gcc环境,如果没有g ...

  10. ireport导出中英文pdf

    准备: 报表开发工具:ireport 5.6.0 报表框架: jasperreport5.6.0 1.中文格式设置pdf fontname.isembedded.pdfencoding pdf fon ...