摘要:
mysql -uroot -prootshow databases;use ltcl_net;show tables;desc tablename; 查看表结构create table test ( id int not null, last_name char(30) not null, first_name char(30) not null, primary key (id), index name (last_name,first_name));name索引是一个对last_name和first_name的索引。索引可以用于为last_name,或者为last_name和first_n 阅读全文
摘要:
GameObject.Find 查找static functionFind(name: string) : GameObjectDescription描述Finds a game object by name and returns it.If no game object with name can be found, null is returned. If name contains a '/' character it will traverse the hierarchy like a path name. This function only returns act 阅读全文
摘要:
在一些Unity脚本的开始经常可以看到 #pragma strict,#pragma downcast、#pragma implicit指令,而有的Unity脚本则没有这些指令,那这些指令有什么作用呢?#pragma strict,此指令的含义是强制输入,也就是我们在声明变量时,需要精确的声明变量是什么类型,而不是让编译器来自己推测变量的类型,因此,也不能随便的使用一个随机的名称并让编译器来为你实例化此变量。例如,在使用此指令后,我们随意声明一个变量:private var bobby;//是不可以的,而需要这样:private var bobby : GameObject;//这个可以通过使 阅读全文
摘要:
// Scroll main texture based on time var scrollSpeed = -0.5; // This must be set to override a bug where Render Order // of the tunnel objects is lost when SetTextureOffset is used var queue = 0; private var offset = 0.0; function Update () { offset = Time.time * scrollSpeed; rende... 阅读全文
摘要:
1、单一文件创建unity3dusing UnityEngine; using UnityEditor; using System.IO; public class BuildAssetBundlesFromDirectory { [@MenuItem("Asset/Build AssetBundles From Directory of Files")] //生成菜单 static void ExportAssetBundles () { // Get the selected directory //获取选择的目... 阅读全文
摘要:
GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced (type:7)GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced (type:8)出现此错误,是由于GUIClips中开始与结束的没一一对应上产生的,比如有一个GUILayout.BeginHorizontal();而后面又没有GUILayout.EndHorizontal();与之对 阅读全文
摘要:
unity3d工程中添加多个相机后出现如下警告:There are 2 audio listeners in the scene. Please ensure there is always exactly one audio listener in the scene.解决办法:将后添加相机的Audio Listener移除. 阅读全文