Forum begins after the advertisement:


[Part12] Regarding some operational issues in the article

Home Forums Video Game Tutorial Series Creating a Metroidvania in Unity [Part12] Regarding some operational issues in the article

Viewing 15 posts - 1 through 15 (of 48 total)
  • Author
    Posts
  • #16875
    MI NI
    Level 15
    Bronze Supporter (Patron)
    Helpful?
    Up
    0
    ::

    Hi, I just tried to do the content of Part 12, but I encountered a little problem when I did it.

    First is the part d. Making the Main Menu responsive I’m not sure how to operate this part. Dragging my screen like in the article will not change the size of my screen, but maintain a certain scaling ratio. I’m not sure if this part will have an impact on my next operation, but I didn’t do this part.

    Next is part f. Quality-of-life notification to the UIScreen inspector. I’m not sure how to do this part, I set OptionsMeun and CreditMenu to inactive but it still won’t show up, I’m not sure what the problem is.I recorded a video showing the problem I encountered

    #16876
    Ser Apustaja
    Level 1
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    Hi Mini,

    For part d, making the Main Menu responsive, it sounds like you might be encountering an issue with the responsiveness of your website when resizing the screen. It’s important to ensure that your CSS is properly set up to handle different screen sizes using media queries. You can define different styles for different screen sizes to make your website responsive.

    As for part f, it seems like you’re having trouble with setting the OptionsMenu and CreditMenu to inactive in the UIScreen inspector. Double-check that you are correctly referencing these elements and that they are set up to be activated or deactivated as needed. It’s also important to make sure that any

    #16885
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Have you assigned the Activate() function to the buttons? You need to assign OptionsMenu.Activate() to the Options button, and Credits.Activate() to the Credits button.

    #16890
    A_DONUT
    Level 7
    Moderator
    Helpful?
    Up
    0
    ::

    Is the doubt solved?

    #16893
    Ser Apustaja
    Level 1
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    Hello, A_DONUT! How can I assist you today with your programming question or concern?

    #16894
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    @MINI there were some minor issues with some of the codes that were causing the death respawn and scene transition to not work as well. Do re-copy the UIScreen and SceneTransition codes in the article.

    #16895
    MI NI
    Level 15
    Bronze Supporter (Patron)
    Helpful?
    Up
    0
    ::

    seems that the code in the article does not have OptionMenu.Activate() to call, or I can just select Activate() directly. I’m not sure

    I tried calling Activate(), but it only fades in and out, and no other UI interface appears. Maybe I need a picture, or more detailed instructions on how to operate this part, because it seems not to be mentioned in the article.

    View post on imgur.com
    #16900
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    @MINI, the function you want is UI Screen > Activate(bool). Make sure the checkbox is checked.

    You assign the screen that you want to activate, and then call Activate on it.

    #16901
    MI NI
    Level 15
    Bronze Supporter (Patron)
    Helpful?
    Up
    0
    ::

    I’m sorry, but I still don’t quite understand how to operate the whole step. I recorded the video as a reference. Did I miss anything?

    #16902
    Ser Apustaja
    Level 1
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    Hello MI NI,

    I’m sorry, but as a text-based bot, I can’t view videos. Could you please provide a brief description or summary of the issue you’re facing? I’ll do my best to assist you with your programming problem.

    #16908
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    @mini you need to assign the Activate function from OptionsMenu GameObject to the options button, and from the CreditsMenu GameObject to the credits button. You’ve assigned the Activate function from MainMenu instead, so the button is re-activating the main menu.

    View post on imgur.com
    #16918
    MI NI
    Level 15
    Bronze Supporter (Patron)
    Helpful?
    Up
    0
    ::

    I had a problem with the sound effect of the button. I added UIAudioFeedbackConfig according to the article. and removed UIAudio, but the sound effect doesn’t appear, I don’t know if I missed any steps. The recording sound was a bit low, but the buttons did not make any sound. In addition, I found that the First Selected function made the direction keys lose their function after I clicked on an open space. I don’t know if it is normal.

    In addition, because I am used to making steps, I have only briefly read the following content, so I am not sure how to set up the conversion from MainMenu to Stage_1. Just like the picture in front of me, there seems to be no function that can be called in the current UIScreen.

    #16919
    Ser Apustaja
    Level 1
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    Hello Mini,

    It seems like you’re facing a few issues with the sound effect of the button, the behavior of the First Selected function, and setting up the conversion from MainMenu to Stage_1. Let’s break it down:

    1. Sound Effect Issue: When you added UIAudioFeedbackConfig and removed UIAudio, the sound effect didn’t appear, and the recording sound was low. Check if the sound files are correctly linked and if the volume levels are set appropriately in the configuration.

    2. First Selected Function Issue: The behavior where the direction keys lose their function after clicking on an open space

    #16921
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Let’s add a few debug lines into your PlayAudioFeedback() function, and try clicking on the buttons again.

    Do the messages show up on the Console?

    public void PlayAudioFeedback(string type)
    {
        print("PlayAudioFeedback called");
        // Don't play any feedback if there is no audio source or feedback config assigned as well.
        // This prevents NullReferenceExceptions from occurring.
        if (!audioSource || !feedbackConfig) return;
        print("PlayAudioFeedback fired");
        // Play the sound if we find a valid SFX.
        AudioClip sfx = feedbackConfig.GetSound(type);
        if(sfx) audioSource.PlayOneShot(sfx);
    }

    One thing to take note of is to see whether “PlayAudioFeedback fired” appears in the Console. If it doesn’t, it means that your UIScreen is unable to find either an audioSource or feedbackConfig.

    #16922
    MI NI
    Level 15
    Bronze Supporter (Patron)
    Helpful?
    Up
    0
    ::

    I’m not returning Play Audio Feed backfired , I tested it, I can’t seem to find my AudioSource. Which object should I put it under?

Viewing 15 posts - 1 through 15 (of 48 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: