/// <summary> /// Draws the content of the target. /// </summary> /// <param name="_attribute">Attribute.</param> public void DrawTargetContent(ICECreatureTargetAttribute _attribute) { TargetType _type = TargetType.UNDEFINED; if (_attribute.GetComponentInChildren <ICECreaturePlayer>() != null) { _type = TargetType.PLAYER; } else if (_attribute.GetComponentInChildren <ICECreatureItem>() != null) { _type = TargetType.ITEM; } else if (_attribute.GetComponentInChildren <ICECreatureLocation>() != null) { _type = TargetType.WAYPOINT; } else if (_attribute.GetComponentInChildren <ICECreatureWaypoint>() != null) { _type = TargetType.WAYPOINT; } else if (_attribute.GetComponentInChildren <ICECreatureMarker>() != null) { _type = TargetType.WAYPOINT; } else if (_attribute.GetComponentInChildren <ICECreatureControl>() != null) { _type = TargetType.CREATURE; } ICEEditorLayout.Label("Default Target Settings", true); EditorGUI.indentLevel++; CreatureObjectEditor.DrawTargetSelectorsObject(null, _attribute.Target, _attribute.Target.Selectors, _type, 0, 250); TargetEditor.DrawTargetMoveSpecification(null, _attribute.Target); EditorGUI.indentLevel--; }
public override void OnInspectorGUI() { ICECreatureTargetAttribute _attribute = DrawEntityHeader <ICECreatureTargetAttribute>(); DrawTargetContent(_attribute); DrawFooter(_attribute); }