set_active_scene {unifir} | R Documentation |
Set a single scene to active.
Description
Set a single scene to active.
Usage
set_active_scene(script, scene_name = NULL, method_name = NULL, exec = FALSE)
Arguments
script |
A |
scene_name |
The name of the scene to set as the active scene. |
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? |
See Also
Other props:
add_default_player()
,
add_light()
,
add_prop()
,
add_texture()
,
create_terrain()
,
import_asset()
,
instantiate_prefab()
,
load_png()
,
load_scene()
,
new_scene()
,
read_raw()
,
save_scene()
,
validate_path()
Other utilities:
add_default_player()
,
add_prop()
,
create_unity_project()
,
find_unity()
,
get_asset()
,
load_png()
,
load_scene()
,
new_scene()
,
read_raw()
,
save_scene()
,
validate_path()
,
waiver()
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()
)
# Now add props:
script <- set_active_scene(script, scene_name = "some_scene")
# Lastly, execute the script via the `action` function
[Package unifir version 0.2.4 Index]