mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-15 00:11:55 +07:00
fixed component loading
This commit is contained in:
@@ -120,14 +120,10 @@ namespace e2d
|
|||||||
"model" : { "$ref": "#/common_definitions/address" },
|
"model" : { "$ref": "#/common_definitions/address" },
|
||||||
"animations" : {
|
"animations" : {
|
||||||
"type" : "array",
|
"type" : "array",
|
||||||
"items" : { "$ref": "#/definitions/spine_animation_array" }
|
"items" : { "$ref": "#/definitions/spine_animation" }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions" : {
|
"definitions" : {
|
||||||
"spine_animation_array" : {
|
|
||||||
"type" : "array",
|
|
||||||
"items" : { "$ref": "#/definitions/spine_animation" }
|
|
||||||
},
|
|
||||||
"spine_animation" : {
|
"spine_animation" : {
|
||||||
"type" : "object",
|
"type" : "object",
|
||||||
"required" : [ "track", "name" ],
|
"required" : [ "track", "name" ],
|
||||||
@@ -151,8 +147,8 @@ namespace e2d
|
|||||||
path::combine(ctx.parent_address, ctx.root["model"].GetString()));
|
path::combine(ctx.parent_address, ctx.root["model"].GetString()));
|
||||||
if ( !model ) {
|
if ( !model ) {
|
||||||
the<debug>().error("SPINE_PLAYER: Dependency 'model' is not found:\n"
|
the<debug>().error("SPINE_PLAYER: Dependency 'model' is not found:\n"
|
||||||
"--> Parent address: %s\n"
|
"--> Parent address: %0\n"
|
||||||
"--> Dependency address: $s",
|
"--> Dependency address: %1",
|
||||||
ctx.parent_address,
|
ctx.parent_address,
|
||||||
ctx.root["model"].GetString());
|
ctx.root["model"].GetString());
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -97,8 +97,8 @@ namespace e2d
|
|||||||
path::combine(ctx.parent_address, ctx.root["model"].GetString()));
|
path::combine(ctx.parent_address, ctx.root["model"].GetString()));
|
||||||
if ( !model ) {
|
if ( !model ) {
|
||||||
the<debug>().error("SPINE RENDERER: Dependency 'model' is not found:\n"
|
the<debug>().error("SPINE RENDERER: Dependency 'model' is not found:\n"
|
||||||
"--> Parent address: %s\n"
|
"--> Parent address: %0\n"
|
||||||
"--> Dependency address: $s",
|
"--> Dependency address: %1",
|
||||||
ctx.parent_address,
|
ctx.parent_address,
|
||||||
ctx.root["model"].GetString());
|
ctx.root["model"].GetString());
|
||||||
return false;
|
return false;
|
||||||
@@ -115,7 +115,7 @@ namespace e2d
|
|||||||
component.skin(skin);
|
component.skin(skin);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool factory_loader<spine_renderer>::operator()(
|
bool factory_loader<spine_renderer>::operator()(
|
||||||
@@ -126,12 +126,7 @@ namespace e2d
|
|||||||
dependencies.add_dependency<spine_model_asset>(
|
dependencies.add_dependency<spine_model_asset>(
|
||||||
path::combine(ctx.parent_address, ctx.root["model"].GetString()));
|
path::combine(ctx.parent_address, ctx.root["model"].GetString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ctx.root.HasMember("skin") ) {
|
|
||||||
dependencies.add_dependency<spine_model_asset>(
|
|
||||||
path::combine(ctx.parent_address, ctx.root["skin"].GetString()));
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user