Save Game Data with 2 lines of code and CloudSave

Поділитися
Вставка
  • Опубліковано 1 сер 2024
  • Multiplayer Mastery Course - game.courses/mp/
    Game Dev Course for Beginners - game.courses/bc/

КОМЕНТАРІ • 25

  • @BlacklusterPally
    @BlacklusterPally 7 місяців тому

    thanks, very interesting!

  • @y01cu_yt
    @y01cu_yt 7 місяців тому

    That looks cool.

  • @jacobs.7925
    @jacobs.7925 7 місяців тому +3

    Great video, ultra easy to use, thanks a ton!
    Would this work on a steam game, using steam cloud as well? Or would you need to duplicate your save files (one copy for unity cloud / one for steam cloud)? I find it ultra easy to implement steam sdk + local json files. How'd you use this Unity's system with Steam or even with nintendo switch cloud saves? (considering a multiplatform game).
    Thanks!

    • @Unity3dCollege
      @Unity3dCollege  7 місяців тому +2

      I'd probably use the steam or Nintendo options for those because they're free. Bit of you wanted tk add cross platform saves or migrations you could use cloud save as an interim location to share between systems.

  • @noyaV_
    @noyaV_ 7 місяців тому

    Hey Jason, great vid as always!
    Also, sorry if it has been covered before, but what do those [Button] attributes do? A video about which attributes you like to use and which ones could be useful to devs, would be lovely

    • @RedCabinGames
      @RedCabinGames 7 місяців тому +1

      The [Button] attribute is an Odin Inspector attribute. Paid asset that's well worth the price imo if you're using Unity a lot

    • @nuin9937
      @nuin9937 7 місяців тому

      Here is a simple one I made if you don't want to buy Odin:
      using System;
      using System.Linq;
      using System.Reflection;
      using UnityEditor;
      using UnityEngine;
      using Object = UnityEngine.Object;
      namespace NuiN.NExtensions
      {
      [AttributeUsage(AttributeTargets.Method)]
      public class MethodButtonAttribute : PropertyAttribute
      {
      public readonly string label;
      public readonly bool onlyShowInPlayMode;
      public readonly object[] parameters;
      public MethodButtonAttribute(string label, bool onlyShowInPlayMode = false, object[] parameters = null)
      {
      this.label = label;
      this.parameters = parameters;
      this.onlyShowInPlayMode = onlyShowInPlayMode;
      }
      }
      #if UNITY_EDITOR
      [CustomEditor(typeof(Object), true)]
      public class MethodButtonAttributeDrawer : UnityEditor.Editor
      {
      public override void OnInspectorGUI()
      {
      Object script = (Object)target;
      MethodInfo[] methods = script.GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
      .Where(method => method.GetCustomAttributes(typeof(MethodButtonAttribute), true).Length > 0)
      .ToArray();
      foreach (var method in methods)
      {
      MethodButtonAttribute attribute = (MethodButtonAttribute)method.GetCustomAttributes(typeof(MethodButtonAttribute), true)[0];
      string buttonLabel = attribute == null ? method.Name : attribute.label;
      if (attribute == null || (attribute.onlyShowInPlayMode && !Application.isPlaying)) continue;
      if (GUILayout.Button(buttonLabel)) method.Invoke(script, attribute?.parameters);
      }
      base.OnInspectorGUI();
      }
      }
      #endif
      }

  • @-INC0GNIT0-
    @-INC0GNIT0- 7 місяців тому +1

    I assume with the cloud files tab you could probably serialize your local json savefile into the Unity Cloud's storage with a key for example the savefile name and your entire json file as the file to be stored ?

    • @Unity3dCollege
      @Unity3dCollege  7 місяців тому

      Exactly

    • @-INC0GNIT0-
      @-INC0GNIT0- 7 місяців тому

      @@Unity3dCollege sounds like an awesome idea I should look into then 😀
      Would resolve a lot of save compatibility issues for cross platform games I suppose :)

  • @nuin9937
    @nuin9937 7 місяців тому

    Can I ask why you dont use the enter playmode options to not recompile when entering play mode?

    • @Unity3dCollege
      @Unity3dCollege  7 місяців тому +2

      Causes problems more than it saves me time. Especially with mppm.

    • @nuin9937
      @nuin9937 7 місяців тому

      @@Unity3dCollege good to know, thanks :)

  • @nikolamk1
    @nikolamk1 7 місяців тому +2

    thanks for this, any price plans, limits... or its free?

    • @Unity3dCollege
      @Unity3dCollege  7 місяців тому +4

      It's pretty cheap, but of course depends on scale. Free up to 5gb/mo & some # of requests. Here's the full pricing page - unity.com/solutions/gaming-services/pricing

  • @JarlThorson
    @JarlThorson 7 місяців тому +5

    Hey! That's the password I use on my luggage!

  • @99ZULU
    @99ZULU 7 місяців тому

    FYI I don't know if it is just me, your audio is constantly scratchy.

    • @Unity3dCollege
      @Unity3dCollege  7 місяців тому +2

      I think it's the mic cable, going to replace it

  • @letsgoPi
    @letsgoPi 5 місяців тому

    '69' '42' 'random'

  • @moofymoo
    @moofymoo 7 місяців тому

    Jesus saves with one prayer. ha, checkmate!

  • @qomo-yh7vd
    @qomo-yh7vd 5 місяців тому

    Multiplayer Mastery Course price is 500$! so expensive bro

  • @qomo-yh7vd
    @qomo-yh7vd 5 місяців тому

    Multiplayer Mastery Course price is 500$! too too expensive