Hey guys,
my problem is quite simple:
I have several GameObjects (Cars) that - depending on distance to camera and a “mood”-variable - change their mesh (like LOD) or material.
Neither mesh nor material are actually “in the scene”: The Spawnpoint GO - placing the cars in the scene - has a List of GameObjects (Cars), which then again have their two meshes and three materials. While playing the cars dynamically change their shared mesh / material. This works fine in Editor and did already worked on devices (!) (e.g. WinRT, Windows Phone 8, Windows 8), but stopped working. When changing the LOD the mesh isn’t rendered, when changing the material it becomes pink.
This happens on all three platforms outside of the editor. As it is working IN the editor, it shouldn’t be a “code-problem.”
What might be the reason for the differing behaviour?
Cheers,
Daniel
Ok,
so I found a solution to that problem, although I can’t explain why the old system stopped working. As a reminder: Resources we’re assigned to variables in the editor and then randomly disapppeared. When using Resources.Load during the Start() Routine everything works fine, so there appears to be a big difference between assigning and loading.
Still I don’t know why this did work once in the first place. Anyway, Resources.Load() appears to be the right way to get Resources in the scene.
Cheers