Some Unity3D goodness – Scripts for Adding Lights

Some Unity3D goodness – Scripts for Adding Lights

Learning to write scripts for assistance in editing/adding geometry within Unity3D is a must for anyone bringing in models from Revit or 3DSMax for Architectural Walkthroughs.  One particular pain point is putting in all the lights or the lights that you wish to cast light within your “game”.  To use these scripts add an Editor folder under the assets folder in your Unity3D project folder.  Once they scripts are copied to this folder, you see new options in the “Game Object” pulldown menu item.  Select some light geometry, for example, some lamp shades in your scene, then click on Game Object – Add pt lights ^n from the menu pulldown.

The natural treatment of premature ejaculation is climaxing remarkably quickly cute-n-tiny.com order levitra either before or shortly after sexual penetration. Physique weakness or http://cute-n-tiny.com/category/cute-animals/page/50/ viagra online in india feeling of fatigue and tiredness 2. Secondly, without a proper medical consultation, the sufferer cannot be sure there might not be another underlying reason for cost levitra their symptoms. Having an erection for more than 4 hours is suggested for the best before making http://cute-n-tiny.com/cute-animals/elephant-shrew/ viagra without prescription sex.
The results will be a child game object component added to each of your selected geometry objects with the same position as the parent object. Also, because it is a child component, it will move should you reposition the light.

Note: a few objects might require tweaking.

Here are a couple of scripts:

  1. Add point lights – This script will add a point light with the name “_pointlight” with the same transform position as a selected light geometry within the Unity3D editor.
  2. Add spot lights – This script will add a spot light with the name “_spotlight” with the same transform position as the selected light geometry within the Unity3D editor.
Note: the light cone is automatically rotated down and is useful for downlighting.