Creating Scene Transitions Using Shaders in Godot 4 (Part 2)

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

Комментарии • 2

  • @naelpontes8444
    @naelpontes8444 2 месяца назад

    Sometimes I also get the error "Attempt to call function 'activate' in base 'previously freed' on a null instance", in this line: new_scene.activate(). What could explain it?

    • @robthefivenine
      @robthefivenine  2 месяца назад +1

      I actually ran into the same issue myself in the project that I was creating this for. The cause is trying to transition multiple times. In my case, I was calling `SceneManager.transition_to()` inside an `_input(event)` callback, but as this event fired multiple times before it had finished transitioning, it would free the old scene that is then trying to be activated.
      Take a look at where it is you are calling `SceneManager.transition_to` and you've very likely got the same issue that it is being called multiple times before it has finished.