Skip to content

Instantly share code, notes, and snippets.

@sogaiu
Created September 9, 2018 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sogaiu/d471eb059d93722f36c3cf240bc0e2b5 to your computer and use it in GitHub Desktop.
Save sogaiu/d471eb059d93722f36c3cf240bc0e2b5 to your computer and use it in GitHub Desktop.
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