Skip to content

Model URI path corruption: extra character in path (e.g. "body" → "bodyy", "granite" → "grranite") #34

@zhowe-designs

Description

@zhowe-designs

Bug: When the engine resolves model URIs (for both map-loaded entities and code-spawned entities), it sometimes duplicates a character in the path, so the model file is not found.

Observed corruptions:

  • dino_body_hytopia_greendino_bodyy_hytopia_green (extra y)
  • granitegrranite (extra r)
  • .optimized.opptimized (extra p)

Example error:

Entity.constructor(): Model models/dino_test/.optimized/dino_bodyy_hytopia_green/dino_body_hytopia_green.glb does not exist!

Expected: The path should be used as provided (e.g. models/dino_test/.optimized/dino_body_hytopia_green/dino_body_hytopia_green.glb).

Environment: hytopia package 0.14.48 (or your version from package.json), Node, Windows. Occurs in both world.loadMap() (map entities) and new Entity({ modelUri: "..." }).spawn().

Impact: Custom models with certain path segments (e.g. containing "body", "granite", ".optimized") fail to load. Workaround is to avoid the .optimized path and use root-level model paths, but those may not render for map entities.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

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