using NodeCanvas.Framework; using ParadoxNotion.Design; using UnityEngine; namespace NodeCanvas.Tasks.Actions { [Category("GameObject")] public class CreatePrimitive : ActionTask { public BBParameter objectName; public BBParameter position; public BBParameter rotation; public BBParameter type; [BlackboardOnly] public BBParameter saveAs; protected override void OnExecute() { var newGO = GameObject.CreatePrimitive(type.value); newGO.name = objectName.value; newGO.transform.position = position.value; newGO.transform.eulerAngles = rotation.value; saveAs.value = newGO; EndAction(); } } }