private string GetTooltip(string assetGUID)
        {
            string text;

            if (!this.m_Cache.TryGetTooltipForGUID(assetGUID, out text))
            {
                List <string> locksNamesOnAsset = SoftLockUIData.GetLocksNamesOnAsset(assetGUID);
                string        text2             = (!SoftLockData.IsPrefab(assetGUID)) ? "Unpublished changes by:" : "Unpublished Prefab changes by:";
                text = text2;
                foreach (string current in locksNamesOnAsset)
                {
                    text = text + " \n •  " + current + " ";
                }
                this.m_Cache.StoreTooltipForGUID(assetGUID, text);
            }
            return(text);
        }
Exemple #2
0
        // Returns a string formatted as a vertical list of names with a heading.
        private string GetTooltip(string assetGUID)
        {
            string formattedText;

            if (!m_Cache.TryGetTooltipForGUID(assetGUID, out formattedText))
            {
                List <string> softLockNames     = SoftLockUIData.GetLocksNamesOnAsset(assetGUID);
                string        tooltipHeaderText = (SoftLockData.IsPrefab(assetGUID) ? k_TooltipPrefabHeader : k_TooltipHeader);
                formattedText = tooltipHeaderText;

                foreach (string name in softLockNames)
                {
                    formattedText += k_TooltipNamePrefix + name + " ";
                }
                m_Cache.StoreTooltipForGUID(assetGUID, formattedText);
            }
            return(formattedText);
        }