-
Notifications
You must be signed in to change notification settings - Fork 6
VGO runtime loading
IzayoiJiichan edited this page Aug 3, 2023
·
14 revisions
Load LoadScene
when using the UniVGO sample project.
Select the VgoLoader
game object in Hierarchy
,
In Inspector
, enter the full path of the VGO file you want to load at runtime in Local File Path
.
Press the play
button to run the game.
Confirm that the VGO file is loaded.
If an error has occurred, the Console will display the details of the error.
If you write your own script, write as follows.
using System;
using UnityEngine;
using UniVgo2;
public class RuntimeLoadBehaviour : MonoBehaviour
{
private readonly VgoImporter _VgoImporter = new();
[SerializeField]
private string _FilePath = string.Empty;
private IDisposable? _VgoModelAssetDisposer;
private void Start()
{
VgoModelAsset vgoModelAsset = _VgoImporter.Load(_FilePath);
vgoModelAsset.ReflectSkybox(Camera.main);
_VgoModelAssetDisposer = vgoModelAsset;
}
private void OnDestroy()
{
_VgoModelAssetDisposer?.Dispose();
}
}
- System Requirements
- Requirement Packages
- Install
- Other information
- Basic matters
- Create VGO
- VGO export
- VGO import
- VGO runtime loading