Created
September 12, 2018 03:16
-
-
Save sogaiu/2b107564ad532d1a5023a02d14650f3a to your computer and use it in GitHub Desktop.
attempt at support for loading multiple scenes in tween/timeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; just use DontDestroyOnLoad? | |
(defn mono-obj [] | |
(if (. Application isPlaying) | |
(or (if (not (UnityEngine.Object/op_Equality @-mono-obj nil)) | |
@-mono-obj) | |
(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