Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Out of memory error - Load 3D Model at runtime

Discussion in 'Web' started by agarcialeon, May 7, 2018.

  1. agarcialeon

    agarcialeon

    Joined:
    Sep 4, 2014
    Posts:
    8
    Well, I'm using the FastObjImporter script to load an OBJ file at runtime in the app that I'm developing for WebGL.

    This app allows the user to upload a zip file with an OBJ file, a MTL file and the textures needed in the MTL file.
    The problem is that I've uploaded a 7 mb file containing the Rover Curiosity to test the loading but now it's always showing the out of memory error.

    I've checked the memory used before loading the model and it goes from 200 MB ~ to almost 2 GB which seems surprising when at the same time I've tried the same model in an Android mobile app but it loads correctly.

    Also I've checked the memory used in the editor with the Profiler however it shows values of 300 MB instead for both Android and WebGL platforms.

    Is this normal or I am missing something about WebGL about loading models?