Exemplo n.º 1
0
    public override void OnImportAsset(AssetImportContext ctx)
    {
        Debug.Log($"Importing G3D file: {ctx.assetPath}");
        ImportHelpers.TimeBlockingOperation();
        var baseName = Path.GetFileNameWithoutExtension(ctx.assetPath);
        var g3d      = G3D.Read(ctx.assetPath);

        g3d.OutputStats();
        var obj = ctx.ImportG3D(g3d, baseName);

        ctx.AddRandomMaterial(obj);
        ctx.SetMainObject(obj);
    }