- 博客(29)
- 收藏
- 关注
原创 Unity 获得Log
Application.LogCallbackApplication.logMessageReceived or Application.logMessageReceivedThreaded 两者的区别是前者指接受来自unity自身主线程的log. 后者同时可以接受到别的线程的Log.using UnityEngine;using
2015-10-01 11:54:30
1151
1
原创 Unity3D TerrainSurface Shader
Shader "TerrainSurface"{Properties{_Mask ("Mask", 2D) = "black" {}_MainTex ("Albedo 0", 2D) = "white" {}_MainTex2 ("Albedo 1", 2D) = "white" {}_NormalMap ("NormalMap 0", 2D) = "bump"
2015-09-01 14:33:33
2270
转载 T4M在Unity5中运行出错修改
- Import the T4m package and accept the automatic script updating.- Find "T4M 4 Textures.shader" (T4M/Shaders/ShaderModel2/Diffuse)- Edit shader above adding at the end of line 17 "nolightmap"
2015-08-27 20:27:51
6046
转载 Unity中的Path对应各平台中的Path
OS:Application.dataPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/DataApplication.streamingAssetsPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app
2015-08-27 16:55:42
377
转载 Load Asset Bundle in Editor
public class DecryptAssetBundle : EditorWindow { private string assetURL = ""; private static WWW request; private static bool run = false; private static IEnumerator en = null; [Me
2015-08-18 16:45:15
835
转载 unity跨线程操作的问题
/* Copyright (c) 2015 3shine.com * Anthor:penguin_ku(十月) * DateTime:2015/5/3 22:35:41 * FileName:MainTaskProcessor * MachineName: win8.1-04020905 * Version:V1.0.0.0 * * Function: * 1、
2015-08-18 10:07:17
758
转载 ulua
http://bbs.ulua.org/dispbbs.asp?boardid=3&Id=24http://bbs.ulua.org/dispbbs.asp?boardid=2&Id=27
2015-08-10 16:24:20
379
转载 Unity中可用Lua版本效率分析比较
Unity中可用Lua版本效率分析比较欢迎来到你的代码我的鱼,oooofish.com,本篇文章主要介绍Unity中可用的lua版本对比及分析。目前常见的unity lua库有以下:luainterface、ulua、nlua、unilua简单介绍luainterface: C#的lua桥接库作者Craig Presti项目位置:https://
2015-08-07 16:29:30
701
原创 C# coding-guidelines
http://www.mono-project.com/community/contributing/coding-guidelines/
2015-08-07 16:17:20
352
转载 "Optimize Game Objects" in ModelImporter inspector
MECANIM IMPROVEMENTSAdd a new option "Optimize Game Objects" in ModelImporter inspector. In short, this makes character rigs much faster.When turned on, the game object transform hierarchy
2015-08-06 17:20:34
1528
转载 C# MemoryStream和BinaryFormatter
本文来自优快云博客,出处:http://blog.youkuaiyun.com/ljincheng/archive/2008/03/26/2220499.aspx编程访问文件是通过文件流对象进行的,当应用程序需要访问文件时,必须先创建一个文件流对象,此流对象和文件是一一对应关系。在.NET中,使用抽象基类System.IO.Stream代表流,它提供Read和Write两个方法。由于数据流的有序
2015-08-06 10:14:22
426
转载 C# Serializable
C# SerializableSystem.SerializableAttribute串行化是指存储和获取磁盘文件、内存或其他地方中的对象。在串行化时,所有的实例数据都保存到存储介质上,在取消串行化时,对象会被还原,且不能与其原实例区别开来。只需给类添加Serializable属性,就可以实现串行化实例的成员。并行化是串行化的逆过程,数据从存储介质中读取出来
2015-08-05 14:17:17
409
转载 Unity3D Mesh.bindposes
//The Bind Pose Matrices allow a raw vertex of the mesh (in local coordinates) to be transformed into world-space// and then to each bone's local coordinate space, after which each bone's animation
2015-08-03 14:45:59
3575
原创 Editor中侦听 Hierarchy 中发生变化
当hierarchy 中有物体被创建,重命名,改变父子关系或者被销毁时EditorApplication.hierarchyWindowChangedusing UnityEditor;using UnityEngine;public class ExampleCode { [MenuItem ("Example/Hierarchy Window Changed")
2015-07-22 20:55:10
687
翻译 unity3d calculatepath
NavMesh.CalculatePathpublic static function CalculatePath(sourcePosition:Vector3,targetPosition:Vector3,areaMask: int,path:NavMeshPath): bool; ParameterssourcePos
2015-07-15 12:01:34
1843
转载 托管代码 VS 非托管代码
什么是托管代码(managed code)? 托管代码是一microsoft的中间语言(IL),他主要的作用是在.NET FRAMEWORK的公共语言运行库(CLR)执行代码前去编译源代码,也就是说托管代码充当着翻译的作用,源代码在运行时分为两个阶段: 1.源代码编译为托管代码,(所以源代码可以有很多种,如VB,C#,J#) 2.托管代码编译为micros
2015-07-15 10:43:57
682
转载 IEnumerable与IEnumerator在C#中的使用
一、示例:在C#中,凡是实现了IEnumerator接口的数据类型都可以用foreach语句进行迭代访问,可是,对于自定义类型如何实现这个接口以支持foreach的迭代呢? * 要实现这个功能,先来看看IEnumerable和IEnumerator接口的定义:public interface IEnumerable{ //IEnumerable只有一个方法,返
2015-07-12 14:31:58
385
原创 VS2013 自动生成 get set
private string _value;//定义变量//将上面定义好的变量,用鼠标将private string _value; 这段代码选中,然后按快捷键:Ctrl+r+e,这时会弹出一个小的窗体,直接按确定,再弹出一个小窗体,在按确定。页面上自动会在刚定义的私有变量下出现公有的变量,里面有get、set方面:public string Value{get { return
2015-07-07 15:19:22
2038
原创 Unity3D Editor在右键弹出菜单中添加 item
[MenuItem("Assets/StuffDoSomething")] static void DoubleMass(MenuCommand command) { }
2015-07-07 14:28:22
2435
转载 Unity3D expand hierachry by code
public static void SetExpandedRecursive(GameObject go, bool expand) { var type = typeof(EditorWindow).Assembly.GetType("UnityEditor.SceneHierarchyWindow"); var methodInfo = type
2015-07-07 11:33:34
929
原创 Unity3D Lights
光照的两种方式: 一、基于顶点的。 二、基于像素的。 第一种开销小,但是功能少。第二少开销大,功能多,效果好。 Lights can be rendered using either of two methods:Vertex lighting calculates the illumination only at the vertices
2015-07-06 15:53:31
507
原创 Unity3D 资源路径
On a desktop computer (Mac OS or Windows) the location of the files can be obtained with the following code: path = Application.dataPath + "/StreamingAssets";On iOS, you should use: path =
2015-07-06 11:11:56
425
原创 Unity3D 获得GameObjectHierarchy 中的全路径
方式一、privatestaticstringGetGameObjectPath(Transform transform){string path= transform.name;while(transform.parent!=null){transform = transform.parent;path = transform.name
2015-07-03 09:59:24
3868
原创 unity3D 根据所在文件夹自动设置一些属性
12131415161718usingUnityEngine;usingSystem.Collections;usingUnityEditor;usingSystem.IO; publicclass Post:AssetPostprocessor
2015-07-02 15:12:43
606
原创 Unity里面三角面数
unity里面三角面数为stats上显示的数值减去2. 可以用一个cube测试。 一个cube 12个三角面。上面显示的14.
2015-07-02 14:19:24
2915
原创 AS3 复制Object
public static function copy(value:Object):Object { var buffer:ByteArray = new ByteArray(); buffer.writeObject(value); buffer.position = 0; var result:Object =
2015-07-01 18:08:03
523
转载 FLex 4.0 Module里面Alert.show();出错问题
from:http://blog.youkuaiyun.com/jiangyu198558/article/details/7004964解决办法:在Application文件里添加import mx.managers.PopUpManager;private var pop:PopUpManager=new PopUpManager();即可同时Alert.show("t
2015-07-01 16:29:39
403
转载 Flex warning: unable to bind to property 'name' on class 'Object' (class is not an IEventDispatcher)
If you have built a custom item renderer for a DataGroup or List you may have come across warnings in your Flash Builder console output similar to this:warning: unable to bind to property
2015-07-01 16:21:18
813
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人