No Function `GetMaterial`
Nv7-GitHub opened this issue · 3 comments
Nv7-GitHub commented
When I tried installing from source, I got the error:
# github.com/danaugrs/gokoban
go/pkg/mod/github.com/danaugrs/gokoban@v0.0.0-20180818141602-8354b7514160/main.go:548:33: skybox.Graphic.Materials()[i].GetMaterial undefined (type graphic.GraphicMaterial has no field or method GetMaterial)
How can I fix this?
aabbtree77 commented
I had the same error on Ubuntu 20.04, March 17, 2021. The following worked for me:
cd $GOPATH/src/github.com/danaugrs
If it does not exist, create the whole precise path, make sure that your GOPATH is not empty.
git clone https://github.com/jtolio/gokoban.git --branch patch-1 --single-branch
This will create gokoban inside danaugrs. This particular branch by jtolio fixes the problem by replacing the line 548 in main.go
sbmat := skybox.Materials()[i].GetMaterial().(*material.Standard)
with
sbmat := skybox.Materials()[i].IMaterial().(*material.Standard)
cd gokoban
go mod init
go mod tidy
go mod vendor
go build
./gokoban
Nv7-GitHub commented
Thank you! I made a fork and did this