Saving Data in Godot 4 | GDScript, 4 ways

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

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

  • @AirmanCS
    @AirmanCS Год назад +2

    Hey great channel, I subbed and keep it up! EDIT: Also at 5:00 you have a black screen editing error and one short after that

  • @jackygreenhow9889
    @jackygreenhow9889 9 месяцев назад +1

    really good video. i watched a few videos before this one and didnt get it. but now i get it. thank you

  • @Estarossa_Miloserdia
    @Estarossa_Miloserdia 6 месяцев назад

    man you really helped me, thank you

  • @Sammo_Wammo_Real
    @Sammo_Wammo_Real 4 месяца назад +1

    HELP! When using the save system, I get "Invalid type in function 'get_var' in base 'FileAccess'. Cannot convert argument 1 from Dictionary to bool." Any solutions???

    • @Chevifier
      @Chevifier  4 месяца назад

      get_var returns the data in sequence make sure youre loading it the same way youre saving it.
      ie Saving
      file.store_var(number)
      file.store_var(some_string)
      then when loading the first call to get_var will return the number value then calling it again will next return the some_string value.
      looks like youre trying to set the get_var value which is returning a Dictionary to a bool variable.

  • @lordpalandus11
    @lordpalandus11 4 месяца назад

    So I might have missed it, but can you save entire instances or objects of a class to the save file? So instead of just strings and floats and ints, but say color data or texture data, saved to a member variable of that instance?

    • @Chevifier
      @Chevifier  4 месяца назад

      Sorry for the late response but yes it's all just data. You can save plenty of things using resource saver and resource loader.