public virtual void OnDestroy()
{
isAlive = false;
lwfDestroyCallbacks.ForEach(c => c(this));
lwfDestroyCallbacks = null;
if (lwfName == null)
return;
if (lwf != null) {
lwf.Destroy();
lwf = null;
}
if (factory != null) {
factory.Destruct();
factory = null;
}
ResourceCache.SharedInstance().UnloadLWFData(lwfName);
}