View source: R/scene_management.R
new_scene | R Documentation |
Create a new scene in a Unity project.
new_scene( script, setup = c("EmptyScene", "DefaultGameObjects"), mode = c("Additive", "Single"), method_name = NULL, exec = TRUE )
script |
A |
setup |
One of "EmptyScene" ("No game objects are added to the new Scene.") or "DefaultGameObjects" ("Adds default game objects to the new Scene (a light and camera).") |
mode |
One of "Additive" ("The newly created Scene is added to the current open Scenes.") or "Single" ("All current open Scenes are closed and the newly created Scene are opened.") |
method_name |
The internal name to use for the C# method created. Will be randomly generated if not set. |
exec |
Logical: Should the C# method be included in the set executed by MainFunc? |
Other props:
add_default_player()
,
add_light()
,
add_prop()
,
add_texture()
,
create_terrain()
,
import_asset()
,
instantiate_prefab()
,
load_png()
,
load_scene()
,
read_raw()
,
save_scene()
,
set_active_scene()
,
validate_path()
Other utilities:
add_default_player()
,
add_prop()
,
create_unity_project()
,
find_unity()
,
get_asset()
,
load_png()
,
load_scene()
,
read_raw()
,
save_scene()
,
set_active_scene()
,
validate_path()
,
waiver()
# 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() ) # Now add props: script <- new_scene(script) # Lastly, execute the script via the `action` function
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.