Skip to main content

Posts

Showing posts from July, 2024

Save and load from scriptable objects in Unity complete workflow

  ########################## 1. Create a scriptable object class as following and create the scriptable object in Resources folder in project directory ########################## using System.Collections; using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(fileName = "Data", menuName = "Data/SaveFile", order = 1)] public class Saves : ScriptableObject {     public List<KeyValueData> savedDataList; } [System.Serializable] public struct KeyValueData {     public string key;     public string value; } ########################## 2. Read and log saved data For reading create a SaveSystem class as follows ########################## using System.Collections; using System.Collections.Generic; using System.IO; using System.Runtime.Serialization.Formatters.Binary; using UnityEngine; public static class SaveSystem {     public static SavedDataSerializer LoadData()     {         string path = Appl...

Which all files and folders to backup to zip a Unity Project

  In order to be able to recreate the Unity Project from a backup zip, just remove Library and Temp folder when backing up the project to a zip file. This will significantly reduce the zip size.