File tree Expand file tree Collapse file tree
runtimes/talos/src/main/java/com/talosvfx/talos/runtime/scene Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import com .badlogic .gdx .utils .Json ;
55import com .badlogic .gdx .utils .JsonReader ;
66import com .badlogic .gdx .utils .JsonValue ;
7- import com .talosvfx .talos .runtime .utils .TempHackUtil ;
87
98public class Prefab extends SavableContainer {
109 public static String PREFIX = "Prefab_" ;
1110
1211 public transient String name ;
1312 private transient String talosIdentifier ;
14- public transient String cachedJsonString ;
13+ public transient String cachedRootGoJson ;
1514
1615 public Prefab () {
1716 }
@@ -21,14 +20,6 @@ public Prefab (String jsonContent, String name) {
2120 setName (name );
2221 }
2322
24- @ Override
25- void loadFromString (String jsonString ) {
26- String hackedString = TempHackUtil .hackIt (jsonString );
27- this .cachedJsonString = hackedString ;
28-
29- load (hackedString );
30- }
31-
3223 public Prefab (GameObject root ) {
3324 this .root = root ;
3425 }
@@ -48,7 +39,7 @@ public void load(String data) {
4839 root = json .readValue (GameObject .class , jsonRoot );
4940 root .setGameObjectContainer (this );
5041
51- //Lets add a fake root
42+ cachedRootGoJson = json . toJson ( root , GameObject . class );
5243 }
5344
5445 @ Override
You can’t perform that action at this time.
0 commit comments