Browse Source

Jsonifier fixes.

Mark Sibly 7 years ago
parent
commit
a37b2f50b9
2 changed files with 3 additions and 2 deletions
  1. 1 1
      ducks-scene.mojo3d
  2. 2 1
      modules/mojo3d/scene/jsonifier/jsonifier.monkey2

+ 1 - 1
ducks-scene.mojo3d

@@ -1,5 +1,5 @@
 {
-	"assetsDir":"D:/dev/monkey2/modules/mojo3d/tests/ducks.products/Windows/assets/",
+	"assetsDir":"modules/mojo3d/tests/assets/",
 	"instances":[{
 		"ctor":{
 			"args":[true],

+ 2 - 1
modules/mojo3d/scene/jsonifier/jsonifier.monkey2

@@ -227,7 +227,8 @@ Public
 			If Not obj Return JsonValue.NullValue
 			Local inst:=_instsByObj[obj]
 			If inst Return New JsonString( "@"+inst.id )
-			RuntimeError( "Can't jsonify instance of type '"+type+"'" )
+			Return JsonValue.NullValue	'for objects that weren't added using AddInstance - should really never happen.
+'			RuntimeError( "Can't jsonify instance of type '"+type+"'" )
 		Endif
 		
 		'try custom jsonifiers