Files
Magical-Jumping-Bean/Library/metadata/43/439c018cf4619e94d9a92110ce0aa188
T

126 lines
9.9 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€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_Namespacepp\ày¯ÐÐ4ÉÈOéI�šì ˆFPackages/com.unity.timeline/Runtime/Playables/PrefabControlPlayable.csày¯PrefabControlPlayable?using System;
using UnityEngine.Playables;
namespace UnityEngine.Timeline
{
/// <summary>
/// Playable that controls and instantiates a Prefab.
/// </summary>
public class PrefabControlPlayable : PlayableBehaviour
{
GameObject m_Instance;
/// <summary>
/// Creates a Playable with a PrefabControlPlayable behaviour attached
/// </summary>
/// <param name="graph">The PlayableGraph to inject the Playable into.</param>
/// <param name="prefabGameObject">The prefab to instantiate from</param>
/// <param name="parentTransform">Transform to parent instance to. Can be null.</param>
/// <returns>Returns a Playabe with PrefabControlPlayable behaviour attached.</returns>
public static ScriptPlayable<PrefabControlPlayable> Create(PlayableGraph graph, GameObject prefabGameObject, Transform parentTransform)
{
if (prefabGameObject == null)
return ScriptPlayable<PrefabControlPlayable>.Null;
var handle = ScriptPlayable<PrefabControlPlayable>.Create(graph);
handle.GetBehaviour().Initialize(prefabGameObject, parentTransform);
return handle;
}
/// <summary>
/// The instance of the prefab created by this behaviour
/// </summary>
public GameObject prefabInstance
{
get { return m_Instance; }
}
/// <summary>
/// Initializes the behaviour with a prefab and parent transform
/// </summary>
/// <param name="prefabGameObject">The prefab to instantiate from</param>
/// <param name="parentTransform">Transform to parent instance to. Can be null.</param>
/// <returns>The created instance</returns>
public GameObject Initialize(GameObject prefabGameObject, Transform parentTransform)
{
if (prefabGameObject == null)
throw new ArgumentNullException("Prefab cannot be null");
if (m_Instance != null)
{
Debug.LogWarningFormat("Prefab Control Playable ({0}) has already been initialized with a Prefab ({1}).", prefabGameObject.name, m_Instance.name);
}
else
{
m_Instance = Object.Instantiate(prefabGameObject, parentTransform, false);
m_Instance.name = prefabGameObject.name + " [Timeline]";
m_Instance.SetActive(false);
SetHideFlagsRecursive(m_Instance);
}
return m_Instance;
}
/// <summary>
/// This function is called when the Playable that owns the PlayableBehaviour is destroyed.
/// </summary>
/// <param name="playable">The playable this behaviour is attached to.</param>
public override void OnPlayableDestroy(Playable playable)
{
if (m_Instance)
{
if (Application.isPlaying)
Object.Destroy(m_Instance);
else
Object.DestroyImmediate(m_Instance);
}
}
/// <summary>
/// This function is called when the Playable play state is changed to Playables.PlayState.Playing.
/// </summary>
/// <param name="playable">The Playable that owns the current PlayableBehaviour.</param>
/// <param name="info">A FrameData structure that contains information about the current frame context.</param>
public override void OnBehaviourPlay(Playable playable, FrameData info)
{
if (m_Instance == null)
return;
m_Instance.SetActive(true);
}
/// <summary>
/// This function is called when the Playable play state is changed to PlayState.Paused.
/// </summary>
/// <param name="playable">The playable this behaviour is attached to.</param>
/// <param name="info">A FrameData structure that contains information about the current frame context.</param>
public override void OnBehaviourPause(Playable playable, FrameData info)
{
// OnBehaviourPause can be called if the graph is stopped for a variety of reasons
// the effectivePlayState will test if the pause is due to the clip being out of bounds
if (m_Instance != null && info.effectivePlayState == PlayState.Paused)
{
m_Instance.SetActive(false);
}
}
static void SetHideFlagsRecursive(GameObject gameObject)
{
gameObject.hideFlags = HideFlags.DontSaveInBuild | HideFlags.DontSaveInEditor;
if (!Application.isPlaying)
gameObject.hideFlags |= HideFlags.HideInHierarchy;
foreach (Transform child in gameObject.transform)
{
SetHideFlagsRecursive(child.gameObject);
}