Skip to content
Snippets Groups Projects
Scroll.cs 643 B
Newer Older
  • Learn to ignore specific revisions
  • using System.Collections;
    using System.Collections.Generic;
    using System;
    using UnityEngine;
    
    [Serializable]
    public class Declaration
    {
        public string name;
        public string type;
        public string identifier;
    }
    
    
    [Serializable]
    public class Scroll
    {
        public string problemTheory;
        public string solutionTheory;
        public string label;
        public string description;
        public Declaration[] declarations;
        //public string output;
    
        public static Scroll generateFromJson(string json) {
           return JsonUtility.FromJson<Scroll>(json);
        }
    
        public string toJson() {
            return JsonUtility.ToJson(this);
        } 
    }