Skip to content

Unity

image-20260624152951436

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main useData() API can be used to access site, theme, and page data for the current page. It works in both .md and .vue files:

md
<script setup>
import { useData } from 'vitepress'

const { theme, page, frontmatter } = useData()
</script>

## Results




### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>
Csharp
export default {
  name: 'MyComponent'
  // ...
}

Results

Theme Data

{
  "logo": "Image/logo.svg",
  "nav": [
    {
      "text": "首页",
      "link": "/index"
    },
    {
      "text": "Unity教程",
      "link": "/Lesson/UnityLesson/0.前言"
    },
    {
      "text": "求职面经",
      "link": "/interview/xz/xzbhjs"
    },
    {
      "text": "大厂Offer",
      "link": "/getoffer/topoffer2026front"
    },
    {
      "text": "知识星球",
      "link": "https://wx.zsxq.com/group/28882224522521"
    },
    {
      "text": "关于我",
      "link": "/aboutme"
    }
  ],
  "socialLinks": [
    {
      "icon": "qq",
      "link": "https://qm.qq.com/q/OjipTfCMO4"
    },
    {
      "icon": "wechat",
      "link": "/wechat"
    },
    {
      "icon": "github",
      "link": "https://github.com/unitykit"
    }
  ],
  "search": {
    "provider": "local",
    "options": {
      "miniSearch": {
        "options": {},
        "searchOptions": {}
      }
    }
  },
  "lastUpdated": {
    "text": "最后更新于",
    "formatOptions": {
      "dateStyle": "full",
      "timeStyle": "medium"
    }
  },
  "sidebar": {
    "Lesson/UnityLesson": [
      {
        "text": "Unity 6 最新教程",
        "items": [
          {
            "text": "录制教程",
            "link": "/Lesson/UnityLesson/0.前言"
          }
        ]
      },
      {
        "text": "初识Unity引擎",
        "collapsed": false,
        "items": [
          {
            "text": "引擎是什么",
            "link": "/Lesson/UnityLesson/1.引擎是什么"
          },
          {
            "text": "初识Unity",
            "link": "/Lesson/UnityLesson/2.初识Unity引擎"
          },
          {
            "text": "解答疑惑",
            "link": "/Lesson/UnityLesson/3.解答疑惑"
          },
          {
            "text": "学习技巧",
            "link": "/Lesson/UnityLesson/4.学习技巧"
          }
        ]
      },
      {
        "text": "开发环境",
        "items": [
          {
            "text": "安装软件(需要科学上网!)",
            "link": "/Lesson/UnityLesson/5.安装开发环境"
          }
        ]
      },
      {
        "text": "Unity编辑器界面入门",
        "collapsed": false,
        "items": [
          {
            "text": "创建第一个项目",
            "link": "/Lesson/UnityLesson/6.创建第一个项目"
          },
          {
            "text": "Unity项目文件",
            "link": "/Lesson/UnityLesson/7.Unity项目文件"
          },
          {
            "text": "菜单栏介绍",
            "link": "/Lesson/UnityLesson/8.菜单栏介绍"
          },
          {
            "text": "窗口介绍",
            "link": "/Lesson/UnityLesson/9.窗口介绍"
          }
        ]
      }
    ],
    "/interview/": [
      {
        "text": "校招",
        "collapsed": false,
        "items": [
          {
            "text": "必会",
            "link": "/interview/xz/xzbhjs"
          }
        ]
      },
      {
        "text": "社招",
        "collapsed": false,
        "items": [
          {
            "text": "高频考点",
            "link": "/interview/sz/szbhjs"
          }
        ]
      }
    ],
    "/getoffer/": [
      {
        "text": "上岸学员案例",
        "collapsed": false,
        "items": [
          {
            "text": "2026年上",
            "link": "/getoffer/topoffer2026front"
          },
          {
            "text": "2025年上",
            "link": "/getoffer/topoffer2025front"
          },
          {
            "text": "2025年下",
            "link": "/getoffer/topoffer2025last"
          },
          {
            "text": "2024年下",
            "link": "/getoffer/topoffer2024last"
          }
        ]
      },
      {
        "text": "Unity高薪就业班",
        "collapsed": false,
        "items": [
          {
            "text": "高薪就业 - 服务详细介绍",
            "link": "/getoffer/highclass"
          },
          {
            "text": "遨游科技工作室",
            "link": "/getoffer/ay"
          }
        ]
      },
      {
        "text": "Unity游戏开发者联盟",
        "collapsed": false,
        "items": [
          {
            "text": "加入Unity联盟,自学成才!",
            "link": "/getoffer/zsxq"
          }
        ]
      }
    ]
  },
  "footer": {
    "message": " 版权所有 ©2026 -  Unity游戏开发者联盟",
    "copyright": "基于 <a href=\"https://github.com/vuejs/vitepress/blob/main/LICENSE\">  MIT  </a> 许可发布 -  <a href=\"https://beian.miit.gov.cn\">黔ICP备2025051943号-1</a>"
  }
}

Page Data

{
  "title": "Unity",
  "description": "",
  "frontmatter": {
    "outline": "deep"
  },
  "headers": [],
  "relativePath": "Unity2/UnityCode.md",
  "filePath": "Unity2/UnityCode.md",
  "lastUpdated": 1782291713077.5835
}

Page Frontmatter

{
  "outline": "deep"
}

More

Check out the documentation for the full list of runtime APIs.

最后更新于: