BRT_BuildReportWindow.InitGUISkin C# (CSharp) Method

InitGUISkin() private method

private InitGUISkin ( ) : void
return void
    void InitGUISkin()
    {
        string guiSkinToUse = DEFAULT_GUI_SKIN_FILENAME;
        if (EditorGUIUtility.isProSkin)
        {
            guiSkinToUse = DARK_GUI_SKIN_FILENAME;
        }

        // try default path
        _usedSkin = AssetDatabase.LoadAssetAtPath(BuildReportTool.Options.BUILD_REPORT_TOOL_DEFAULT_PATH + "/GUI/" + guiSkinToUse, typeof(GUISkin)) as GUISkin;

        if (_usedSkin == null)
        {
        #if BRT_SHOW_MINOR_WARNINGS
            Debug.LogWarning(BuildReportTool.Options.BUILD_REPORT_PACKAGE_MOVED_MSG);
        #endif

            string folderPath = BuildReportTool.Util.FindAssetFolder(Application.dataPath, BuildReportTool.Options.BUILD_REPORT_TOOL_DEFAULT_FOLDER_NAME);
            if (!string.IsNullOrEmpty(folderPath))
            {
                folderPath = folderPath.Replace('\\', '/');
                int assetsIdx = folderPath.IndexOf("/Assets/");
                if (assetsIdx != -1)
                {
                    folderPath = folderPath.Substring(assetsIdx+8, folderPath.Length-assetsIdx-8);
                }
                //Debug.Log(folderPath);

                _usedSkin = AssetDatabase.LoadAssetAtPath("Assets/" + folderPath + "/GUI/" + guiSkinToUse, typeof(GUISkin)) as GUISkin;
            }
            else
            {
                Debug.LogError(BuildReportTool.Options.BUILD_REPORT_PACKAGE_MISSING_MSG);
            }
            //Debug.Log("_usedSkin " + (_usedSkin != null));
        }
    }