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,39 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.U2D.Animation
|
||||
{
|
||||
internal class CacheObject : BaseObject, ISerializationCallbackReceiver
|
||||
{
|
||||
public static T Create<T>(Cache owner) where T : CacheObject
|
||||
{
|
||||
var cacheObject = CreateInstance<T>();
|
||||
cacheObject.hideFlags = HideFlags.HideAndDontSave;
|
||||
cacheObject.owner = owner;
|
||||
return cacheObject;
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private Cache m_Owner;
|
||||
|
||||
public Cache owner
|
||||
{
|
||||
get { return m_Owner; }
|
||||
set { m_Owner = value; }
|
||||
}
|
||||
|
||||
void ISerializationCallbackReceiver.OnAfterDeserialize()
|
||||
{
|
||||
OnAfterDeserialize();
|
||||
}
|
||||
|
||||
void ISerializationCallbackReceiver.OnBeforeSerialize()
|
||||
{
|
||||
OnBeforeSerialize();
|
||||
}
|
||||
|
||||
internal virtual void OnCreate() {}
|
||||
protected virtual void OnAfterDeserialize() {}
|
||||
protected virtual void OnBeforeSerialize() {}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue