Skip to content

Commit

Permalink
再生終了時の自動読み込み・保存が不安定なので削除
Browse files Browse the repository at this point in the history
  • Loading branch information
FUJonathan committed May 22, 2018
1 parent c5044d2 commit 93abdb2
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 92 deletions.

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions UnityChan.SpringBone/Script/SpringBone/Setup/SpringBoneSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,6 @@ public static void DestroyUnityObject(UnityEngine.Object objectToDestroy)
#endif
}

public static string GetAutoSaveDirectory()
{
var dynamicsAutoSaveDirectory = Application.temporaryCachePath;
return dynamicsAutoSaveDirectory;
}

public static string GetAutoSavePath(string rootObjectName)
{
var dynamicsAutoSaveDirectory = GetAutoSaveDirectory();
return PathUtil.CombinePath(dynamicsAutoSaveDirectory, rootObjectName + "_DynamicsAutoSave.csv");
}

public static void AutoLoad(SpringManager springManager)
{
var autoSavePath = GetAutoSavePath(springManager.name);
if (System.IO.File.Exists(autoSavePath))
{
var sourceText = FileUtil.ReadAllText(autoSavePath);
DynamicsSetup.BuildFromRecordText(springManager.gameObject, springManager.gameObject, sourceText);
}
}

public static void AutoSave(SpringManager springManager)
{
var autoSavePath = GetAutoSavePath(springManager.name);
var sourceText = SpringBoneSerialization.BuildDynamicsSetupString(springManager.gameObject);
FileUtil.WriteAllText(autoSavePath, sourceText);
}

// オブジェクトとその子供に当たっている全てのSpringBoneとSpringManagerを削除
// この関数はDestroyImmediateを使うのでエディターの時以外は使わないでください!
public static void DestroySpringManagersAndBones(GameObject rootObject)
Expand Down
5 changes: 0 additions & 5 deletions UnityChan.SpringBone/Script/SpringBone/SpringManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,6 @@ private void DrawBones()
}
}
}

private void OnDestroy()
{
SpringBoneSetup.AutoSave(this);
}
#endif
}
}

0 comments on commit 93abdb2

Please sign in to comment.