← Unity APP
← Xvisio SDK Documentation Home Page
JumpScene1.unity JumpScene2.unity
Provide a scenarios jumping example based on annotation sdk.
Step 1:
As below, set the related components of SDK to "DontDestroyOnLoad".
Corresponding code:
public GameObject[] dontDestoryGroup;
public GameObject uiRaycastCamera;//Note that this is a dynamically copied component
void Start()
{
for (int i = 0; i < dontDestoryGroup.Length; i++)
{
DontDestroyOnLoad(dontDestoryGroup[i]);
}
uiRaycastCamera = GameObject.Find("UIRaycastCamera");
if (uiRaycastCamera != null)
{
DontDestroyOnLoad(uiRaycastCamera);
}
}
//scenarios jumping code
public void jumpScene()
{
SceneManager.LoadScene("JumpScene2");
}
Step 2:
Add the needed two scenes to pack scenarios.
Step 3:
After packing the apk, user can jump the scenarios by clicking the button.