Пример #1
0
    void GLB(string path)
    {
        var bytes   = File.ReadAllBytes(path);
        var context = new ImporterContext();

        context.ParseGlb(bytes);
        context.LoadAsync(() =>
        {
            context.ShowMeshes();

            var markerM      = Instantiate(MarkerM).transform;
            markerM.name     = "GLB_Root";
            markerM.position = new Vector3(0, -1, 0);
            markerM.gameObject.AddComponent <SaveSceneTarget>().Path = path;
            context.Root.transform.parent = markerM;

            LoadCount++;
        });

        DandD.SetActive(false);
    }