mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:17:38 +02:00
fix nasty bugs with saving / loading
- duplicate property names no longer soft crash loading (thanks, tap trial) - fix remix saving nothing music
This commit is contained in:
@ -307,18 +307,31 @@ namespace HeavenStudio.Editor
|
||||
try
|
||||
{
|
||||
if (clip != null)
|
||||
MusicBytes = OggVorbis.VorbisPlugin.GetOggVorbis(Conductor.instance.musicSource.clip, 1);
|
||||
MusicBytes = OggVorbis.VorbisPlugin.GetOggVorbis(clip, 1);
|
||||
else
|
||||
{
|
||||
MusicBytes = null;
|
||||
Debug.LogWarning("Failed to load music file! The stream is currently empty.");
|
||||
}
|
||||
}
|
||||
catch (System.Exception)
|
||||
catch (System.ArgumentNullException)
|
||||
{
|
||||
clip = null;
|
||||
MusicBytes = null;
|
||||
Debug.LogWarning("Failed to load music file! The stream is currently empty.");
|
||||
}
|
||||
catch (System.ArgumentOutOfRangeException)
|
||||
{
|
||||
clip = null;
|
||||
MusicBytes = null;
|
||||
Debug.LogWarning("Failed to load music file! The stream is malformed.");
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
clip = null;
|
||||
MusicBytes = null;
|
||||
Debug.LogWarning("Failed to load music file! Only 1 or 2 channels are supported!.");
|
||||
}
|
||||
|
||||
return clip;
|
||||
}
|
||||
|
@ -58,7 +58,6 @@ namespace HeavenStudio.Editor
|
||||
{
|
||||
if (chart.properties.ContainsKey(property.tag))
|
||||
{
|
||||
Debug.Log($"Found property: {property.tag} with label {property.label}");
|
||||
infoContainer.AddParam(this, property.tag, chart.properties[property.tag], property.label, property.isReadOnly);
|
||||
}
|
||||
else
|
||||
@ -67,6 +66,14 @@ namespace HeavenStudio.Editor
|
||||
{
|
||||
infoContainer.AddDivider(this);
|
||||
}
|
||||
else if (property.tag == "heading")
|
||||
{
|
||||
infoContainer.AddDivider(this);
|
||||
}
|
||||
else if (property.tag == "subheading")
|
||||
{
|
||||
infoContainer.AddDivider(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("Property Menu generation Warning: Property " + property.tag + " not found, skipping...");
|
||||
|
Reference in New Issue
Block a user