Files
Magical-Jumping-Bean/Library/metadata/a3/a3949cc8bd731bb47bedf6589367d0c9
T

263 lines
14 KiB
Plaintext
Raw Normal View History

2019-09-29 19:40:54 -04:00
í9ð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€j€H€wÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€H€€ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€y€
€ Þ€#!€.€,"€€…ÿÿÿÿ#@1€1€ÿÿÿÿ$Þ€€%.€j€&Õ€“ÿÿÿÿ'€1€1€ÿÿÿÿ(ÀÞ€€)€j€ÿÿÿÿ*€H€›€ÿÿÿÿ+€1€1€ÿÿÿÿ,@Þ€€-Q€j€.y€
€ /Þ€#0€.€,1€ €§2@¾€¶ 3@Þ€#4€.€,5€H€»ÿÿÿÿ6€1€1€ÿÿÿÿ7@Þ€€8Q€j€9H€Æÿÿÿÿ:€1€1€ÿÿÿÿ;@Þ€€<Q€j€=H€Øÿÿÿÿ>€1€1€ÿÿÿÿ?@Þ€€@Q€j€AMonoImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariantsÿÿ£Gñ×Ü�Z56 :!@iÁJ*�€7€ÿÿÿÿ€¦€²€E€ Þ€€.€€(a€ Þ€€.€€†€r€ Þ€ €.€
€H€«€ÿÿÿÿ €1€1€ÿÿÿÿ @Þ€€
Q€j€H€ê€ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€ñ€=ÿÿÿÿ€1€1€ÿÿÿÿ€Þ€€€j€ÿÿÿÿ€H€›€ÿÿÿÿ€1€1€ÿÿÿÿ@Þ€€Q€j€y€
€ Þ€€.€€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_Namespace``\ày¯À &:IÉŒÛ7±K·Þo…9v
œ5Packages/com.unity.timeline/Editor/TimelineUtility.csày¯TimelineUtilityŸ%using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Timeline;
using UnityEngine.Playables;
using Object = UnityEngine.Object;
using UnityEditor.Experimental.SceneManagement;
namespace UnityEditor.Timeline
{
static class TimelineUtility
{
public static void ReorderTracks(List<ScriptableObject> allTracks, List<TrackAsset> tracks, ScriptableObject insertAfterAsset, bool up)
{
foreach (var i in tracks)
allTracks.Remove(i);
int index = allTracks.IndexOf(insertAfterAsset);
index = up ? Math.Max(index, 0) : index + 1;
allTracks.InsertRange(index, tracks.OfType<ScriptableObject>());
}
// Gets the track that holds the game object reference for this track.
public static TrackAsset GetSceneReferenceTrack(TrackAsset asset)
{
if (asset == null)
return null;
if (asset.isSubTrack)
return GetSceneReferenceTrack(asset.parent as TrackAsset);
return asset;
}
public static bool TrackHasAnimationCurves(TrackAsset track)
{
if (track.hasCurves)
return true;
var animTrack = track as AnimationTrack;
if (animTrack != null && animTrack.infiniteClip != null)
return true;
for (int i = 0; i < track.clips.Length; i++)
{
var curveClip = track.clips[i].curves;
var animationClip = track.clips[i].animationClip;
// prune out clip with zero curves
if (curveClip != null && curveClip.empty)
curveClip = null;
if (animationClip != null && animationClip.empty)
animationClip = null;
// prune out clips coming from FBX
if (animationClip != null && ((animationClip.hideFlags & HideFlags.NotEditable) != 0))
animationClip = null;
if (!track.clips[i].recordable)
animationClip = null;
if ((curveClip != null) || (animationClip != null))
return true;
}
return false;
}
// get the game object reference associated with this
public static GameObject GetSceneGameObject(PlayableDirector director, TrackAsset asset)
{
if (director == null || asset == null)
return null;
asset = GetSceneReferenceTrack(asset);
var gameObject = director.GetGenericBinding(asset) as GameObject;
var component = director.GetGenericBinding(asset) as Component;
if (component != null)
gameObject = component.gameObject;
return gameObject;
}
public static void SetSceneGameObject(PlayableDirector director, TrackAsset asset, GameObject go)
{
if (director == null || asset == null)
return;
asset = GetSceneReferenceTrack(asset);
var bindings = asset.outputs;
if (bindings.Count() == 0)
return;
var binding = bindings.First();
if (binding.outputTargetType == typeof(GameObject))
{
BindingUtility.Bind(director, asset, go);
}
else
{
BindingUtility.Bind(director, asset, TimelineHelpers.AddRequiredComponent(go, asset));
}
}
public static PlayableDirector[] GetDirectorsInSceneUsingAsset(PlayableAsset asset)
{
const HideFlags hideFlags =
HideFlags.HideInHierarchy | HideFlags.HideInInspector |
HideFlags.DontSaveInEditor | HideFlags.NotEditable;
var prefabMode = PrefabStageUtility.GetCurrentPrefabStage();
var inScene = new List<PlayableDirector>();
var allDirectors = Resources.FindObjectsOfTypeAll(typeof(PlayableDirector)) as PlayableDirector[];
foreach (var director in allDirectors)
{
if ((director.hideFlags & hideFlags) != 0)
continue;
string assetPath = AssetDatabase.GetAssetPath(director.transform.root.gameObject);
if (!String.IsNullOrEmpty(assetPath))
continue;
if (prefabMode != null && !prefabMode.IsPartOfPrefabContents(director.gameObject))
continue;
if (asset == null || (asset != null && director.playableAsset == asset))
{
inScene.Add(director);
}
}
return inScene.ToArray();
}
public static PlayableDirector GetDirectorComponentForGameObject(GameObject gameObject)
{
return gameObject != null ? gameObject.GetComponent<PlayableDirector>() : null;
}
public static TimelineAsset GetTimelineAssetForDirectorComponent(PlayableDirector director)
{
return director != null ? director.playableAsset as TimelineAsset : null;
}
public static bool IsPrefabOrAsset(Object obj)
{
return EditorUtility.IsPersistent(obj) || (obj.hideFlags & HideFlags.NotEditable) != 0;
}
// TODO -- Need to add this to SerializedProperty so we can get replicate the accuracy that exists
// in the undo system
internal static string PropertyToString(SerializedProperty property)
{
switch (property.propertyType)
{
case SerializedPropertyType.Integer:
return property.intValue.ToString();
case SerializedPropertyType.Float:
return property.floatValue.ToString();
case SerializedPropertyType.String:
return property.stringValue;
case SerializedPropertyType.Boolean:
return property.boolValue ? "1" : "0";
case SerializedPropertyType.Color:
return property.colorValue.ToString();
case SerializedPropertyType.ArraySize:
return property.intValue.ToString();
case SerializedPropertyType.Enum:
return property.intValue.ToString();
case SerializedPropertyType.ObjectReference:
return string.Empty;
case SerializedPropertyType.LayerMask:
return property.intValue.ToString();
case SerializedPropertyType.Character:
return property.intValue.ToString();
case SerializedPropertyType.AnimationCurve:
return property.animationCurveValue.ToString();
case SerializedPropertyType.Gradient:
return property.gradientValue.ToString();
case SerializedPropertyType.Vector3:
return property.vector3Value.ToString();
case SerializedPropertyType.Vector4:
return property.vector4Value.ToString();
case SerializedPropertyType.Vector2:
return property.vector2Value.ToString();
case SerializedPropertyType.Rect:
return property.rectValue.ToString();
case SerializedPropertyType.Bounds:
return property.boundsValue.ToString();
case SerializedPropertyType.Quaternion:
return property.quaternionValue.ToString();
case SerializedPropertyType.Generic:
return string.Empty;
default:
Debug.LogWarning("Unknown Property Type: " + property.propertyType);
return string.Empty;
}
}
// Is this a recordable clip on an animation track.
internal static bool IsRecordableAnimationClip(TimelineClip clip)
{
if (!clip.recordable)
return false;
AnimationPlayableAsset asset = clip.asset as AnimationPlayableAsset;
if (asset == null)
return false;
return true;
}
public static IList<PlayableDirector> GetSubTimelines(TimelineClip clip, IExposedPropertyTable director)
{
var editor = CustomTimelineEditorCache.GetClipEditor(clip);
List<PlayableDirector> directors = new List<PlayableDirector>();
try
{
editor.GetSubTimelines(clip, director as PlayableDirector, directors);
}
catch (Exception e)
{
Debug.LogException(e);
}
return directors;
}
internal static bool IsAllSubTrackMuted(TrackAsset asset)
{
if (asset is GroupTrack)
return asset.mutedInHierarchy;
foreach (TrackAsset t in asset.GetChildTracks())
{
if (!t.muted)
return false;
var childMuted = IsAllSubTrackMuted(t);
if (!childMuted)
return false;
}
return true;
}
internal static bool IsParentMuted(TrackAsset asset)
{
TrackAsset p = asset.parent as TrackAsset;
if (p == null) return false;