-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible issue with coroutines global settings #1733
Comments
@eproca Good to know i was as well wondering why my changes regarding this options are not taking measurable effects. If you could share your hotfix to access the features and manipulate the options at runtime would be great for other users facing this issue until a patch from the framework is available :-) Would really appreciate that |
hi @Markovicho , If your instance of AbstractMap is absMap, your layer is called "Buildings1" and your number of entities by courutine is entitiesByCoroutine, you can simply do: I set this before (re) initialize absMap and (re) set active buildingsFeature1. |
Hey @Markovicho, @eproca |
@brnkhy by the way i have one general question to the coroutine setting: For me it's not really clear why i should manipulate this parameter. From my understanding coroutines is not equal to threading as the operations will still run on main-thread. So there is no performance advantage in calling coroutines instead of synchronous running code in this case. Maybe the parameter is used to decide if a maximum number of layers are loaded parallel or incremental (?) |
@Markovicho the only purpose of coroutines there is not to block the UI so you can move around etc without freezes while meshes are being generated but I'm afraid they are not enough when there are too many complex objects. |
Unity version: 2018.4.17
Mapbox SDK version: 2.1.1
It seems that the inspector settings in "MAP LAYER" / "Enable coroutines" are ignored. After checking VectorLayerVisualizer it looks like that _performanceOptions is related to each specific sublayer feature, not to a global setting. If in code I get the sublayer feature and use performanceOptions.isEnabled and performanceOptions.entityPerCoroutine, everything works as expected.
This has been tested in play mode in editor, not with "Enable Preview" in editor.
The text was updated successfully, but these errors were encountered: