You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
556 B
C#

3 years ago
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Gaia
{
public class BakeLightmapsTask : GaiaTaskBase
{
public override void SetTaskTimer(float value)
{
TaskWaitTime = value;
}
public override void DoTask()
{
#if UNITY_EDITOR
Lightmapping.giWorkflowMode = Lightmapping.GIWorkflowMode.OnDemand;
Lightmapping.BakeAsync();
#endif
FinishTask();
}
public override void FinishTask()
{
TaskFinished = true;
}
}
}