码迷,mamicode.com
首页 >  
搜索关键字:gameobject    ( 546个结果
UGUI Text添加滚动条 实现滚动显示
Project 说明:Content(GameObject)为text的父物体,text用于显示文本内容。ScrollBar为滚动条。 实现效果: Hierarchy: Inspector: 步骤: 1:GameObject新命名为Content,添加Text用于显示文本内容,ScrollBar的设 ...
分类:其他好文   时间:2016-07-06 18:03:14    阅读次数:138
JSBinding / Code Snippets
new a gameobject & overloaded methds add/get c# component add/get javascript component define a javascript monobehaviour use Inspector static methods ...
分类:Web程序   时间:2016-07-05 18:41:29    阅读次数:165
点击按钮显示和隐藏图片精简方法
using UnityEngine;using System.Collections; public class HideOrShowImg : MonoBehaviour { public GameObject Img; void Start() { Img.SetActive(false); } ...
分类:其他好文   时间:2016-07-04 18:30:40    阅读次数:265
鼠标所到之处 显示Text文本
//使用List需添加的命名空间using System.Collections.Generic; //声明元素类型为int类型的List容器 //ToolPic用于盛放图片 public List<GameObject> ToolPic2 = new List<GameObject>(); //T ...
分类:其他好文   时间:2016-07-02 13:06:59    阅读次数:130
C# 脚本
1. C#里使用Find函数查找物体时要用 GameObject:GameObject.Find("Canvas/Text").GetComponent<Text>().text="Score";2. 用Instantiate初始化物体时要用 as Transform 转换类型(对于 Transfo ...
分类:Windows程序   时间:2016-06-30 14:14:40    阅读次数:266
Unity3D 5.x 交互功能 - 光线投射、碰撞设置
1,光线投射碰撞:第一人称视线在预置范围内(如3米)和看到的物体发生碰撞 ① 检测光线投射碰撞的脚本添加在第一人称FPSController上 #pragma strict private var currentdoor:GameObject; var hit:RaycastHit; functio ...
分类:编程语言   时间:2016-06-27 15:42:26    阅读次数:445
GameLoad
using UnityEngine;using System.Collections; public class GameLoad : MonoBehaviour { public GameObject magicianPrefab; public GameObject swordmanPrefab ...
分类:其他好文   时间:2016-06-25 09:38:55    阅读次数:178
CharacterCreation
using UnityEngine;using System.Collections; public class CharacterCreation : MonoBehaviour { public GameObject[] characterPrefabs; public UIInput name ...
分类:其他好文   时间:2016-06-25 09:34:25    阅读次数:141
Unity3D LuaComponent(基于ulua)
LuaComponent可以支持配一个需要执行在这个gameObject上的lua脚本,并且每个gameObject上的lua都是一个实例 lua脚本形如,记得最后一定要return 这个表 而且每个变量都得是local的 ...
分类:编程语言   时间:2016-06-15 20:29:49    阅读次数:1249
unity中三种调用其他脚本函数的方法
第一种,被调用脚本函数为static类型,调用时直接用 脚本名.函数名()第二种,GameObject.Find("脚本所在的物体的名字").SendMessage("函数名"); //能调用public和private类型函数第三种,GameObject.Find("脚本所在的物体的名字").Ge ...
分类:编程语言   时间:2016-06-09 00:39:57    阅读次数:444
546条   上一页 1 ... 23 24 25 26 27 ... 55 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!