Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

TriLib - When Model Loading (OnProgress), Is there a way to make Dubug work?

Discussion in 'Assets and Asset Store' started by chealin, Apr 5, 2023.

  1. chealin

    chealin

    Joined:
    Sep 10, 2017
    Posts:
    72
    hello

    I'm trying to load an FBX model with LoadModelFromStream
    I'm trying to display the loading percentage in the UI using OnProgress.

    When loading the model, Unity stops, and when all loading is complete, the OnProgress loading Debug is displayed in the console along with the modeling.


    I want Debug of OnProgress to work while loading FBX
    Is there a way?

    --
    Functions I use when loading FBX
    Code (CSharp):
    1.  AssetLoaderContext assetLoader = TriLibCore.AssetLoader.LoadModelFromStream(myStream, filePath, "fbx", OnLoad, null, OnProgress, null, null, assetLoaderOptions);//"fbx"
    2.  

    I want this to work during FBX loading.
    Code (CSharp):
    1.     private void OnProgress(AssetLoaderContext assetLoaderContext, float progress)
    2.     {
    3.         Debug.Log($"Progress: {progress:P}");
    4.     }
     
  2. chealin

    chealin

    Joined:
    Sep 10, 2017
    Posts:
    72

    Not a TriLib problem..
    Unity stopped in the section where I was downloading files from the server.
    Sorry for posting this question.