示例#1
0
    // private ImportStamp importedModel2;
    #endregion

    #region Import0
    public void setModel0Import()
    {
        //--------------------------Unity Tutorial 0---------------------------------
        WriteResult(StandaloneFileBrowser.OpenFilePanel("Open File", "", "", false));
        if (_path == "")
        {
            return;
        }

        importer             = new PiXYZ.Import.Importer(_path, importSettings);
        importer.progressed += onProgressChanged0;
        importer.completed  += onImportEnded0;
        importer.run();
    }
示例#2
0
    public void setModel2Import()
    {
        //--------------------------Unity Tutorial 2---------------------------------
        WriteResult(StandaloneFileBrowser.OpenFilePanel("Open File", "", "", false));
        if (_path == "")
        {
            return;
        }

        importer = new PiXYZ.Import.Importer(_path, importSettings);

        importer.isAsynchronous = false;
        importer.completed     += onImportEnded2;
        importer.run();
    }
示例#3
0
    public void setModel9ImportedModel()
    {
        WriteResult(StandaloneFileBrowser.OpenFilePanel("Open File", "", "", false));
        if (_path == "")
        {
            return;
        }
        importer            = new PiXYZ.Import.Importer(_path, importSettings);
        importer.completed += onImportEnded9;
        importer.run();

        //The ImportedModel component inherits from MonoBehaviour.That said, it can be gathered with:
        //new PiXYZ.Tools.Builtin.GetImportedModel();
        //ImportedModel importedModel = gameObject.GetComponent<ImportedModel>();
    }
示例#4
0
    public void setModel3Count()
    {   //--------------------------Unity Count---------------------------------
        WriteResult(StandaloneFileBrowser.OpenFilePanel("Open File", "", "", false));
        if (_path == "")
        {
            return;
        }
        print("---------------------------------------------------");

        importer = new PiXYZ.Import.Importer(_path, importSettings);
        importer.isAsynchronous = false;//FALSE DİĞER KOMUTLAR BUNU BEKLER, TRUE İSE BEKLEMEZ DİĞER KOMUTLAR İŞLETİLİR
        importer.completed     += onImportEnded3;
        importer.run();

        print("---------------------------------------------------");
    }
示例#5
0
    //--------------------------Unity Tutorial 1---------------------------------
    public void setModel4Tutorial1()
    {
        WriteResult(StandaloneFileBrowser.OpenFilePanel("Open File", "", "", false));
        if (_path == "")
        {
            return;
        }

        ImportSettings importSettings1 = ScriptableObject.CreateInstance <ImportSettings>();

        var importer = new PiXYZ.Import.Importer(_path, importSettings1);

        importer.isAsynchronous = false;
        importer.progressed    += progressedtutorial1;
        importer.completed     += tutorialEnded1;
        importer.run();
    }
示例#6
0
    public void setModel1Import()
    {
        //--------------------------Unity Tutorial 1---------------------------------
        WriteResult(StandaloneFileBrowser.OpenFilePanel("Open File", "", "", false));
        if (_path == "")
        {
            return;
        }

        importer = new PiXYZ.Import.Importer(_path, importSettings);
        importer.isAsynchronous = true;
        importer.completed     += onImportEnded1;
        importer.run();
        if (Input.GetKeyDown(KeyCode.A))
        {
            //PiXYZ.Config.Configuration.IsLicenseValid();//Lisans
        }
    }
示例#7
0
    public void setModel5CreateUv()
    {
        WriteResult(StandaloneFileBrowser.OpenFilePanel("Open File", "", "", false));
        if (_path == "")
        {
            return;
        }

        ImportSettings importSettings1 = ScriptableObject.CreateInstance <ImportSettings>();

        importer = new PiXYZ.Import.Importer(_path, importSettings1);
        //--------------------------Creat UV---------------------------------
        PiXYZ.Tools.Builtin.CreateUVs createUVs = new PiXYZ.Tools.Builtin.CreateUVs()
        {
            uvSize = 120f, useLocalBoundingBox = false, uvChannel = 0,
        };
        Debug.Log("CREATE UV TIPI: " + createUVs.GetType());
        Debug.Log("KURAL ERİŞİM ŞEKLİ: " + createUVs.displayNameRuleEngine);

        importer.run();
    }
示例#8
0
    public void setModel7MetaData()
    {
        //----------------------------Meta Data Dictionary---------------------------------
        WriteResult(StandaloneFileBrowser.OpenFilePanel("Open File", "", "", false));
        if (_path == "")
        {
            return;
        }

        try
        {
            importer            = new PiXYZ.Import.Importer(_path, importSettings);
            importer.completed += onImportEnded7;
            importer.run();
        }
        catch (Exception ex)
        {
            Debug.Log("setModel7MetaData Hata: " + ex);
            //EditorApplication.isPlaying = true;
            //EditorApplication.NewScene();
        }
    }