Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Changelog
## v0.8.0 - 2026-01-19
### 🐞 Fixes
- [Patch] Added editor version label (a07b4b2…)
- [Patch] added button for multi-platform option (259f3ee…)
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
// Use a branch during active development:
// .package(url: "https://github.com/untoldengine/UntoldEngine.git", branch: "develop"),
// Or pin to a release:
.package(url: "https://github.com/untoldengine/UntoldEngine.git", exact: "0.7.1"),
.package(url: "https://github.com/untoldengine/UntoldEngine.git", exact: "0.8.0"),
],
targets: [
.executableTarget(
Expand Down
19 changes: 14 additions & 5 deletions Sources/UntoldEditor/Build/CreateProjectView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct CreateProjectView: View {

@Environment(\.dismiss) private var dismiss

private let targets = ["macOS", "iOS", "iOS AR", "visionOS"]
private let targets = ["macOS", "iOS", "iOS AR", "visionOS", "Multi-Platform"]
private let macOSVersions = ["13.0", "14.0", "15.0"]
private let optimizationLevels = ["None", "Speed", "Size"]

Expand Down Expand Up @@ -66,7 +66,7 @@ struct CreateProjectView: View {
}
.pickerStyle(.segmented)

if selectedTarget == 0 { // macOS
if selectedTarget == 0 || selectedTarget == 4 { // macOS or Multi-Platform
Picker("macOS Version", selection: $macOSVersion) {
ForEach(0 ..< macOSVersions.count, id: \.self) { index in
Text(macOSVersions[index]).tag(index)
Expand Down Expand Up @@ -248,6 +248,15 @@ struct CreateProjectView: View {
target = .iOS(deployment: .v17)
case 3: // visionOS
target = .visionOS(deployment: .v26)
case 4: // Multi-Platform
let version: MacOSVersion
switch macOSVersion {
case 0: version = .v13
case 1: version = .v14
case 2: version = .v15
default: version = .v15
}
target = .multi(macOS: version, iOS: .v17, visionOS: .v26)
default:
target = .macOS(deployment: .v15)
}
Expand Down Expand Up @@ -291,6 +300,6 @@ struct CreateProjectView: View {
}
}

#Preview {
CreateProjectView()
}
// #Preview {
// CreateProjectView()
// }
9 changes: 9 additions & 0 deletions Sources/UntoldEditor/Editor/ToolbarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
struct ToolbarView: View {
@ObservedObject var selectionManager: SelectionManager
@ObservedObject var editorBasePath = EditorAssetBasePath.shared
private let editorVersionLabel = "v0.8.0"

var onSave: () -> Void
var onSaveAs: () -> Void
Expand Down Expand Up @@ -213,6 +214,14 @@
.background(Color.editorAccent.opacity(0.3))
.cornerRadius(6)
}

Text(editorVersionLabel)
.font(.system(size: 11, weight: .semibold, design: .monospaced))
.foregroundColor(.white)
.padding(.horizontal, 8)
.padding(.vertical, 4)
.background(Color.editorSurface.opacity(0.6))
.cornerRadius(6)
}
}

Expand Down
34 changes: 32 additions & 2 deletions Tests/UntoldEditorTests/CreateProjectViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ final class CreateProjectViewTests: XCTestCase {
target = .iOS(deployment: .v17)
case 3: // visionOS
target = .visionOS(deployment: .v26)
case 4: // Multi-Platform
let version: MacOSVersion
switch macOSVersion {
case 0: version = .v13
case 1: version = .v14
case 2: version = .v15
default: version = .v15
}
target = .multi(macOS: version, iOS: .v17, visionOS: .v26)
default:
target = .macOS(deployment: .v15)
}
Expand Down Expand Up @@ -333,19 +342,20 @@ final class CreateProjectViewTests: XCTestCase {

// MARK: - Target Platform Tests

func test_targetPlatforms_arrayContainsFourOptions() {
func test_targetPlatforms_arrayContainsFiveOptions() {
// Arrange
let view = CreateProjectView()
let mirror = Mirror(reflecting: view)

// Act: Get targets array
if let targets = mirror.descendant("targets") as? [String] {
// Assert
XCTAssertEqual(targets.count, 4, "Should have 4 platform options")
XCTAssertEqual(targets.count, 5, "Should have 5 platform options")
XCTAssertEqual(targets[0], "macOS", "First target should be macOS")
XCTAssertEqual(targets[1], "iOS", "Second target should be iOS")
XCTAssertEqual(targets[2], "iOS AR", "Third target should be iOS AR")
XCTAssertEqual(targets[3], "visionOS", "Fourth target should be visionOS")
XCTAssertEqual(targets[4], "Multi-Platform", "Fifth target should be Multi-Platform")
}
}

Expand Down Expand Up @@ -566,6 +576,25 @@ final class CreateProjectViewTests: XCTestCase {
}
}

func test_targetSwitch_multiPlatform_index4() {
// Arrange
let selectedTarget = 4

// Act
let target: BuildTarget
switch selectedTarget {
case 4: target = .multi(macOS: .v15, iOS: .v17, visionOS: .v26)
default: target = .macOS(deployment: .v15)
}

// Assert
if case .multi = target {
XCTAssertTrue(true, "Target 4 should map to Multi-Platform")
} else {
XCTFail("Target 4 should be Multi-Platform")
}
}

func test_targetSwitch_defaultFallback() {
// Arrange
let selectedTarget = 999 // Invalid index
Expand All @@ -577,6 +606,7 @@ final class CreateProjectViewTests: XCTestCase {
case 1: target = .iOS(deployment: .v17)
case 2: target = .iOS(deployment: .v17)
case 3: target = .visionOS(deployment: .v26)
case 4: target = .multi(macOS: .v15, iOS: .v17, visionOS: .v26)
default: target = .macOS(deployment: .v15)
}

Expand Down
Loading