Files
Magical-Jumping-Bean/Library/metadata/40/40cb137d0e9816e48a4141ed13afedad
T

134 lines
9.2 KiB
Plaintext
Raw Normal View History

2019-09-29 19:40:54 -04:00
í2019.2.3f1þÿÿÿÿÿ’3$øÌuñ옲e+ Í=^7€ÿÿÿÿ¦€²Ð¦¦¦€#¦€+H€3ÿÿÿÿ1€1€ÿÿÿÿ@Þ Q€j
H€<ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jÕ€Iÿÿÿÿ1€1€ÿÿÿÿÀÞH€j€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€j€PAssetMetaDataguiddata[0]data[1]data[2]data[3]pathNameoriginalNamelabelsassetStoreRef ÿÿfš†!ë5˜9Ý4QÁóBí7€ÿÿÿÿ¦€²
E Þ€#.€,5a Þ€#.€,€r Þ€# .€,
H€«€ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jñ€JÿÿÿÿÀ1€1€ÿÿÿÿÞ€j€ÿÿÿÿ\€ÿÿÿÿH€rÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jH€wÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jH€€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jy
 Þ€#!.€,"€…ÿÿÿÿ#@1€1€ÿÿÿÿ$Þ%.€j&Õ€“ÿÿÿÿ'1€1€ÿÿÿÿ(ÀÞ)€j€ÿÿÿÿ*H€›€ÿÿÿÿ+1€1€ÿÿÿÿ,@Þ-Q€j.y
 /Þ€#0.€,1 €§2@¾€¶ 3@Þ€#4.€,5H€»ÿÿÿÿ61€1€ÿÿÿÿ7@Þ8Q€j9H€Æÿÿÿÿ:1€1€ÿÿÿÿ;@Þ<Q€j=H€Øÿÿÿÿ>1€1€ÿÿÿÿ?@Þ@Q€jAMonoImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariantsÿÿ£Gñ×ÜZ56 :!@iÁJ*€7€ÿÿÿÿ¦€²E Þ.(a Þ.€r Þ .
H€«€ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jH€ê€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jñ€=ÿÿÿÿ1€1€ÿÿÿÿÞ€j€ÿÿÿÿH€›€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jy
 Þ.y€Q Þ. Þ€X!H€iÿÿÿÿ"1€1€ÿÿÿÿ#@Þ$Q€j%H€uÿÿÿÿ&1€1€ÿÿÿÿ'@Þ(Q€j)PPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_Namespacepp\ày¯Ðܼ1×à‰aN¨Þ1úÞÚHPackages/com.unity.timeline/Runtime/Utilities/TimelineCreateUtilities.csày¯TimelineCreateUtilitiesIusing System;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace UnityEngine.Timeline
{
static class TimelineCreateUtilities
{
// based off of ObjectNames.GetUniqueName, but can exist in runtime
public static string GenerateUniqueActorName(List<ScriptableObject> tracks, string name)
{
if (!tracks.Exists(x => ((object)x) != null && x.name == name))
return name;
int numberInParentheses = 0;
string baseName = name;
if (!string.IsNullOrEmpty(name) && name[name.Length - 1] == ')')
{
int index = name.LastIndexOf('(');
if (index > 0)
{
string numberString = name.Substring(index + 1, name.Length - index - 2);
if (int.TryParse(numberString, out numberInParentheses))
{
numberInParentheses++;
baseName = name.Substring(0, index);
}
}
}
baseName = baseName.TrimEnd();
for (int i = numberInParentheses; i < numberInParentheses + 5000; i++)
{
if (i > 0)
{
string result = string.Format("{0} ({1})", baseName, i);
if (!tracks.Exists(x => ((object)x) != null && x.name == result))
return result;
}
}
// Fallback
return name;
}
public static void SaveAssetIntoObject(Object childAsset, Object masterAsset)
{
if (childAsset == null || masterAsset == null)
return;
if ((masterAsset.hideFlags & HideFlags.DontSave) != 0)
{
childAsset.hideFlags |= HideFlags.DontSave;
}
else
{
childAsset.hideFlags |= HideFlags.HideInHierarchy;
#if UNITY_EDITOR
if (!AssetDatabase.Contains(childAsset) && AssetDatabase.Contains(masterAsset))
AssetDatabase.AddObjectToAsset(childAsset, masterAsset);
#endif
}
}
public static AnimationClip CreateAnimationClipForTrack(string name, TrackAsset track, bool isLegacy)
{
var timelineAsset = track != null ? track.timelineAsset : null;
var trackFlags = track != null ? track.hideFlags : HideFlags.None;
var curves = new AnimationClip
{
legacy = isLegacy,
name = name,
frameRate = timelineAsset == null
? TimelineAsset.EditorSettings.kDefaultFps
: timelineAsset.editorSettings.fps
};
SaveAssetIntoObject(curves, timelineAsset);
curves.hideFlags = trackFlags & ~HideFlags.HideInHierarchy; // Never hide in hierarchy
TimelineUndo.RegisterCreatedObjectUndo(curves, "Create Curves");
return curves;
}
internal static bool ValidateParentTrack(TrackAsset parent, Type childType)
{
if (childType == null || !typeof(TrackAsset).IsAssignableFrom(childType))
return false;
// no parent is valid for any type
if (parent == null)
return true;
var attr = Attribute.GetCustomAttribute(parent.GetType(), typeof(SupportsChildTracksAttribute)) as SupportsChildTracksAttribute;
if (attr == null)
return false;
// group track case, accepts all
if (attr.childType == null)
return true;
// specific case. Specifies nesting level
if (childType == attr.childType)
{
int nestCount = 0;
var p = parent;
while (p != null && p.isSubTrack)
{
nestCount++;
p = p.parent as TrackAsset;
}
return nestCount < attr.levels;
}
return false;