I’m trying to make an object only lit by one light. I don’t want ambient light to affect it, but I want ambient light to affect other objects. I am using unity 2018.1.6f1. How do I do this?
I might be mistaken, I think the ambient lighting is built-in to the lighting model for all standard unity shaders.
So I think you’d need to make/modify a custom shader, with it’s own lighting model, with ambient as shader parameters.
Another possible option…There are callbacks you can put on a script on an object… OnPreRender, OnPostRender.
So… you could try changing the global ambient light settings via script in that OnPreRender, then changing them back in the OnPostRender.
I’m not sure if this would have any performance considerations or not… you’d have to try it and see.