action {unifir} | R Documentation |
Build and execute a unifir_script
Description
Build and execute a unifir_script
Usage
action(script, write = TRUE, exec = TRUE, quit = TRUE)
Arguments
script |
The |
write |
Boolean: Write the generated script to a file? |
exec |
Boolean: Execute the script inside of the Unity project? Note
that if |
quit |
Boolean: Quit Unity after execution? |
Value
If exec = FALSE
, the original unifir_script
object passed to
script
. If exec = TRUE
, the same unifir_script
object with its
props replaced by the C# they generate.
Examples
# First, create a script object.
# CRAN doesn't have Unity installed, so pass
# a waiver object to skip the Unity-lookup stage:
script <- make_script("example_script",
unity = waiver()
)
# Then add any number of props to it:
script <- add_light(script)
# Then call `action` to execute the script!
if (interactive()) {
action(script)
}
[Package unifir version 0.2.4 Index]