17 lines
329 B
C#
17 lines
329 B
C#
using Sandbox;
|
|
|
|
public sealed class EnvmapReloader : Component
|
|
{
|
|
protected override void OnStart()
|
|
{
|
|
GameObject.Enabled = false;
|
|
EnableAsync( GameObject, .01f );
|
|
}
|
|
|
|
async void EnableAsync( GameObject go, float delay )
|
|
{
|
|
await GameTask.DelaySeconds( delay );
|
|
if ( go != null && go.IsValid() ) go.Enabled = true;
|
|
}
|
|
}
|