Skip to content

Frequently there's a crash when fetching terrain texture - Using Objective - C (There's no log about the issue) #77

@jorgeAdfi

Description

@jorgeAdfi

if(_terrainNode != nil){
_terrainNode.scale = terraindNodeScale;
_terrainNode.geometry.materials = [self _defaultMaterials];
[self.scene.rootNode addChildNode:_terrainNode];
NSLog(@"Agrega terreno a 4riders");

    [_terrainNode fetchTerrainAndTextureWithMinWallHeight:50.0 multiplier:2 enableDynamicShadows:YES textureStyle:@"mapbox/satellite-streets-v9" heightProgress:nil heightCompletion:^(NSError * _Nullable fetchError) {
        if (fetchError) {
            NSLog(@"Texture load failed: %@", fetchError.localizedDescription);
        } else {
            NSLog(@"Terrain load complete");
        }
    } textureProgress:nil textureCompletion:^(UIImage * _Nullable image, NSError * _Nullable fetchError) {
        if (fetchError) {

// NSLog(@"Texture load failed: %@", fetchError.localizedDescription);
}
if (image) {
NSLog(@"terrain texture fetch completed");
self->_terrainNode.geometry.materials[4].diffuse.contents = image;
}
}];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions