0
votes

I have a basic Unity (5.1) terrain (10x10) in my scene, and a single Point Light. If I play the scene in the editor I see my terrain (with simple grass texture) lit as expected by the light source. However, once I build to the device (iPhone 6), the terrain is present (I can just barely make-out its undulating features), but is totally dark, although other objects in the scene are being lit by the light source.

I'm pretty n00b to Unity and lighting, so it could be something simple, but I've been building on Oculus for over a year and never had this come up as an issue.

1
Sometimes I come across something similar in Unity and my quick fix (not necessarily what you are looking for) is to 'bake the lightmap' so when it is running on iPhone the light map has already been pre-madeWongKongPhooey
Thanks, WongKongPhooey, but I should have stated that baking the light was the first thing I did. Seems like generally people are not having an issue with terrain on iOS, so it must be something in my set-up, which itsel would be weird because right now there are like four objects in my scene.Shannon Perkins

1 Answers

0
votes

And the answer is... "Resources" directory.

This certainly falls into "n00b issue" territory, but the answer is that in order for textures to be included in the build to the device, they need to be included in a dir named "Resources" anywhere below "Assets". There can be more than one "Resources" directory, and they can be anywhere in the directory structure, as long as they are children of "Assets". Once I created the "Resources" directory and dragged my texture into it, then my terrain displayed as expected on the iOS device.