background preloader

Unity

Facebook Twitter

Now in Unity Asset Store. Unity3d 网站3DEM走了,但3DEM仍然可在这里. Unity3d Terragen 免费的场景产生器. Unity Game Engine Tutorials and Resources. Unity 3D Plug-in for Android 開發指南. 這是一個摸索筆記。

Unity 3D Plug-in for Android 開發指南

以下是正文。 一. Unity3D Plug-in 必須知道的概念 Unity 的 Plug-in 是以二進位存在的,所以,在不同的平台上,必須開發不同的 Plug-in,例如,在 PC Windows 平台,使用 dll 檔,在 Android 系統,使用 .so 檔。 在使用 Unity 開發專案時,因為是在 PC Windows 平台上操作,所以當使用了 Android 的 .so 檔時,會造成無法在 Unity Editor 中即時操作遊戲的問題。 二. Unity 的官方文件,是建議將 Plug-in 複製到專案的 Assets/Plugins/Android 目錄下,如果沒這個目錄,就自行建立一個。 所以,就是將寫好編譯好的 .so 檔,複製到這個目錄下就可。 官方文件上有一個模稜兩可的說法,說 Plug-in 安裝後,Unity 會自動抓出其中的 Java Class 什麼的,不要相信它,因為完全試不出來。 三. .so 檔複製到專案以後,是無法取得任何資料的。 官方網站上有一個可以參考的範例,"AndroidNativePlugin.zip",可以下載來參考。 Zip 檔解開後,將 unity package import 進 Unity Editor,可以抓到 .so 檔,原始程式碼,以及使用 Plug-in 的 C# Script。 C# Script 如下 (已經改過了) using UnityEngine; Unity game development.

Code Optimization in Unity : Part 1. “Code Optimization” : the pursuit of modifying code to work more efficiently.

Code Optimization in Unity : Part 1

Optimizing code in general can be a controversial subject, and upon wading into the topic even ankle-deep, you are bound to encounter the well-known quote, “Premature optimization is the root of all evil”. It’s from a 1974 paper by Donald Knuth, in which he warns programmers against wasting “…enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs”. * This is good advice, and experienced programmers understand it. The specific goals of optimization in Unity tend to revolve around making your game run faster so that it plays at an acceptable rate. For a game to run at an acceptable speed, it needs to reach a certain acceptable number of “Frames Per Second”. Understanding and identifying the relative sizes of the costs in your project is a crucial first step.

I can give you a couple of examples using the profiler which comes with the Pro version of Unity: Code Optimization in Unity : Part 2. “By measurement to knowledge” So, in part 1 we saw a few examples of the output from the Profiler window in Unity Pro.

Code Optimization in Unity : Part 2

If you have Pro, this built-in profiler can be incredibly useful in determining whether your code is taking up a significant amount of time, and if so, which scripts and functions in particular are responsible. There are also other professional code profilers available for other development environments, such as Red Gate’s “ANTS” which will literally give you a speed recording for every line of code in your project. These types of tools are invaluable if you have the budget for them, but many don’t have access to such tools, particularly beginners and budding indie developers. However, all is not lost – it’s actually possible to measure the speed of your own code within the code itself. In a nutshell, you can achieve this by simply recording the time before and after the code is executed. Now we’re getting somewhere. The next example does just this. Like this: Unity3d 水下特效 UnderwaterEffects.js. Unity3d 虚拟现实在各行业的应用. Unity3D 3.5 结合 Kinect SDK1.6.

安装几个东西: 1 unity3D SDK 安装后选择free版 2 kinect SDK 目前我用的是1.6版本,在 3 Kinect Wrapper Package for Unity3D 用于以后在创建每个工程时进行导入 4 测试工程例如newKinect 5修改KinectInterop.cs和KinectSensor.cs这两个在导入上面3时用到的文件 这两个文件因为写的比较早,引用的是1.0版SDK之前的DLL,现在我们要做的就是修改这些DLL引用到新的DLL,具体来说: KinectInterop.cs using System; using System.Collections.Generic;

unity3D 3.5 结合 Kinect SDK1.6