Search Unity

Building house prefabs that contain light options

Discussion in 'Editor & General Support' started by Gigasaurus, Aug 1, 2014.

  1. Gigasaurus

    Gigasaurus

    Joined:
    Jan 4, 2014
    Posts:
    6
    I am working on a project where users get to create their own city by browsing a menu of (prefab) structures and adding them to their world. The city they create may go through night/day changes. I would like the houses to be able to have "lights on" if it turns night. Similarly the user may add vehicles to their scene which might have headlights that turn on at night. Does anyone have any ideas on how to achieve this? I'm hoping to find a method that doesn't heavily affect performance (especially during the day when lights aren't needed) because I expect the lighting will only be a "special feature" that only shows up when night-time comes. Is this best achieved with texture swapping to self illuminated shaders? Should I avoid having my vehicles cast actual lights (or is that even doable performance wise)? Any ideas are appreciated.