This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "getExtraTurn" : false, | |
| "maxTurns" : 15, | |
| "maxTurnTimer": 5 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEditor; | |
| using System.Collections; | |
| using System.IO; | |
| public class BugReporter : EditorWindow { | |
| string bugReportTitle = ""; | |
| GameObject buggyGameObject; | |
| string description = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.IO; | |
| using System.Runtime.Serialization.Formatters.Binary; | |
| ... | |
| // file save location of XML file | |
| public string filePath; | |
| // object to be serialized |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="Windows-1252"?> | |
| <PlayerData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
| <name>Robert</name> | |
| <age>21</age> | |
| <gender>Male</gender> | |
| </PlayerData> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.IO; | |
| using System.Xml.Serializaton; | |
| ... | |
| // file save location of XML file | |
| public string filePath; | |
| // object to be serialized | |
| public PlayerData playerDataObject; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "Robert", | |
| "age": 21, | |
| "gender": "Male" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.IO; | |
| ... | |
| // file save location of JSON text | |
| public string filePath; | |
| // object to be serialized | |
| public PlayerData playerDataObject; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Data class who's object will be serialized and deserialized | |
| // Classes must have the System.Serializable attribute | |
| [System.Serializable] | |
| public class PlayerData { | |
| public string name; | |
| public int age; | |
| public string gender; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| // reference to the created asset of scriptable object in the project folder | |
| public SOData soData; | |
| // values for saving and retrieving | |
| float valueToSave; | |
| float valueRetrieved; | |
| // to save a float value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine | |
| // attribute to create shortcut for creating scriptable object asset | |
| [CreateAssetMenu] | |
| public class SOData : ScriptableObject { | |
| // float variable which will hold saved data | |
| public float value; | |
| } |
NewerOlder