Closed roydbt closed 4 months ago
Did you complete step 6 of the first section? I'm guessing the file would be called "First2DGameSwift.swift", and since its omitted here alongside the other files you've provided, I'm wondering if that step may have been skipped by mistake?
Here is "First2DGameSwift.swift":
// The Swift Programming Language
// https://docs.swift.org/swift-book
import SwiftGodot
#initSwiftExtension(cdecl: "swift_entry_point", types: [])
Also it might be worth mentioning that the error is in the Xcode editor and not in the build process.
In Package.swift, in your SwiftGodot dependency, try changing the branch from "main" to "db759c5776933a12f937e2449830d01e6ceae5ea".
I revisited my own tutorial run-through, and when I updated the packages I got the same inline errors. That commit was what the project was on when I completed it. A recent commit may have introduced the issue.
This should unblock you for the time being!
That didn't fix the issue, but after restarting Xcode, waiting for it to index the files about 3 times, build twice, and build the documentation, it worked even on the main branch!
I am trying to follow the "Your First Extension" tutorial (with some adjustments) and getting an error in the second section. Here is my "Package.swift" file:
and here is my "Sources/First2DGameSwift/Player.swift" file:
Inside "Player.swift", on the last line, I am getting a "Cannot find type 'Area2D' in scope" error. Changing
Area2D
to "CharacterBody2D" as the tutorial suggests doesn't fix the error.Versions: