Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ease-ph
DeepLanguageUnderstanding
Physics Simulator
Commits
e200e77b
Verified
Commit
e200e77b
authored
Mar 06, 2020
by
Sebastian Höffner
Browse files
Updating context and JSON ordering.
parent
608b57c6
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Assets/DLU/Resources/context.json
View file @
e200e77b
This diff is collapsed.
Click to expand it.
Assets/DLU/Scripts/SceneController.cs
View file @
e200e77b
...
@@ -61,17 +61,20 @@ public class SceneController : MonoBehaviour
...
@@ -61,17 +61,20 @@ public class SceneController : MonoBehaviour
foreach
(
SemanticBehaviour
sb
in
this
.
semanticBehaviours
)
foreach
(
SemanticBehaviour
sb
in
this
.
semanticBehaviours
)
{
{
JSONObject
jsonObject
=
null
;
JSONObject
jsonObject
=
null
;
if
(!
sceneDict
.
ContainsKey
(
sb
.
name
))
string
name
=
sb
.
GetComponent
<
InstanceIdentifier
>().
name
;
if
(!
sceneDict
.
ContainsKey
(
name
))
{
{
jsonObject
=
new
JSONObject
();
jsonObject
=
new
JSONObject
();
jsonObject
.
Add
(
"name"
,
name
);
jsonObject
.
Add
(
"is_a"
,
new
JSONArray
());
jsonObject
.
Add
(
"is_a"
,
new
JSONArray
());
jsonObject
.
Add
(
"name"
,
sb
.
GetComponent
<
InstanceIdentifier
>().
name
);
jsonObject
.
Add
(
"components"
,
new
JSONObject
());
jsonObject
.
Add
(
"components"
,
new
JSONObject
());
sceneDict
[
sb
.
name
]
=
jsonObject
;
sceneDict
[
name
]
=
jsonObject
;
sceneArray
.
Add
(
sceneDict
[
sb
.
name
]);
sceneArray
.
Add
(
sceneDict
[
name
]);
}
}
jsonObject
=
sceneDict
[
sb
.
name
];
jsonObject
=
sceneDict
[
name
];
jsonObject
[
"is_a"
].
Add
(
sb
.
is_a
);
jsonObject
[
"is_a"
].
Add
(
sb
.
is_a
);
switch
(
sb
)
switch
(
sb
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment