Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
mysteries of arcadia
;; assuming game object named "Ball" exists
(def ball-name "Ball")
;; this works
(GameObject/Instantiate (Resources/Load "Ball"))
;; but the following leads to error output
(GameObject/Instantiate (Resources/Load ball-name))
MissingMethodException Cannot find member Instantiate matching args
NO_CLASS.NO_METHOD (:0)
NO_CLASS.NO_METHOD (:0)
game/core$eval__14892__14897.__interop_Instantiate14899 (:0)
game/core$eval__14892__14897.invokeStatic (:0)
game/core$eval__14892__14897.invoke (:0)
clojure.lang.Compiler.eval (:0)
clojure.lang.Compiler.eval (:0)
clojure/core$eval__3112.invokeStatic (:0)
clojure/core$eval__3112.invoke (:0)
arcadia/socket_repl$game_thread_evalfn__12464fn__12469__12481.invoke (:0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment