Move and consolidate many third-party plugin files and metadata from various locations (notably Assets/Third Parties/Plugins 1 and scattered Opsive/Photon folders) into a unified Assets/Plugins directory. Includes DOTween, PrimeTween, Native/BackroomsNoise, Sirenix/Odin Inspector, and Opsive UltimateCharacterController/shared libs, plus updates to several .meta files and removal of obsolete installer/legacy files. This standardizes plugin layout and cleans up duplicate/obsolete assets.
34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
/// ---------------------------------------------
|
|
/// Ultimate Character Controller
|
|
/// Copyright (c) Opsive. All Rights Reserved.
|
|
/// https://www.opsive.com
|
|
/// ---------------------------------------------
|
|
|
|
namespace Opsive.UltimateCharacterController.Demo
|
|
{
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// The scene will run slowly if the lightmaps aren't baked with the lights active. If the lightmaps are not baked then disable the lights
|
|
/// so the scene will run at a normal speed.
|
|
/// </summary>
|
|
public class LightmapChecker : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// Determine if there are any lightmaps.
|
|
/// </summary>
|
|
private void Start()
|
|
{
|
|
if (LightmapSettings.lightmaps == null || LightmapSettings.lightmaps.Length == 0) {
|
|
var lights = GetComponentsInChildren<Light>();
|
|
for (int i = 0; i < lights.Length; ++i) {
|
|
if (lights[i].type != LightType.Directional) {
|
|
lights[i].gameObject.SetActive(false);
|
|
}
|
|
}
|
|
} else {
|
|
Destroy(this);
|
|
}
|
|
}
|
|
}
|
|
} |