/* プレビュ用:初期化関数 */
    private void PreparePreview()
    {
        if (CriAtomPlugin.IsLibraryInitialized() == false)
        {
            CriWareInitializer.InitializeAtom(new CriAtomConfig());
        }
        if (CriAtomPlugin.IsLibraryInitialized() == false)
        {
            return;
        }

        previewPlayer = new CriAtomExPlayer();
        if (previewPlayer == null)
        {
            return;
        }

        if (atomComponent != null)
        {
            CriAtomEx.RegisterAcf(null, Path.Combine(CriWare.streamingAssetsPath, atomComponent.acfFile));
        }
        else
        {
            Debug.LogWarning("[CRIWARE] CriAtom component not found in this scene");
            return;
        }

        isPreviewReady = true;
    }
Exemple #2
0
 public override void OnPlayableCreate(Playable playable)
 {
     base.OnPlayableCreate(playable);
     m_Guid = Guid.NewGuid();
     if (IsEditor)
     {
         if (CriAtomPlugin.IsLibraryInitialized() == false)
         {
             CriWareInitializer criInitializer = GameObject.FindObjectOfType <CriWareInitializer>();
             if (criInitializer != null)
             {
                 CriWareInitializer.InitializeAtom(criInitializer.atomConfig);
             }
             else
             {
                 CriWareInitializer.InitializeAtom(new CriAtomConfig());
                 Debug.Log("[CRIWARE] Timeline / Atom: Can't find CriWareInitializer component; Using default parameters in edit mode.");
             }
         }
     }
     m_lastDirectorTime = 0;
 }