diff --git a/cocos/platform/CCFileUtils.cpp b/cocos/platform/CCFileUtils.cpp index 687065359dcd..c91b95a4efe3 100644 --- a/cocos/platform/CCFileUtils.cpp +++ b/cocos/platform/CCFileUtils.cpp @@ -846,6 +846,7 @@ void FileUtils::setWritablePath(const std::string& writablePath) void FileUtils::setDefaultResourceRootPath(const std::string& path) { _defaultResRootPath = path; + this->addSearchPath(_defaultResRootPath,true); } void FileUtils::setSearchPaths(const std::vector& searchPaths) diff --git a/quick/framework/cc/uiloader/CCSUILoader2.lua b/quick/framework/cc/uiloader/CCSUILoader2.lua index 55f2ab9a6980..7e847430ca4c 100644 --- a/quick/framework/cc/uiloader/CCSUILoader2.lua +++ b/quick/framework/cc/uiloader/CCSUILoader2.lua @@ -86,8 +86,14 @@ function CCSUILoader:generateUINode(jsonNode, parent) uiNode:setRotation(jsonNode.Rotation or 0) uiNode:setSkewX(jsonNode.RotationSkewX or 0) uiNode:setSkewY(jsonNode.RotationSkewY or 0) - - -- uiNode:setVisible(jsonNode.visible) -- ccs havn't export visible attribute + + + if jsonNode.VisibleForFrame==nil then --增加 visible 参数 + jsonNode.visible=true + else + jsonNode.visible=jsonNode.VisibleForFrame + end + uiNode:setVisible(jsonNode.visible) -- ccs visible attribute if jsonNode.Scale then uiNode:setScaleX((jsonNode.Scale.ScaleX or 1) * uiNode:getScaleX()) uiNode:setScaleY((jsonNode.Scale.ScaleY or 1) * uiNode:getScaleY())