Skip to content

Instantly share code, notes, and snippets.

@Kappawaii
Kappawaii / AutoSave.cs
Created January 3, 2020 12:53
Autosave before Playmode script for Unity
using UnityEditor;
using UnityEngine;
using UnityEditor.SceneManagement;
[InitializeOnLoad]
public class AutoSave
{
// Static constructor that gets called when unity fires up.
static AutoSave()
{
### Keybase proof
I hereby claim:
* I am kappawaii on github.
* I am kappawaii (https://keybase.io/kappawaii) on keybase.
* I have a public key ASD9Wk0uOnwoIjn7Wiqi8PAqWyD00oa8usvH-qhK4raqwwo
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am kappawaii on github.
  • I am kappawaii (https://keybase.io/kappawaii) on keybase.
  • I have a public key ASD-5CjxDlZIfw_H34NPJBQJwCNBSjpDLzL8jWf9vJ0Ntgo

To claim this, I am signing this object: