Code Monkey home page Code Monkey logo

Comments (4)

amirebrahimi avatar amirebrahimi commented on September 25, 2024

Hmm...Haven't seen this and currently the Simplygon plugin for Unity is unsupported. What version of the plugin/Simplygon are you using?

from autolod.

JangkyuSeo avatar JangkyuSeo commented on September 25, 2024

I fixed the same problem.
I guess a reason of problem is making too many threads.
When you using Simplygon, you should managing thread count to not making too many threads.
My opinion is make thread pool and use it.

from autolod.

Keeetrab avatar Keeetrab commented on September 25, 2024

I m using 2.5.1 version of Unity plugin and 8.2.359 Simplygon Lib.

I tried to count workers

                    var worker = new BackgroundWorker();            
                    workersWorking++;

and on worker.RunWorkerCompleted

                    worker.RunWorkerCompleted += (sender, args) =>
                    {
                        var resultMesh = (WorkingMesh)args.Result;
                        resultMesh.ApplyToMesh(simplifiedMesh);
                        simplifiedMesh.RecalculateBounds();

                        workersWorking--;
                       
                    };. 

Then I tried to check how many workers are in GenerateLODsCoroutine()

        var go = menuCommand.context as GameObject;
        if (go)
        {                              
            while(workersWorking > 2)
            {
                yield return null;
            }
            GenerateLODs(go);
           
        }

However this, blocks whole Unity. Any tips how should I approach it?

from autolod.

JangkyuSeo avatar JangkyuSeo commented on September 25, 2024

You should use yield return WaitForSecond(time) insted of yield return null.

Because TimedEnumerator is not stopped until pass the iteration time.
It means that yield return null is not continue next frame. It will continue same frame.

from autolod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.