PreviewLightingSetup
public static class PreviewLightingSetupCentralized lighting creation and positioning for all preview types. Consolidates lighting logic from PreviewManager, CustomPreviewStage, and PreviewSceneSetup.
Methods
Section titled “Methods”
CreateMainLight(Scene, bool)
Section titled “CreateMainLight(Scene, bool)”public static Light CreateMainLight(Scene scene, bool addToScene = true)Create main preview light
Parameters
| Name | Type | Description |
|---|---|---|
scene |
UnityEngine.SceneManagement.Scene | |
addToScene |
System.Boolean |
Returns
UnityEngine.Light — No return description is available.
CreateSecondaryLight(Scene, bool)
Section titled “CreateSecondaryLight(Scene, bool)”public static Light CreateSecondaryLight(Scene scene, bool addToScene = true)Create secondary rim light
Parameters
| Name | Type | Description |
|---|---|---|
scene |
UnityEngine.SceneManagement.Scene | |
addToScene |
System.Boolean |
Returns
UnityEngine.Light — No return description is available.
GetLightColor()
Section titled “GetLightColor()”public static Color GetLightColor()Get main light color from configuration
Returns
UnityEngine.Color — No return description is available.
GetSecondaryLightColor()
Section titled “GetSecondaryLightColor()”public static Color GetSecondaryLightColor()Get secondary light color from configuration
Returns
UnityEngine.Color — No return description is available.
SetLightIntensity(Light, bool)
Section titled “SetLightIntensity(Light, bool)”public static void SetLightIntensity(Light light, bool isSecondary)Set light intensity based on render pipeline
Parameters
| Name | Type | Description |
|---|---|---|
light |
UnityEngine.Light | |
isSecondary |
System.Boolean | |
PositionLight(Light, Camera, GameObject, PrefabType, bool)
Section titled “PositionLight(Light, Camera, GameObject, PrefabType, bool)”public static void PositionLight(Light light, Camera camera, GameObject target, CustomPrefabPreviewGenerator.PrefabType prefabType = PrefabType.Model, bool isSecondaryLight = false)Position light relative to camera and target
Parameters
| Name | Type | Description |
|---|---|---|
light |
UnityEngine.Light | |
camera |
UnityEngine.Camera | |
target |
UnityEngine.GameObject | |
prefabType |
AssetInventory.CustomPrefabPreviewGenerator.PrefabType | |
isSecondaryLight |
System.Boolean | |
PositionLightForScene(Light, Camera, Bounds)
Section titled “PositionLightForScene(Light, Camera, Bounds)”public static void PositionLightForScene(Light light, Camera camera, Bounds bounds)Position light for scene rendering
Parameters
| Name | Type | Description |
|---|---|---|
light |
UnityEngine.Light | |
camera |
UnityEngine.Camera | |
bounds |
UnityEngine.Bounds |