Hi i have a plane in scene with unlit shader textures in unity needle engine and i have build it and uploaded it on a server but it has some loading issues on IOS devices like iphones when the it reaches the end of the loading it again restart the loading and sometime fail to load. Whereas in runs perfectly on android, macOS and windows. Can someone please help me this. i have also given the link of the website.
Hi Abdul Raheem,
The loading issues you’re encountering on iOS devices with your Needle Engine project could be caused by various factors. Here are some considerations and potential solutions to address these challenges:
-
Texture Compression:
Ensure that you’re using appropriate texture compression for mobile devices. Using KTX2 compression is recommended for better performance. You can set this in Unity using the Needle Texture Importer. High-resolution textures can also lead to long loading times, especially on mobile devices. -
Progressive Loading:
Implementing progressive loading can help reduce initial loading times by loading textures at lower resolutions first and then loading higher resolutions later. This is particularly helpful for mobile performance. -
Scene Complexity:
Consider simplifying the scene by reducing the number of vertices or splitting assets into smaller glTF files. iOS devices can struggle with complex scenes. -
Error Handling:
Use the console in Safari’s developer tools to check for any errors during loading. You can access this by connecting your iPhone to a computer with Safari’s developer tools enabled (see faq). -
Optimize Your Code:
Make sure to review the way assets and components are being loaded. Avoid any redundant loading calls or circular dependencies which may cause the engine to restart the loading process (see faq) (see faq). -
Update Needle Engine:
Keeping the Needle Engine up to date can help as fixes for issues on mobile devices may have been implemented in newer versions. Check if your current version is up-to-date (see the documentation). -
Testing on Other Browsers:
Test your website on other mobile browsers on iOS (like Chrome or Firefox) to see if the issue persists across different browsers.
If you continue to encounter issues, consider providing more details about the specific iOS devices you’re testing on, any console errors you observe, and your current Needle Engine version. This will help in diagnosing the problem further.
Feel free to share any additional information if necessary!
3 replies left
thread_yYv7TX4Vdwxkw1lNmn4Jvwpl
Reply to this message to continue the conversation
Hi i’ve already tested on others on iphones but it is still having same issue.
Hi Abdul Raheem,
Since the issue persists across different iPhones and browsers, let’s explore further steps:
-
Debugging on iOS:
Use the Safari developer tools to inspect the console for any errors. To do this:- Connect your iPhone to a Mac.
- Open Safari on the Mac.
- Enable “Develop” in Safari’s preferences if it’s not already enabled.
- Use the Develop menu to open the console for your iPhone.
-
Network Conditions:
Test the loading under different network conditions to identify if a slow connection could be contributing to the problem. Sometimes, loading requires sufficient bandwidth, and lower speeds can lead to timeouts or problems with resource loading. -
Asset Size Optimization:
Look at the size of your assets (models, textures, audio). If they are too large, they can cause loading failures or long delays, particularly on mobile devices. You can use glTF Optimizer or similar tools to reduce file sizes. -
Build Settings:
Check your build settings in Unity to ensure they are optimized for mobile:- Set the target platform to iOS.
- Ensure graphics APIs are set to Metal.
- Check other settings specific to iOS that might affect performance and loading.
-
Increase Timeout:
If your application has a timeout setting for loading resources, consider increasing it. Mobile networks can be unpredictable, and a higher timeout can help mitigate this issue. -
Review Your Scene:
Analyze the complexity and structure of your scene components. Sometimes, certain features or behaviors might be incompatible or inefficient on mobile platforms causing the application to struggle during loading.
If these suggestions do not resolve the issue, please share any console logs you obtain from the Safari developer tools, as they could provide insights into what might be causing the loading failure.
3 replies left
thread_yYv7TX4Vdwxkw1lNmn4Jvwpl
Reply to this message to continue the conversation
Repeated page reloads are usually a sign that the browser is running out of memory, which can happen if the files end up being very large.
For iOS AR we are converting to USDZ on-the-fly which puts the device under some pressure – I’ll try from your link as well.
Some notes regarding the link you shared @araheemUrbanSim:
- There are more than 200 MB of resources loaded, only part of that being Needle. That will put a lot of mobile devices under stress to the point of potentially going out of memory.
- Lots of data being requested isn’t actually used at the start – e.g. all the product thumbnails seem to be loaded immediately despite only being needed later. You might want to use lazy loading there.
- Same is true for the photogrammetry dishes – I think they should be loaded on-demand, and they should be compressed, right now they’re glTF files with base64 embedded resources.
- one quick fix for this is that you put the dishes into your Unity project as well
- then they will be compressed by the Needle build pipeline automatically
- or you right click > export them as “Needle compressed glb” and re-upload to AWS.
This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.