This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string jsondata = File.ReadAllText(Application.dataPath + "/../" + fileName + ".json"); | |
Debug.Log (jsondata); | |
Connection[] temparray = new Connection[JsonHelper.FromJson<Connection>(jsondata).Length]; | |
^---- This is where it breaks. | |
Debug.Log (temparray.Length); | |
foreach (Connection connection in JsonHelper.FromJson<Connection>(jsondata)) | |
{ | |
connections.Add (connection); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Util | |
{ | |
public static Vector3[,] generatePositions(List<int> angles, List<float> depths) | |
{ | |
Vector3[,] positions = new Vector3[angles.Count,depths.Count]; | |
^ ^ | |
NullReferenceException: Object reference not set to an instance of an object | |
Util.generatePositions (System.Collections.Generic.List`1 angles, System.Collections.Generic.List`1 depths) (at Assets/Scripts/Util.cs:29) | |
DockingState..ctor () (at Assets/Scripts/States/DockingState.cs:32) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class State: Monobehaviour { | |
//reference to the state we will need to jump to | |
public State nextState; | |
protected virtual void Update() | |
{ | |
if (mouseClicked) | |
{ | |
doSomething(); |