UnityRuntimeOBJLoaderDocs icon indicating copy to clipboard operation
UnityRuntimeOBJLoaderDocs copied to clipboard

Importing .obj on IOS

Open daangijzen opened this issue 1 year ago • 1 comments

Hey hi!

On IOS I get an error while importing an .obj saved to a specific path. And I really don't get why it doesn't load. Maybe you know what the error means.

Thanks in advance!

Path: /var/mobile/Containers/Data/Application/2C11AF7A-7854-4D49-89CF-AEF38BBDE4F0/Documents/Scans/textured_output.obj ObjectImporter:GetObjectFromPath()

Error: ArgumentNullException: Value cannot be null. Parameter name: shader Dummiesman.OBJObjectBuilder.Build () (at <00000000000000000000000000000000>:0) Dummiesman.OBJLoader.Load (System.IO.Stream input) (at <00000000000000000000000000000000>:0) Dummiesman.OBJLoader.Load (System.String path, System.String mtlPath) (at <00000000000000000000000000000000>:0) ObjectImporter.GetObjectFromPath () (at <00000000000000000000000000000000>:0) UnityEngine.Events.UnityEvent.Invoke () (at <00000000000000000000000000000000>:0) UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <00000000000000000000000000000000>:0) UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, System.Boolean pressed, System.Boolean released) (at <00000000000000000000000000000000>:0) UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchEvents () (at <00000000000000000000000000000000>:0) UnityEngine.EventSystems.StandaloneInputModule.Process () (at <00000000000000000000000000000000>:0) UnityEngine.EventSystems.StandaloneInputModule:Process()

daangijzen avatar Jan 29 '24 14:01 daangijzen

So the problem was that I used URP, that meant that the material conversion didn't work with the material. The solution was that I needed to update the material importer to URP.

daangijzen avatar Jan 29 '24 16:01 daangijzen