![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
unity3d
kong5461
这个作者很懒,什么都没留下…
展开
-
create Scene using script
EditorApplication.SaveScene("Assets/aaa.unity");原创 2014-04-14 13:24:55 · 524 阅读 · 0 评论 -
unity--通过部件名称的子字符串找到部件
function ToggleRenderersWithSubName(theName : String, state:boolean){ for(var gameObj : GameObject in GameObject.FindObjectsOfType(GameObject)){if(gameObj.name.Contains("[243274]")原创 2014-04-16 17:01:40 · 1539 阅读 · 0 评论 -
BuildAssetBundle with .FBX
BuildPipeline.PushAssetDependencies();BuildPipeline.BuildAssetBundle(AssetDatabase.LoadMainAssetAtPath("Assets/hoty.FBX"),null, "hoty.unity3d", BuildAssetBundleOptions.CollectDependencies | Buil原创 2014-04-16 01:56:39 · 1267 阅读 · 0 评论 -
从.fbx 到生成web版执行文件,完全不用unity集成开发环境
1. 工程建立到 "e:/danny/hhh",把文件夹Editor和.fbx文件及Test.cs拷贝到 "e:/danny/hhh/Assets"2. C:\Program Files\Unity\Editor\Unity.exe -quit -batchmode -createProject "e:/danny/hhh" 执行此命令后,.fbx会自动import。3. Unit原创 2014-04-16 17:12:27 · 2634 阅读 · 0 评论 -
unity assetBundle使用image材质
BuildPipeline.BuildAssetBundle(AssetDatabase.LoadMainAssetAtPath("Assets/rac_basic_sample_project2.FBX"),null, "rac_basic_sample_project2.unity3d", BuildAssetBundleOptions.CollectDependencies | Bu原创 2014-04-21 09:51:52 · 1097 阅读 · 0 评论 -
make wall not penetratable
void Update () { var fwd = transform.TransformDirection (Vector3.up);if(Input.GetKey(KeyCode.UpArrow)){if (!(Physics.Raycast (transform.position, fwd, (float)0.2))) {gameObject.transform.T原创 2014-05-10 15:24:09 · 669 阅读 · 0 评论 -
把"Assets/Resources/mats" 和“"Assets/Resources"下的图片文件全部编译成assetBundle
static void ExportAssetBundles() { string path = "Resources/mats/";string [] fileEntries = Directory.GetFiles(Application.dataPath+"/"+path);foreach(string fileName in fileEntries) {string fi原创 2014-04-26 10:21:32 · 666 阅读 · 0 评论 -
unity load .fbx and image files automatically
using UnityEngine;using UnityEditor;using System.IO;public class MyEditorScript {[@MenuItem("Asset/Build AssetBundles From Directory of Files")]static void MyMethod () { ExportAssetB原创 2014-04-14 11:39:29 · 701 阅读 · 0 评论 -
漫游
现在要做的事情是人在场景中man原创 2014-05-12 20:10:34 · 654 阅读 · 0 评论