fixed pose saving
This commit is contained in:
@@ -88,17 +88,19 @@ public class UIPoseContainer : MonoBehaviour
|
|||||||
|
|
||||||
if (container == null) return;
|
if (container == null) return;
|
||||||
|
|
||||||
var poseData = new PoseData();
|
var poseData = new PoseData()
|
||||||
poseData.Name = NameLabel.text;
|
{
|
||||||
poseData.Date = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss");
|
Name = NameLabel.text,
|
||||||
poseData.Character = container.name;
|
Date = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"),
|
||||||
poseData.Description = DescriptionLabel.text;
|
Character = container.name,
|
||||||
poseData.ViewerVersion = Application.version;
|
Description = DescriptionLabel.text,
|
||||||
poseData.Bones = container.SaveBones();
|
ViewerVersion = Application.version,
|
||||||
poseData.Morphs = container.SaveMorphs(true);
|
Bones = container.SaveBones(),
|
||||||
|
Morphs = container.SaveMorphs(true)
|
||||||
|
};
|
||||||
|
|
||||||
var duplicateContainer = CheckIfContainerExists(poseData.Name);
|
var duplicateContainer = CheckIfContainerExists(poseData.Name);
|
||||||
if (duplicateContainer != this)
|
if (duplicateContainer != null && duplicateContainer != this)
|
||||||
{
|
{
|
||||||
UmaViewerUI.Instance.ShowMessage($"Another save exists with name {poseData.Name}", UIMessageType.Error);
|
UmaViewerUI.Instance.ShowMessage($"Another save exists with name {poseData.Name}", UIMessageType.Error);
|
||||||
return;
|
return;
|
||||||
@@ -129,17 +131,19 @@ public class UIPoseContainer : MonoBehaviour
|
|||||||
|
|
||||||
if (container == null) return;
|
if (container == null) return;
|
||||||
|
|
||||||
var poseData = new PoseData();
|
var poseData = new PoseData()
|
||||||
poseData.Name = NameLabel.text;
|
{
|
||||||
poseData.Date = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss");
|
Name = NameLabel.text,
|
||||||
poseData.Character = container.name;
|
Date = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"),
|
||||||
poseData.Description = DescriptionLabel.text;
|
Character = container.name,
|
||||||
poseData.ViewerVersion = Application.version;
|
Description = DescriptionLabel.text,
|
||||||
poseData.Bones = container.SaveBones();
|
ViewerVersion = Application.version,
|
||||||
poseData.Morphs = container.SaveMorphs(true);
|
Bones = container.SaveBones(),
|
||||||
|
Morphs = container.SaveMorphs(true)
|
||||||
|
};
|
||||||
|
|
||||||
var duplicateContainer = CheckIfContainerExists(poseData.Name);
|
var duplicateContainer = CheckIfContainerExists(poseData.Name);
|
||||||
if (duplicateContainer != this)
|
if (duplicateContainer != null && duplicateContainer != this)
|
||||||
{
|
{
|
||||||
UmaViewerUI.Instance.ShowMessage($"Another save exists with name {poseData.Name}", UIMessageType.Error);
|
UmaViewerUI.Instance.ShowMessage($"Another save exists with name {poseData.Name}", UIMessageType.Error);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ PlayerSettings:
|
|||||||
16:10: 1
|
16:10: 1
|
||||||
16:9: 1
|
16:9: 1
|
||||||
Others: 1
|
Others: 1
|
||||||
bundleVersion: 2.1.10
|
bundleVersion: 2.1.11
|
||||||
preloadedAssets: []
|
preloadedAssets: []
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
wsaTransparentSwapchain: 0
|
wsaTransparentSwapchain: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user