diff --git a/engine/asset.go b/engine/asset.go index 99fc354..e57a0bd 100644 --- a/engine/asset.go +++ b/engine/asset.go @@ -24,7 +24,6 @@ var ( func init() { gob.Register(AnimRef{}) gob.Register(ImageRef{}) - gob.Register(SceneRef{}) } type assetKey struct { diff --git a/engine/sceneref.go b/engine/sceneref.go index a352187..8220dee 100644 --- a/engine/sceneref.go +++ b/engine/sceneref.go @@ -15,6 +15,10 @@ var ( _ Scener = &SceneRef{} ) +func init() { + gob.Register(SceneRef{}) +} + // SceneRef loads a gzipped, gob-encoded Scene from the asset FS. // After Load, Scene is usable. // This is mostly useful for scenes that refer to other scenes, e.g.