Questions tagged [scene]

'scene' can refer to various things. Please combine this tag with other tags to put your question into perspective.

The Scene class is the container for all content in a scene graph.

Within Scenes represent game levels and screens, which are loaded one at a time according to the game mechanics. The scene is a key element in Unity editor and contains the , assets and other game elements.

996 questions
4
votes
6 answers

How to destroy a game object marked "DontDestroyOnLoad" when a new scene loads?

So I created a music player to play music through all my menu and story scenes without interrupting, but then in my game scene I want to delete that music. How can destroy the playing music when my game scene loads? Here is my music script: #pragma…
Anton nelson
  • 333
  • 3
  • 8
  • 18
4
votes
1 answer

Using JavaFX 8 Scene, Read Keyboard Input while running

I have my JavaFX 8 Scene going nicely. Now, while everything else is happening, I would like to continuously check for any KeyEvent/KeyCode while the program is running. I have a Timeline called timeline set to INDEFINITE and I've set my cycle count…
JCoder
  • 189
  • 1
  • 3
  • 17
4
votes
1 answer

JavaFX open a new scene

I want my code to work such that when I click on a Button, a new scene opens, but it doesn't work and I don't know why. public void start(Stage primaryStage) throws Exception { window = primaryStage; Parent root =…
user3885592
4
votes
2 answers

Setting onClickListeners for buttons in scenes programmatically

I have 2 layouts which contain the same buttons layout_1.xml
4
votes
2 answers

Large 3D scene streaming

I'm working on a 3D engine suitable for very large scene display. Appart of the rendering itself (frustum culling, occlusion culling, etc.), I'm wondering what is the best solution for scene management. Data is given as a huge list of 3D meshs, with…
ingham
  • 1,636
  • 15
  • 30
4
votes
0 answers

Android ImageView Transition with transition manager act weird

I'm using android's new transition manager comes with 4.4 Kit-Kat. I have two scenes for this imageView as shown below: expanded_scene.xml
Alkimake
  • 1,797
  • 14
  • 30
4
votes
2 answers

How To exclude helper objects from intersection check by raycaster in threejs?

I have a threejs scene with intersection checking on objects. I'm adding every scene object to the array which is then checked by the raycaster. var intersects = raycaster.intersectObjects( scene.children ); I then check the color of an object and…
sthag
  • 43
  • 1
  • 6
4
votes
2 answers

How can I make my instance of a Singleton MonoBehaviour class start as new when reloading the scene?

I have a 'SingletonManager' class with an instance of the 'LevelManager' singleton (and interface to it). The 'LevelManager' GameObject is not supposed to be persistant throughout the application lifetime and should be replaced with a new instance…
Jamie Reid
  • 41
  • 2
4
votes
4 answers

Understanding Scenes in Corona SDK

I am very new to Corona. In my game, i would like to have a menu with several options (like "single player" or "settings"). When tapping any of those options that screen fades away and a new one appears. This next screen (after tapping "single…
haisi
  • 39
  • 1
  • 9
4
votes
1 answer

Is there an alternative to a scenegraph?

Scene graphs give you the possibility to reason about their position -> if one node doesn't need to be rendered, the children of that node also don't need to be rendered. But it seems that it might not be the best approach if the objects in the…
Maik Klein
  • 15,548
  • 27
  • 101
  • 197
4
votes
2 answers

Javafx PieChart created with scene builder does not dispaly data

Im having trouble using some of the Javafx examples from Oracle as the 'scenes' are not created with the Scene Builder so the code differs from what I want to use it for. Im trying to create a layout with scenebuilder that holds a Pie Chart. I have…
user1673554
  • 451
  • 2
  • 6
  • 12
3
votes
0 answers

Unexpected order of scene delegate method calls in Swift iOS app

I am encountering an unusual sequence of scene delegate method calls in my Swift iOS app. Specifically, sceneWillEnterForeground gets called before sceneDidEnterBackground, but with a different UIWindowScene instance. Here's the specific…
mmatiush
  • 31
  • 1
  • 4
3
votes
1 answer

Adding an image into a JavaFX TableView column

I am new to Java and OOP and got stuck in adding image to tableview column. Code seems to work, I can see the name of the student correct but images are not shown in the column. I am getting this error and could not understand how to make it…
3
votes
1 answer

Phaser3 Scene switching error. How can i do?

I have this error when I touch a wall to change scene: Cannot read properties of undefined (reading 'start') I tried several techniques but none worked, yet I have no other errors and my code is quite simple and I don't understand why it doesn't…
Soralienne
  • 73
  • 4
3
votes
1 answer

How to set the CCTransitionPageTurn orientation to vertical?

I used the code as follow to implement the effect of replace scenes: [[CCDirector sharedDirector] replaceScene:[CCTransitionPageTurn transitionWithDuration:0.5f scene:alterScene backwards:NO]]; Then, the effect that is reversed to appear as if the…
Fannic
  • 99
  • 1
  • 6