#Asset loader not found by big gltf

9 messages ยท Page 1 of 1 (latest)

inner belfry
#

Hey, I am trying to load a mesh and material from a gltf file that is 11mb. I have other files in the same folder were everything is the same only the size is smaller (50kb). There is on other difference in the file that not works and that is that there are tow materials. But it would be strange if this was the problem. I also get no error but in the console it says: WARN bevy_asset::asset_server: no AssetLoader found tow times.
I call the mesh like this: IslandsSphere1#Mesh0/Primitive0
and the material like this: IslandsSphere1#Material0
Thanks for help!! ๐Ÿ™‚

inner belfry
#

I tried every model again now and now nothing works ๐Ÿ˜ข. For every model the same asset server error. But I am very sure that before only the one model did not work.

inland mist
#

Could you share the code that loads the asset?

#

Also are you adding DefaultPlugins?

inner belfry
#

Yes I am adding the default plugins. Here the code:
โ€˜โ€™โ€™
fn from_world(world: &mut World) -> Self {
let asset_server = world.get_resource::<AssetServer>().unwrap();
let mesh: Handle<Mesh> =
asset_server.load("objects/terrain/SmallRocks/SmallRock1.gltf#Mesh0/Primitive0");

    let material = asset_server.load("objects/terrain/SmallRocks/SmallRock1.gltf#Material0");

โ€˜โ€™โ€™

Thanks for the help!

#

I am just really bewildered because I did not change anything but it stoped working. Is there any way that their is an extern problem?

inland mist
#

Where are you calling from_world?

inner belfry
#

From a resource :

impl FromWorld for TerrainSettings {
fn from_world(world: &mut World) -> Self {

And the resource is added in a plug-in:

impl Plugin for Terrain {
fn build(&self, app: &mut App) {
app.add_state::<PluginState>()
.init_resource::<TerrainSettings>()
.add_system(check_asset_loading_system.run_if(in_state(PluginState::AssetLoading)))
.add_system(genorator.in_schedule(OnEnter(PluginState::TerrainGenoration)));
}
}

And this plug-in is added in another plugin:

app.add_plugin(Terrain)
.add_plugin(RapierPhysicsPlugin::<NoUserData>::default())
.add_plugin(RapierDebugRenderPlugin::default().always_on_top());

And this is then added to main:

App::new().add_plugin(Setup).add_plugin(Game).run();

In the Setup plugin the Default plugins are added. Thanks again for help!

inland mist
#

Hm and DefaultPlugins is added before this one?