Unity游戏开发有哪些技巧

Unity游戏开发有哪些技巧
低成本多开工程
windows下:符号链接Assets、ProjectSetting、Library/metadata、Library/AtlasCache、Library/ShaderCache
osx下:Assets不能是符号链接,so,创建一个Assets文件夹,然后链接主工程Assets下的所有文件夹跟文件,其他一样

非运行时驱动GameView窗口的OnGUI
一般情况下,非运行时GameView的OnGUI事件是不派发的。就是你在OnGUI里写了依赖了EventType.MouseDown之类的输入事件都是没法运行的。
但是如果一个带有Inspector的场景对象数据改变了的话,GameView就会刷新一帧。所以,在OnGUI里修改一下position再改回来,GameView就会刷新啦

    //hack:触发一次position的修改->引发inspector更新->引发GameView刷新->驱动OnGUI事件派发
    {
        var old = this.transform.position;
        var dirtyPos = old + Vector3.one;
        this.transform.position = dirtyPos;
        this.transform.position = old;
    }

http://www.duopintech.com/
http://www.duopintech.com/wap/
http://www.duopintech.com/index.html
http://www.duopintech.com/about.html
http://www.duopintech.com/videoshow.html
http://www.duopintech.com/contact.html
http://duopintech.com/

猜你喜欢

转载自blog.csdn.net/seoandsem/article/details/88418036