mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Initial commit
This commit is contained in:
commit
3c7cc0c973
8391 changed files with 704313 additions and 0 deletions
|
@ -0,0 +1,33 @@
|
|||
using System.Text;
|
||||
using UnityEngine.Playables;
|
||||
|
||||
namespace UnityEditor.Timeline
|
||||
{
|
||||
static class DisplayNameHelper
|
||||
{
|
||||
static readonly string k_NoAssetDisplayName = L10n.Tr("<No Asset>");
|
||||
static readonly string k_ReadOnlyDisplayName = L10n.Tr("[Read Only]");
|
||||
static readonly StringBuilder k_StringBuilder = new StringBuilder();
|
||||
|
||||
public static string GetDisplayName(ISequenceState sequence)
|
||||
{
|
||||
string displayName = sequence.director != null ? GetDisplayName(sequence.director) : GetDisplayName(sequence.asset);
|
||||
if (sequence.asset != null && sequence.isReadOnly)
|
||||
displayName += " " + k_ReadOnlyDisplayName;
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public static string GetDisplayName(PlayableAsset asset)
|
||||
{
|
||||
return asset != null ? asset.name : k_NoAssetDisplayName;
|
||||
}
|
||||
|
||||
public static string GetDisplayName(PlayableDirector director)
|
||||
{
|
||||
k_StringBuilder.Length = 0;
|
||||
k_StringBuilder.Append(GetDisplayName(director.playableAsset));
|
||||
k_StringBuilder.Append(" (").Append(director.name).Append(')');
|
||||
return k_StringBuilder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue