public IsoTile Extrude(Vector3 _direction, bool _bContinuously, bool _withAttachment) { IsoTile _new = Duplicate(); if (!_withAttachment) { _new.Clear_Attachment(false); } Undo.RegisterCreatedObjectUndo(_new.gameObject, "IsoTile:Extrude"); _new.coordinates.Translate(_direction, "IsoTile:Extrude"); Undo.RecordObject(gameObject, "IsoTile:Extrude"); return(_new); }
static IsoTile extrude(this IsoTile tile, Vector3 _direction, bool _bContinuously, bool _withAttachment) { IsoTile _new = tile.Duplicate(); if (!_withAttachment) { _new.Clear_Attachment(false); } #if UNITY_EDITOR Undo.RegisterCreatedObjectUndo(_new.gameObject, "IsoTile:Extrude"); #endif _new.coordinates.Translate(_direction, "IsoTile:Extrude"); #if UNITY_EDITOR Undo.RecordObject(tile.gameObject, "IsoTile:Extrude"); #endif return(_new); }