move gob.Register(SceneRef) to sceneref.go

This commit is contained in:
Josh Deprez 2021-08-23 18:08:14 +10:00
parent 1d3327cb1c
commit 4eaf48f380
2 changed files with 4 additions and 1 deletions

View file

@ -24,7 +24,6 @@ var (
func init() { func init() {
gob.Register(AnimRef{}) gob.Register(AnimRef{})
gob.Register(ImageRef{}) gob.Register(ImageRef{})
gob.Register(SceneRef{})
} }
type assetKey struct { type assetKey struct {

View file

@ -15,6 +15,10 @@ var (
_ Scener = &SceneRef{} _ Scener = &SceneRef{}
) )
func init() {
gob.Register(SceneRef{})
}
// SceneRef loads a gzipped, gob-encoded Scene from the asset FS. // SceneRef loads a gzipped, gob-encoded Scene from the asset FS.
// After Load, Scene is usable. // After Load, Scene is usable.
// This is mostly useful for scenes that refer to other scenes, e.g. // This is mostly useful for scenes that refer to other scenes, e.g.