void OnDisable() { if (!isInitialized) { return; } EditorSerializationUtility.Serialize(EDITOR_STATE_DIRECTORY, this, target); isInitialized = false; }
void OnEnable() { if (isInitialized) { return; } animator = (target as RagdollAnimator).GetComponent <Animator>(); EditorSerializationUtility.Deserialize(EDITOR_STATE_DIRECTORY, this, target); RefreshHideMesh(); isInitialized = true; }