#if HAVE_NODECANVAS
using System;
using UnityEngine;
using ParadoxNotion.Design;
using NodeCanvas.Framework;
namespace Framework.Cameras {
/// Changes the active camera
[Category("Camera")]
[Description("Changes the active camera")]
public class SetActiveCameraTask : ActionTask {
/// Camera that will be activated
[RequiredField]
public BBParameter Camera;
/// Summary of what this action does
protected override string info {
get { return "Activate Camera " + this.Camera.name; }
}
/// Called once when the action is executed
protected override void OnExecute() {
CameraHelper.ActivateCamera(this.Camera.value);
EndAction();
}
}
} // namespace Framework.Cameras
#endif // HAVE_NODECANVAS