| 1122 | } |
| 1123 | |
| 1124 | s32 parse_unit_from_json(UnitCompiler &c, const char *unit_json, CompileOptions &opts) |
| 1125 | { |
| 1126 | s32 err = collect_prefabs(c, StringId64(), unit_json, true, opts); |
| 1127 | ENSURE_OR_RETURN(UNIT_COMPILER, err == 0, opts); |
| 1128 | |
| 1129 | u32 original_unit = c._prefab_offsets[array::size(c._prefab_offsets) - 1]; |
| 1130 | err = parse_unit_internal(c, &c._prefab_data[original_unit], NULL, NULL, opts); |
| 1131 | ENSURE_OR_RETURN(UNIT_COMPILER, err == 0, opts); |
| 1132 | |
| 1133 | return flatten(c, opts); |
| 1134 | } |
| 1135 | |
| 1136 | s32 parse_unit(UnitCompiler &c, const char *path, CompileOptions &opts) |
| 1137 | { |
no test coverage detected