arcadia-unity / Arcadia

Clojure in Unity
http://arcadia-unity.github.io/
Apache License 2.0
1.68k stars 108 forks source link

Bad error when calling `descendents` on destroyed GameObject #377

Open timsgardner opened 4 years ago

timsgardner commented 4 years ago
(def the-object (GameObject. "the-object"))
(ac/retire the-object)
(ac/descendents the-object)

throws:

System.ArgumentException: Expects instance of UnityEngine.GameObject, instead received instance of UnityEngine.GameObject
Parameter name: x
  Arcadia.Util.CastToGameObject (object) intervention_api_project/Assets/Arcadia/Helpers/Util.cs (454:4)
* arcadia/core/children
* clojure/core/tree-seqwalkfn
  clojure.lang.LazySeq.sval ()
  NO_CLASS.NO_METHOD
  clojure.lang.LazySeq.seq ()
  NO_CLASS.NO_METHOD
  clojure.lang.RT.seq (object)
* clojure/core/seq
* clojure/core/print-sequential
* clojure/core/evalfn
* clojure.lang.MultiFn
* clojure/core/pr-on
* clojure/core/pr
* clojure.lang.AFn
* clojure.lang.RestFn
* clojure/core/apply
* clojure/core/prn
* clojure.lang.RestFn
* arcadia/internal/socket-repl/game-thread-evalfnfnfn
* arcadia/internal/socket-repl/game-thread-evalfnfn