Commit 7d671efe authored by Luca Nixdorf's avatar Luca Nixdorf
Browse files

error messages improved

parent 615e5706
No related merge requests found
Showing with 8 additions and 2 deletions
+8 -2
......@@ -104,9 +104,8 @@ public class Piano : MonoBehaviour
}
catch (Exception e)
{
Debug.LogError(e.Message);
Debug.LogError("An Exception in this code could have been caused by an old properties File," +
"try going into the Adjustment Menu Object and resetting the Properties File using the provided Editor Button");
"try going into the Adjustment Menu Object and resetting the Properties File using the provided Editor Button\n" + e.Message + "\n" + e.StackTrace);
}
}
......@@ -134,6 +133,13 @@ public class Piano : MonoBehaviour
midiIndex < Layout.MidiKeyIndexStart + Layout.KeyAmount;
midiIndex++)
{
var key = Keys[midiIndex];
if (!key)
{
Debug.LogError("The piano keys have not been instantiated correctly!");
return;
}
var keyTransform = Keys[midiIndex].transform;
if (PianoLayout.IsBlackKey(midiIndex))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment