#This is my main menu, it is very small
1 messages · Page 1 of 1 (latest)
Great
so for your background image, what is the anchor settings?
This thing up here
that should do it
if you hold alt and shift and click on the bottom right, what happens?
It just went smaller
Are you looking at the scene view or the game view?
Game view
Screen space - Overlay
That's all correct, is the background image still not filling the screen?
Nope :/
What does the background image look like in your assets folder?
I have set it to Sprite
Try a different sprite and see if you get the same result.
What if I remove the source image from the background image?
The main menu is in a new scene
When I start the game, the menu fails to appear
When you say 'start the game' do you mean 'enter play mode' or are you making a build?
Enter play mode
But you can see the menu in the game view in edit mode?
Yes
Are there any scripts in the scene?
!code
📃 Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
Can you share it with me?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MainMenu : MonoBehaviour
{
public void PlayGame()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
public void QuitGame()
{
Application.Quit();
}
}
This is fine, nothing here should make your menu disappear
Are the buttons hooked up to these methods?
Yes:
This all looks correct. I'm not sure why you're having any issues. Can you tell me again what the problem is?
Yes, when I start my game from my actual game scene, the main menu scene should pop up but it does not
Unless I am meant to build it in the build settings
Or
There could be an issue with the camera
Have you added the menu scene to your scene list in the build settings?
Can you show me the scene list?
That's showing the scenes in your project
You need to open the build settings
to add a scene to the scene list
Can you double check all the above canvas settings for this UI
because if you have a correctly anchored, scaled and positioned image you should't see any skybox
Show me the settings for the background image
Show me the button setup?
Looks ok at first sight
can you put some debugging in your PlayGame() method to see if it actually gets called?
Okay
Hm, it is not being called
Oh
Wrong script/script name
Nvm
Yeah, it does not work
The method is never called?
Nope
Does the button animate? Do you get that red color change from your button script?
No
Perhaps create a new test button and make no modifications other than hooking it up to your script
Does not work either
Any color change?
Wait, do you have an input module in the scene?
One gets added for you when you create the canvas
I don't think so