-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Status of this project #388
Comments
It seems to have been abandoned by the developers, although it still works as it should on Unity 2021.3 LTS (not on 2022.1 though). Some people in the community have considered forking it for continued maintenance, but nothing has come of it so far. I do not have the experience to do that at the moment and others seem not to have the time. For now, Arcadia is largely abandonware, but I hope that this will change in the future. If I ever get to a point where I have both the skill and the time to fork/maintain it, I will, but for now I can't do much. |
Any idea how difficult it would be to make it work on 2022.1, or what are the reasons for it not working there? I'm relatively new to Clojure but know a bit about Unity, so I'm curious what change Unity introduced that caused Arcadia to break. |
I don't know the details. All I can tell you is that Arcadia is now prevented from running play mode. I wish I could help you more. |
@darthdeus I have asked around in the Arcadia chatroom over at Gitter for you. I highly recommend joining it if you are interested in Arcadia, even if the group isn't super active. It'll make coordination a bit easier :) https://gitter.im/arcadia-unity/Arcadia |
i mean, have you seen what tims is working on now? https://www.youtube.com/watch?v=Mc2r2qmC0y4 live edit games as they run |
@darthdeus so I had a project working with unity 2021.2.1f1, not seen any issues. Just tried it with 2022.1.20f1 with the instructions here. It seems to load and work fine? What problems are you seeing? I'm not an arcadia core dev, but I have been keeping an eye on the project =)... |
That's strange. I've heard from @ekhart that Arcadia no longer works for him. Perhaps he can give us some more info. |
Okay so I tried it, I ran into one error after adding Arcadia in Unity 2022.1.17f1 (just downloaded the latest release zip and copy pasted into assets). The error was
I clicked on the |
Hi @darthdeus, possible? I think I've seen that error before. The reason I pointed specifically to the instructions I used previously is that I know they produce a working output on my side. It would be good to shake out any issues with the process and fix them. |
https://github.com/arcadia-unity/Arcadia/tree/ifrit Interesting – this appears to be an active branch of Arcadia ahead of the main branch, and one of the main devs (@timsgardner) actually contributed to it as recent as last November. Does this branch have the same issues as the main one? |
This is when cider asks for
This is because cider tries to pretty print a stacktrace but resolving (defun cider-default-err-eval-handler ()
"Display the last exception without middleware support."
(cider--handle-err-eval-response
(cider-nrepl-sync-request:eval
"(clojure.stacktrace/print-cause-trace *e)"))) This should be somewhat fixed with a recent version of cider because it has a check: (defun cider-default-err-handler ()
"This function determines how the error buffer is shown.
It delegates the actual error content to the eval or op handler."
(cond ((cider-nrepl-op-supported-p "analyze-last-stacktrace")
(cider-default-err-op-handler))
((cider-library-present-p "clojure.stacktrace")
(cider-default-err-eval-handler))
(t (cider-default-err-eval-print-handler))))
A current workaround would be to redefine (defun cider-interactive-eval-handler (&optional buffer place)
"Make an interactive eval handler for BUFFER.
PLACE is used to display the evaluation result.
If non-nil, it can be the position where the evaluated sexp ends,
or it can be a list with (START END) of the evaluated region.
Update the cider-inspector buffer with the evaluation result
when `cider-auto-inspect-after-eval' is non-nil."
(let* ((eval-buffer (current-buffer))
(beg (car-safe place))
(end (or (car-safe (cdr-safe place)) place))
(beg (when beg (copy-marker beg)))
(end (when end (copy-marker end)))
(fringed nil)
(res ""))
(nrepl-make-response-handler (or buffer eval-buffer)
(lambda (_buffer value)
(setq res (concat res value))
(cider--display-interactive-eval-result res end))
(lambda (_buffer out)
(cider-emit-interactive-eval-output out))
(lambda (_buffer err)
(cider-emit-interactive-eval-err-output err)
(when (not (string-empty-p err))
(when (or (not cider-show-error-buffer)
(not (cider-connection-has-capability-p 'jvm-compilation-errors)))
;; Display errors as temporary overlays
(let ((cider-result-use-clojure-font-lock nil))
(cider--display-interactive-eval-result
err end 'cider-error-overlay-face))))
(cider-handle-compilation-errors err eval-buffer))
(lambda (buffer)
(if beg
(unless fringed
(cider--make-fringe-overlays-for-region beg end)
(setq fringed t))
(cider--make-fringe-overlay end))
(when (and cider-auto-inspect-after-eval
(boundp 'cider-inspector-buffer)
(windowp (get-buffer-window cider-inspector-buffer 'visible)))
(cider-inspect-last-result)
(select-window (get-buffer-window buffer)))
(when cider-eval-register
(set-register cider-eval-register res)))))) clojure-emacs/cider@master...benjamin-asdf:cider:do-not-display-empty-err-overlays |
Just wanted to thank all contributors for posting updates |
My pleasure! =) |
Has anyone tried out this branch, out of curiosity? |
I tried using Arcadia myself. It is currently completely unusable for me in every possible way. I can't attach Arcadia scripts to components with Arcadia Behaviours (it just says "No functions"), and I can't use the REPL either, because anything I do nets me an error: At this point, I am very close to giving up completely. Arcadia no longer works and no one seems to have both the time and the interest to maintain the repository. It's really just sad, since using Clojure in Unity is so much cooler than C#. :( |
as i also said on gitter: the REPL works fine, there is no function "log", but you can try println. though more as a joke, admittedly. you get something out of that so, what exactly are talking about? i'll try out some of my old projects in the mean time edit: |
Also as said on Gitter :P
|
Oh, wait. I just saw your edit. Yeah, I figured that "log" is a real function, and that it doesn't work. I'm in my exam period right now, so my schedule is a bit crammed; but as soon as I find a bit of free time I'll take a look at my install of Arcadia to see what's wrong. What do you suggest I do? |
o hi i would check your unity version, arcadia commit and repl client. most likely is the repl client though |
@TheWitheredStriker I was able to get a basic scene running with a REPL and the 1. Installing Arcadia with UnityFollow the steps in Getting Started doc:
After Unity loads the new code (i.e. modal disappears) open the Console in the Unity editor and you should see a log message saying "Arcadia Started!" Finally, from the Unity menu bar select Arcadia → AOT Compile to compile all of Arcadia's source code into your project for faster load times. The logs should look like this: 2. Creating a Unity object and attaching an Update scriptTo get a basic script working I followed the docs from the Using Arcadia section of the wiki, specifically Hooks and State and Storing a Start-hook in the scene. First, create a new file (ns game.core
(:use arcadia.core)
(:use arcadia.linear))
(defn log-name [obj role-key]
(log (.name obj)))
(defn spawn-cube
"Spawns a cube `n` units in front of the `MainCamera`"
[name & {:keys [n]
:or {n 3}}]
(let [cube (create-primitive :cube name)
tr-cam (. Camera/main transform)]
(set! (.. cube transform position)
(v3+ (. tr-cam position)
(v3* (. tr-cam forward) n)))))
(comment
(require 'game.core)
(when-not (object-named "Nice Cube")
(spawn-cube "Nice Cube"))
(hook+ (object-named "Nice Cube") :update :log-name #'log-name)) Then, eval each expression in the
After running those steps, you should have an Arcadia-generated cube in your scene with an Update script attached: Playing the scene confirms that it is, indeed, a nice cube 😎 I hope this helps! (note: this worked with both the default |
Woah! That's incredible, and in deep detail! Thank you so much, Christian! So the go-to-way to create and attach Clojure scripts is by using the REPL? |
No problem! I’m not sure if it’s the go-to way as I just started looking into this project today. Either way I would love to use Clojure as the language to interface with Unity so if I find out more I’ll be sure to report back. |
Just curious -- what's the status of Arcadia? It hasn't been updated for a few years. Is it complete at this point?
The text was updated successfully, but these errors were encountered: