Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
attempt at support for loading multiple scenes in tween/timeline
;; just use DontDestroyOnLoad?
(defn mono-obj []
(if (. Application isPlaying)
(or (if (not (UnityEngine.Object/op_Equality @-mono-obj nil))
(vreset! -mono-obj
(let [o (or (GameObject/Find "tween.core/-mono-obj")
(let [obj (GameObject. "tween.core/-mono-obj")]
(UnityEngine.Object/DontDestroyOnLoad obj)))]
(or (.GetComponent o MonoObj)
(.AddComponent o MonoObj)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment