Example #1
0
    private void Awake()
    {
        meshFilter   = GetComponent <MeshFilter>();
        meshRenderer = GetComponent <MeshRenderer>();
        material     =
            new Material(Shader.Find("Unlit/Penrose"))
        {
            hideFlags = HideFlags.HideAndDontSave,
            name      = "PenMaterial"
        };
        JsonRawData = JsonData.CreateFromJSON("rawdata.json");

        /*---------------------------
         *
         * var mySavedState = new MySavedState
         * {
         *  Name = "someSavedState",
         *  Loops =
         *  {
         *      { 1, 3, 5, 7, 9},
         *      { 0, 2, 4, 6},
         *      { 11, 22}
         *  },
         *
         *  Background = Color.black
         * };
         *
         * var jsonString = mySavedState.SaveToString();
         *
         * -------------------------*/
    }