Exemplo n.º 1
0
    void Start()
    {
        RunOnTheFlyReference = this;

        if (saveDataSlot > 0)
        {
            LoadFromSaveSlot();
        }
        // if (simulateFromMenu) SimulateLoadFromMenu();
    }
Exemplo n.º 2
0
    public override void OnInspectorGUI()
    {
        serializedObject.Update();

        EditorGUILayout.PropertyField(simulateFromMenu);
        EditorGUILayout.PropertyField(saveDataSlot);

        serializedObject.ApplyModifiedProperties();

        RunOnTheFly rotfScript = (RunOnTheFly)target;

        if (GUILayout.Button("Load From Save"))
        {
            rotfScript.LoadFromSaveSlot();
        }
        else if (GUILayout.Button("Create New Save"))
        {
            rotfScript.CreateNewSave();
        }
        else if (GUILayout.Button("Print Save Location"))
        {
            rotfScript.PrintSaveLocation();
        }
    }