mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Bug fixes plus better layout
This commit is contained in:
parent
b0a965e0b2
commit
18c0473f39
192 changed files with 4773 additions and 5746 deletions
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using System.IO;
|
||||
using UnityEngine.UI;
|
||||
using SFB;
|
||||
|
||||
|
@ -54,6 +55,7 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
Workspace.Instance.ClearHistory();
|
||||
Workspace.Instance.MakeDirty();
|
||||
|
||||
AnimationController.Instance.MakeDirty();
|
||||
|
||||
var animationDefCards = Resources.FindObjectsOfTypeAll(typeof(AnimationDefCard)) as AnimationDefCard[];
|
||||
|
@ -93,19 +95,14 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public void NewAnimation()
|
||||
{
|
||||
return;
|
||||
var path = Path.Combine(Application.streamingAssetsPath, "AnimationDefs/newAnimationDef.xml");
|
||||
|
||||
AnimationDef animationDef = new AnimationDef();
|
||||
Defs defs = XmlUtility.ReadXML<Defs>(path);
|
||||
|
||||
// Add one stage, add one actor, add one clip, add one frame
|
||||
if (defs?.animationDefs == null)
|
||||
{ Debug.LogError("Default animation def file contains no animation data"); return; }
|
||||
|
||||
Workspace.animationDef = new AnimationDef();
|
||||
Workspace.Instance.MakeDirty();
|
||||
|
||||
var animationDefCards = Resources.FindObjectsOfTypeAll(typeof(AnimationDefCard)) as GameObject[];
|
||||
|
||||
if (animationDefCards != null)
|
||||
{ animationDefCards[0].SetActive(true); }
|
||||
LoadAnimation(defs.animationDefs[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue