コード例 #1
0
    void _OpenBuildInfo(string filepath)
    {
        if (string.IsNullOrEmpty(filepath))
        {
            return;
        }

        _finishedOpeningFromThread = false;
        GetValueMessage            = "Opening...";
        BuildReportTool.BuildInfo loadedBuild = BuildReportTool.Util.OpenSerializedBuildInfo(filepath, false);


        if (BuildReportTool.Util.BuildInfoHasContents(loadedBuild))
        {
            _buildInfo = loadedBuild;
            _lastOpenedBuildInfoFilePath = filepath;
        }
        else
        {
            Debug.LogError("Build Report Tool: Invalid data in build info file: " + filepath);
        }

        _finishedOpeningFromThread = true;

        GetValueMessage = "";
    }
コード例 #2
0
    void OnEnable()
    {
        //Debug.Log("BuildReportWindow.OnEnable() " + System.DateTime.Now);

#if UNITY_5_6_OR_NEWER
        wantsMouseEnterLeaveWindow = true;
#endif
        wantsMouseMove = true;

        IsOpen = true;

        InitGUISkin();


        if (BuildReportTool.Util.BuildInfoHasContents(_buildInfo))
        {
            //Debug.Log("recompiled " + _buildInfo.SavedPath);
            if (!string.IsNullOrEmpty(_buildInfo.SavedPath))
            {
                BuildReportTool.BuildInfo loadedBuild = BuildReportTool.Util.OpenSerializedBuildInfo(_buildInfo.SavedPath);
                if (BuildReportTool.Util.BuildInfoHasContents(loadedBuild))
                {
                    _buildInfo = loadedBuild;
                }
            }
            else
            {
                if (_buildInfo.HasUsedAssets)
                {
                    _buildInfo.UsedAssets.AssignPerCategoryList(
                        BuildReportTool.ReportGenerator.SegregateAssetSizesPerCategory(_buildInfo.UsedAssets.All,
                                                                                       _buildInfo.FileFilters));
                }

                if (_buildInfo.HasUnusedAssets)
                {
                    _buildInfo.UnusedAssets.AssignPerCategoryList(
                        BuildReportTool.ReportGenerator.SegregateAssetSizesPerCategory(_buildInfo.UnusedAssets.All,
                                                                                       _buildInfo.FileFilters));
                }
            }
        }

        // lol wtf have I done
        _usedAssetsScreen.SetListToDisplay(BuildReportTool.Window.Screen.AssetList.ListToDisplay.UsedAssets);
        _unusedAssetsScreen.SetListToDisplay(BuildReportTool.Window.Screen.AssetList.ListToDisplay.UnusedAssets);

        _overviewScreen.RefreshData(_buildInfo);
        _buildSettingsScreen.RefreshData(_buildInfo);
        _sizeStatsScreen.RefreshData(_buildInfo);
        _usedAssetsScreen.RefreshData(_buildInfo);
        _unusedAssetsScreen.RefreshData(_buildInfo);

        _optionsScreen.RefreshData(_buildInfo);
        _helpScreen.RefreshData(_buildInfo);
    }
コード例 #3
0
    void OnEnable()
    {
        //LogMgr.Ins.LogInfo("BuildReportWindow.OnEnable() " + System.DateTime.Now);


        IsOpen = true;

        InitGUISkin();


        if (BuildReportTool.Util.BuildInfoHasContents(_buildInfo))
        {
            //LogMgr.Ins.LogInfo("recompiled " + _buildInfo.SavedPath);
            if (!string.IsNullOrEmpty(_buildInfo.SavedPath))
            {
                BuildReportTool.BuildInfo loadedBuild = BuildReportTool.Util.OpenSerializedBuildInfo(_buildInfo.SavedPath);
                if (BuildReportTool.Util.BuildInfoHasContents(loadedBuild))
                {
                    _buildInfo = loadedBuild;
                }
            }
            else
            {
                if (_buildInfo.HasUsedAssets)
                {
                    _buildInfo.UsedAssets.AssignPerCategoryList(BuildReportTool.ReportGenerator.SegregateAssetSizesPerCategory(_buildInfo.UsedAssets.All, _buildInfo.FileFilters));
                }
                if (_buildInfo.HasUnusedAssets)
                {
                    _buildInfo.UnusedAssets.AssignPerCategoryList(BuildReportTool.ReportGenerator.SegregateAssetSizesPerCategory(_buildInfo.UnusedAssets.All, _buildInfo.FileFilters));
                }
            }
        }

        // lol wtf have I done
        usedAssetsScreen.SetListToDisplay(BuildReportTool.Window.Screen.AssetList.ListToDisplay.UsedAssets);
        unusedAssetsScreen.SetListToDisplay(BuildReportTool.Window.Screen.AssetList.ListToDisplay.UnusedAssets);

        overviewScreen.RefreshData(_buildInfo);
        buildSettingsScreen.RefreshData(_buildInfo);
        sizeStatsScreen.RefreshData(_buildInfo);
        usedAssetsScreen.RefreshData(_buildInfo);
        unusedAssetsScreen.RefreshData(_buildInfo);

        optionsScreen.RefreshData(_buildInfo);
        helpScreen.RefreshData(_buildInfo);
    }
コード例 #4
0
	public static int GetIdxFromBuildReportValues(BuildInfo buildReportToDisplay)
	{
		BuildSettingCategory b = ReportGenerator.GetBuildSettingCategoryFromBuildValues(buildReportToDisplay);

		switch (b)
		{
			case BuildSettingCategory.WindowsDesktopStandalone:
				return 0;
			case BuildSettingCategory.MacStandalone:
				return 1;
			case BuildSettingCategory.LinuxStandalone:
				return 2;

			case BuildSettingCategory.WebPlayer:
				return 3;
			case BuildSettingCategory.WebGL:
				return 4;

			case BuildSettingCategory.iOS:
				return 5;
			case BuildSettingCategory.Android:
				return 6;
			case BuildSettingCategory.Blackberry:
				return 7;

			case BuildSettingCategory.Xbox360:
				return 8;
			case BuildSettingCategory.XboxOne:
				return 9;
			case BuildSettingCategory.PS3:
				return 10;
			case BuildSettingCategory.PS4:
				return 11;

			case BuildSettingCategory.PSVita:
				return 12;

			case BuildSettingCategory.SamsungTV:
				return 13;
		}
		return -1;
	}
コード例 #5
0
    void _OpenBuildInfo(string filepath)
    {
        if (string.IsNullOrEmpty(filepath))
        {
            return;
        }

        _finishedOpeningFromThread = false;
        GetValueMessage            = "Opening...";
        BuildReportTool.BuildInfo loadedBuild = BuildReportTool.Util.OpenSerializedBuildInfo(filepath, false);

        if (BuildReportTool.Util.BuildInfoHasContents(loadedBuild))
        {
            _buildInfo = loadedBuild;
            _lastOpenedBuildInfoFilePath = filepath;
        }
        else
        {
            Debug.LogError("Build Report Tool: Invalid data in build info file: " + filepath);
        }


        var assetDependenciesFilePath = BuildReportTool.Util.GetAssetDependenciesFilenameFromBuildInfo(filepath);

        if (System.IO.File.Exists(assetDependenciesFilePath))
        {
            var loadedAssetDependencies = BuildReportTool.Util.OpenSerializedAssetDependencies(assetDependenciesFilePath);
            if (loadedAssetDependencies != null)
            {
                _assetDependencies = loadedAssetDependencies;
            }
        }

        _finishedOpeningFromThread = true;

        GetValueMessage = "";
    }
コード例 #6
0
    public void Init(BuildReportTool.BuildInfo buildInfo)
    {
        _buildInfo = buildInfo;

        minSize = new Vector2(903, 378);
    }
コード例 #7
0
	void _OpenBuildInfo(string filepath)
	{
		if (string.IsNullOrEmpty(filepath))
		{
			return;
		}

		_finishedOpeningFromThread = false;
		GetValueMessage = "Opening...";
		BuildReportTool.BuildInfo loadedBuild = BuildReportTool.Util.OpenSerializedBuildInfo(filepath, false);


		if (BuildReportTool.Util.BuildInfoHasContents(loadedBuild))
		{
			_buildInfo = loadedBuild;
			_lastOpenedBuildInfoFilePath = filepath;
			//RefreshConfiguredFileFilters();
		}
		else
		{
			Debug.LogError("Build Report Tool: Invalid data in build info file: " + filepath);
		}

		_finishedOpeningFromThread = true;

		GetValueMessage = "";
	}
コード例 #8
0
	void OnEnable()
	{
		//Debug.Log("BuildReportWindow.OnEnable() " + System.DateTime.Now);

		_saveTypeLabels = new string[] {SAVE_PATH_TYPE_PERSONAL_OS_SPECIFIC_LABEL, SAVE_PATH_TYPE_PROJECT_LABEL};

		_selectedCalculationLevelIdx = GetCalculationLevelGuiIdxFromOptions();
		IsOpen = true;

		InitGUISkin();
		InitHelpContents();

		RefreshConfiguredFileFilters();

		if (BuildReportTool.Util.BuildInfoHasContents(_buildInfo))
		{
			//Debug.Log("recompiled " + _buildInfo.SavedPath);
			if (!string.IsNullOrEmpty(_buildInfo.SavedPath))
			{
				BuildReportTool.BuildInfo loadedBuild = BuildReportTool.Util.OpenSerializedBuildInfo(_buildInfo.SavedPath);
				if (BuildReportTool.Util.BuildInfoHasContents(loadedBuild))
				{
					_buildInfo = loadedBuild;
					RefreshConfiguredFileFilters();
				}
			}
			else
			{
				_buildInfo.UsedAssets.AssignPerCategoryList( BuildReportTool.ReportManager.SegregateAssetSizesPerCategory(_buildInfo.UsedAssets.All, _buildInfo.FileFilters) );
				_buildInfo.UnusedAssets.AssignPerCategoryList( BuildReportTool.ReportManager.SegregateAssetSizesPerCategory(_buildInfo.UnusedAssets.All, _buildInfo.FileFilters) );
			}
		}
	}
コード例 #9
0
	public void Init(BuildReportTool.BuildInfo buildInfo)
	{
		_buildInfo = buildInfo;
	}
コード例 #10
0
    void OnEnable()
    {
        //Debug.Log("BuildReportWindow.OnEnable() " + System.DateTime.Now);

        IsOpen = true;

        InitGUISkin();

        if (BuildReportTool.Util.BuildInfoHasContents(_buildInfo))
        {
            //Debug.Log("recompiled " + _buildInfo.SavedPath);
            if (!string.IsNullOrEmpty(_buildInfo.SavedPath))
            {
                BuildReportTool.BuildInfo loadedBuild = BuildReportTool.Util.OpenSerializedBuildInfo(_buildInfo.SavedPath);
                if (BuildReportTool.Util.BuildInfoHasContents(loadedBuild))
                {
                    _buildInfo = loadedBuild;
                }
            }
            else
            {
                if (_buildInfo.HasUsedAssets)
                {
                    _buildInfo.UsedAssets.AssignPerCategoryList( BuildReportTool.ReportGenerator.SegregateAssetSizesPerCategory(_buildInfo.UsedAssets.All, _buildInfo.FileFilters) );
                }
                if (_buildInfo.HasUnusedAssets)
                {
                    _buildInfo.UnusedAssets.AssignPerCategoryList( BuildReportTool.ReportGenerator.SegregateAssetSizesPerCategory(_buildInfo.UnusedAssets.All, _buildInfo.FileFilters) );
                }
            }
        }

        // lol wtf have I done
        usedAssetsScreen.SetListToDisplay(BuildReportTool.Window.Screen.AssetList.ListToDisplay.UsedAssets);
        unusedAssetsScreen.SetListToDisplay(BuildReportTool.Window.Screen.AssetList.ListToDisplay.UnusedAssets);

        overviewScreen.RefreshData(_buildInfo);
        buildSettingsScreen.RefreshData(_buildInfo);
        sizeStatsScreen.RefreshData(_buildInfo);
        usedAssetsScreen.RefreshData(_buildInfo);
        unusedAssetsScreen.RefreshData(_buildInfo);

        optionsScreen.RefreshData(_buildInfo);
        helpScreen.RefreshData(_buildInfo);
    }
コード例 #11
0
    public void Init(BuildReportTool.BuildInfo buildInfo)
    {
        _buildInfo = buildInfo;

        minSize = new Vector2(903, 378);
    }
コード例 #12
0
ファイル: BRT_Util.cs プロジェクト: Avatarchik/card
 public static bool BuildInfoHasContents(BuildInfo n)
 {
     return(n != null && n.HasContents);
 }