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 3 posts - 46 through 48 (of 48 total)
  • Author
    Posts
  • #17023
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Can you update your project files again and send it to me? I will have another look.

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

    I have sent my project, please trouble you again

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

    Managed to fix your problem. The Fader is coming from your UIManager’s entrance animation. I modified your UIManager’s Awake function so that it calls base.Awake() only if it is not destroyed. Otherwise, if you have duplicate UIManagers on the Scene, they will trigger the entrance fade and get destroyed before they are able to clean up the fade animation.

    
    public class UIManager : UIScreen
    {
        public static UIManager Instance; //¨¾¤î¦h­Ó­«½Æªºª±®a¸}¥»¥X²{
    
        [Header("UI Manager")]
        public GameObject mapHandler; //¦a¹Ï
        public GameObject inventory; //­I¥]
        public UIScreen deathScreen;
    
    
    
        protected override void Awake()
        {
            if (Instance != null && Instance != this)
            {
                Destroy(gameObject);
                return;
            }
    
            base.Awake();
    
            DontDestroyOnLoad(gameObject);
            Instance = this; //new
    
        }
    }

    One more thing as well: You don’t need an entrance animation for your UIScreen, because the SceneTransition script already handles the fade in / fade out.

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

Go to Login Page →


Advertisement below: