Install node.js with nvm

nvm

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.2/install.sh | bash

nvm install stable

Install hero

hexo
hexo docs

npm config set registry http://registry.cnpmjs.org 
or
npm install -g hexo-cli --registry=http://r.cnpmjs.org 

$ hexo init <folder>
$ cd <folder>
$ npm install

常用命令

hexo clean

hexo generate

hexo deploy

Deploy With Git

$ npm install hexo-deployer-git --save

deploy:
    type: git
    repo: <repository url>
    branch: [branch]

_config.xml 严格的格式要求
注意 : 后面有个空格

博客地址: https://daaoling.github.io/

参考

Hexo常见问题解决方案

https://zhuanlan.zhihu.com/p/22498474

注释和共享

原来把allowSceneActivation设置为false后,Unity就只会加载场景到90%,
剩下的10%要等到allowSceneActivation设置为true后才加载,这不得不说是一个坑。
所以代码改为如下。
当AsyncOperation.progress到达0.9后,就直接把进度条的数值更新为100%,
然后设置AsyncOperation.allowSceneActivation为ture,让Unity继续加载未完成的场景。

private IEnumerator StartLoading_4() {
    int displayProgress = 0;
    int toProgress = 0;
    AsyncOperation op = Application.LoadLevelAsync(1);
    op.allowSceneActivation = false;
    while(op.progress < 0.9f) {
        toProgress = (int)op.progress * 100;
        while(displayProgress < toProgress) {
            ++displayProgress;
            SetLoadingPercentage(displayProgress);
            yield return new WaitForEndOfFrame();
        }
    }

    toProgress = 100;
    while(displayProgress < toProgress){
        ++displayProgress;
        SetLoadingPercentage(displayProgress);
        yield return new WaitForEndOfFrame();
    }
    op.allowSceneActivation = true;
}

Unity3d中制作Loading场景进度条所遇到的问题

http://answers.unity3d.com/questions/934354/loadlevelasync-stops-at-90.html

http://answers.unity3d.com/questions/377666/how-do-you-use-asyncoperationallowsceneactivation.html

http://unity3d-book.blogspot.jp/2014/03/unity3d-preloading-scenes-with.html

注释和共享

  • 第 1 页 共 1 页

张洁勇

生活在未来,希望在现在


游戏开发工程师


杭州