1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

UnityでglTFを出力する

Last updated at Posted at 2024-01-16

UnityでglTFが出力できたんですね。知りませんでした。

こちらをpackage managerからImportして、
.glbでexportすれば出力できます。
image.png

実行中のsceneでも問題なくexportできました。
image.png

できたglbファイルを
glTF viewerに読み込ませたり、

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>glTF stack-chan</title>
        <script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.3.0/model-viewer.min.js"></script>
        <style>
        body {
            margin: 0;
            padding: 0;
        }
        model-viewer {
            width: 600px;
            height: 400px;
            background-color: #fff;
        }
    </style>
</head>
<body>
    <model-viewer src=[YOUR_GLB_FILE] camera-controls touch-action="pan-y"></model-viewer>
</body>
</html>

みたいな感じでどこかのサーバーに置くことで見ることができます。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?