Comments (7)
Yeah, I apologize -- unifir is not really meant to be used directly, but rather to prop up things like terrainr and an unreleased forest rendering project I'm working on. That means that the docs aren't exactly great for interactive use; they sorta assume users will use one of those not-released projects instead.
That said: In a new session, does find_unity()
return the correct path to your Unity installation? It looks like action()
ran successfully on your computer (though Unity itself failed, hence the error message -- that error code is literally the only output Unity returns when run via CLI, which is a pain), which means instead the issue is with the example.
from unifir.
Thanks for the report!
Sorry, this package is primarily tested on Linux and Mac, which means I forget about things like Windows file paths typically having spaces in them.
Any chance you can install my attempted solution and tell me if this fixed things?
remotes::install_github("mikemahoney218/unifir", "fixes")
from unifir.
Thanks !
Now I'm getting this:
unity_version()
Error in system(paste(shQuote(unity), "-version", intern =TRUE):
'"C:Program Files/Unity/Editor"' not found
(Seems better but still not finding Unity)
I changed the unifir_unity_path
variable to file.path("C:","Program Files","Unity","Editor","Unity.exe")
and it seems to be working (kind of).
start_unity <-Sys.time()
unity_version()
character(0)
end_unity <- Sys.time()
Time difference of 12.29863 secs
After using the unity_version() command, the Unity Hub application opens in my computer (good sign ?)
However this happens as I tried your example:
script <- make_script(project="myproj")
script <-add_default_player(script,x_position=10)
script <- add_light(script)
action(script)
Error in action(script): 1
I might be missing something obvious about what to do with the unifir_unity_path
option. I'm also having a similar problem with Mac to connect to Unity, so that's why I tried windows.
from unifir.
I'm going to close this issue. The "finding Unity on Windows" problem is actually fixed. The new error might not be related with finding Unity.
For example this works:
script$script_name
[1] "HappenGoneSteadPath"
from unifir.
No problem. I'll patiently wait for the new release 🌲🌲🌲 ! I'll try terrainr to see if I manage to create an Unity project.
Here is the output in a new session:
find_unity()
[1] "C:/Program Files/Unity/Editor/Unity.exe"
When I run action()
some folders/files are created before failing 🤷♂️:
Assets
, myproj
,Library
, ProjectSettings
and Temp
.
from unifir.
So far you've helped me fix three bugs, thank you 😄
The proximate issue here is that add_default_player()
didn't import a C# library it needed, which means it failed immediately. This is now fixed on the fixes
branch, and will be headed to CRAN in the immediate future (because I need to cut a release soon to fix #12 anyway).
There's one other bug in the example: you need to call save_scene()
, and probably want to call set_active_scene()
afterwards, in order for your changes to appear once you load Unity. Otherwise the unifir script will make all your edits, and then not save any of them. I'm going to open a new issue for a documentation refresh; hopefully I'm able to make the new user experience for unifir itself better in Q1'2023, while also providing more easy-to-use front-ends like terrainr.
from unifir.
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
from unifir.
Related Issues (13)
- Terrain(r) importer HOT 4
- Release unifir 0.2.2 HOT 1
- Revdep failure HOT 4
- Release unifir 0.2.2 HOT 1
- Release unifir 0.2.3 HOT 1
- Release unifir 0.2.4 HOT 1
- General directions HOT 2
- Rename package arg HOT 1
- Issue finding Unity on MacOS and Windows HOT 6
- Example create_terrain() call fails on action() HOT 3
- Add full scene example to user vignette HOT 3
- associated_coordinates() example errors due to missing CRS HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unifir.