I just built this for Xcode 13.1 by applying the following diffs (make sure you're building for a device, not the simulator - the code doesn't compile for the simulator, which isn't mentioned in the README - FB9181536):
diff --git a/Underwater/Octopus.swift b/Underwater/Octopus.swift
index e447a32..7a99708 100644
--- a/Underwater/Octopus.swift
+++ b/Underwater/Octopus.swift
@@ -82,7 +82,7 @@ struct OctopusSystem: RealityKit.System {
let scene = context.scene
for octopus in scene.performQuery(OctopusComponent.query) {
guard octopus.isEnabled else { continue }
- guard var component = octopus.components[OctopusComponent] as? OctopusComponent else { continue }
+ guard var component = octopus.components[OctopusComponent.self] as? OctopusComponent else { continue }
guard component.settings?.octopus.fearsCamera ?? false else { return }
switch component.state {
case .hiding:
diff --git a/Underwater/Scattering.swift b/Underwater/Scattering.swift
index 0883bdb..db3aa47 100644
--- a/Underwater/Scattering.swift
+++ b/Underwater/Scattering.swift
@@ -127,8 +127,8 @@ extension Entity {
if let animation = try? AnimationResource.generate(with: FromToByAnimation<Transform>(
from: transformWithZeroScale,
to: transform,
- duration: 1.0,
- targetPath: .transform
+ duration: 1.0
+// targetPath: .transform
)) {
playAnimation(animation)
}