예제 #1
0
        private bool DrawAssetToggle(StoredAsset asset, DrawFlag draw)
        {
            StringBuilder sb = new StringBuilder();

            if ((draw & DrawFlag.publisher) == DrawFlag.publisher)
                sb.AppendFormat("{0} | ", asset.publisher);

            if ((draw & DrawFlag.category) == DrawFlag.category)
                sb.AppendFormat("{0} / ", asset.category);

            if ((draw & DrawFlag.name) == DrawFlag.name)
                sb.AppendFormat("{0} ", asset.name);

            if ((draw & DrawFlag.version) == DrawFlag.version)
                sb.AppendFormat("[{0}] ", asset.version);

            if ((draw & DrawFlag.size) == DrawFlag.size)
                sb.AppendFormat("({0} Mb)", asset.size);

            return GUILayout.Toggle(asset.selected, sb.ToString());
        }