Verified Commit e200e77b authored by Sebastian Höffner's avatar Sebastian Höffner
Browse files

Updating context and JSON ordering.

parent 608b57c6
This diff is collapsed.
......@@ -61,17 +61,20 @@ public class SceneController : MonoBehaviour
foreach (SemanticBehaviour sb in this.semanticBehaviours)
{
JSONObject jsonObject = null;
if (!sceneDict.ContainsKey(sb.name))
string name = sb.GetComponent<InstanceIdentifier>().name;
if (!sceneDict.ContainsKey(name))
{
jsonObject = new JSONObject();
jsonObject.Add("name", name);
jsonObject.Add("is_a", new JSONArray());
jsonObject.Add("name", sb.GetComponent<InstanceIdentifier>().name);
jsonObject.Add("components", new JSONObject());
sceneDict[sb.name] = jsonObject;
sceneArray.Add(sceneDict[sb.name]);
sceneDict[name] = jsonObject;
sceneArray.Add(sceneDict[name]);
}
jsonObject = sceneDict[sb.name];
jsonObject = sceneDict[name];
jsonObject["is_a"].Add(sb.is_a);
switch (sb)
......
Markdown is supported
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