Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize Multi-scene switching in NVisionXR_iOS

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly shows you "how to achieve multi-scene switching in NVisionXR_iOS". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to achieve multi-scene switching in NVisionXR_iOS".

1. Open the comments of MyFirstScene

2. Change the startup status of VideoScene to GENERAL_SCENEPLAY, as shown in the figure

Code:

MyFirstScene * firstScene = [[MyFirstScene alloc] initWithName:@ "first_scene"]; [[NVAppDirector sharedNVAppDirector] addScenePlay:@ "MAIN_SCENEPLAY" Scene:firstScene]; VideoScene * videoScene = [[VideoScene alloc] initWithName:@ "video_scene"]; [[NVAppDirector sharedNVAppDirector] addScenePlay:@ "GENERAL_SCENEPLAY" Scene:videoScene]

3. In this way, MyFirstScene is set to start the scene, and VideoScene is set to wait for the scene.

Open MyFirstScene.m and teach you how to do object interaction in tutorial 6.

After clicking on the cube, we switch the scene to VideoScene. If you have forgotten how to click on interaction, you can see tutorial 6 http://www.arvrschool.com/read-7392.

Code:

/ / Click event-(void) onClick: (NVWidget *) whether the object clicked is the same as the object name of the cube if ([[widget getName] isEqualToString:@ "cube"]) {/ / jump from one scene to another. / / the parameter to be passed is the name of the scene [self startScenePlayFrom: [self GetName] To:@ "video_scene"];}}

In this way, when you click on the cube, you will jump to the video scene; similarly, we can set a clickable object in the video scene, and jump to the MyFirstScene scene when you click on the object, thus switching between the scenes.

These are all the contents of the article "how to switch multiple scenes in NVisionXR_iOS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report