Files
Magical-Jumping-Bean/Library/metadata/80/80ae83fdf1fb2c649bccb8c293b94556
T

126 lines
8.6 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_Namespacexx\ày¯ØTê8ß¿ÂF¹Ì‹,9›TePPackages/com.unity.timeline/Editor/Window/ViewModel/ScriptableObjectViewPrefs.csày¯ScriptableObjectViewPrefsÐ
using System;
using System.IO;
using UnityEditorInternal;
using UnityEngine;
using UnityObject = UnityEngine.Object;
namespace UnityEditor.Timeline
{
class ScriptableObjectViewPrefs<TViewModel> : IDisposable where TViewModel : ScriptableObject
{
const string k_DefaultFilePath = "Library/";
const string k_Extension = ".pref";
readonly string m_RelativePath;
readonly string m_AbsolutePath;
readonly string m_FileName;
ScriptableObject m_Asset;
TViewModel m_ViewModel;
bool isSavable
{
get
{
return m_Asset != null &&
m_ViewModel != null &&
!string.IsNullOrEmpty(m_FileName);
}
}
public ScriptableObjectViewPrefs(ScriptableObject asset, string relativeSavePath)
{
m_Asset = asset;
m_RelativePath = string.IsNullOrEmpty(relativeSavePath) ? k_DefaultFilePath : relativeSavePath;
if (!m_RelativePath.EndsWith("/", StringComparison.Ordinal))
m_RelativePath += "/";
m_AbsolutePath = Application.dataPath + "/../" + m_RelativePath;
var assetKey = GetAssetKey(asset);
m_FileName = string.IsNullOrEmpty(assetKey) ? string.Empty : assetKey + k_Extension;
}
public TViewModel viewModel
{
get
{
if (m_ViewModel == null)
{
if (m_Asset == null)
m_ViewModel = CreateViewModel();
else
m_ViewModel = LoadViewModel() ?? CreateViewModel();
}
return m_ViewModel;
}
}
public void Save()
{
if (!isSavable)
return;
// make sure the path exists or file write will fail
if (!Directory.Exists(m_AbsolutePath))
Directory.CreateDirectory(m_AbsolutePath);
const bool saveAsText = true;
InternalEditorUtility.SaveToSerializedFileAndForget(new UnityObject[] { m_ViewModel }, m_RelativePath + m_FileName, saveAsText);
}
public void DeleteFile()
{
if (!isSavable)
return;
var path = m_AbsolutePath + m_FileName;
if (!File.Exists(path))
return;
File.Delete(path);
}
public void Dispose()
{
if (m_ViewModel != null)
UnityObject.DestroyImmediate(m_ViewModel);
m_Asset = null;
}
public static TViewModel CreateViewModel()
{
var model = ScriptableObject.CreateInstance<TViewModel>();
model.hideFlags |= HideFlags.HideAndDontSave;
return model;
}
TViewModel LoadViewModel()
{
if (string.IsNullOrEmpty(m_FileName))
return null;
var objects = InternalEditorUtility.LoadSerializedFileAndForget(m_RelativePath + m_FileName);
if (objects.Length <= 0 || objects[0] == null)
return null;
var model = (TViewModel)objects[0];
model.hideFlags |= HideFlags.HideAndDontSave;
return model;
}
static string GetAssetKey(UnityObject asset)
{