Exemple #1
0
    void OnDestroy()
    {
        Everyplay.ReadyForRecording -= OnReadyForRecording;

        if (initialized)
        {
            // Set Everyplay not to render to a texture anymore and remove event handlers
            Everyplay.SetThumbnailTargetTexture(null);
            Everyplay.RecordingStarted      -= OnRecordingStarted;
            Everyplay.ThumbnailTextureReady -= OnThumbnailReady;

            // Destroy thumbnail textures
            foreach (Texture2D texture in thumbnailTextures)
            {
                if (texture != null)
                {
                    Destroy(texture);
                }
            }

            thumbnailTextures = null;

            initialized = false;
        }

        if (instance == this)
        {
            instance = null;
        }
    }
    void Start()
    {
        thumbnailPool = (EveryplayThumbnailPool)FindObjectOfType(typeof(EveryplayThumbnailPool));

        if(thumbnailPool) {
            ResetThumbnail();
        }
        else {
            Debug.Log("Everyplay thumbnail pool not found or no material was defined!");
        }
    }
    void Start()
    {
        thumbnailPool = (EveryplayThumbnailPool)FindObjectOfType(typeof(EveryplayThumbnailPool));

        if(thumbnailPool) {
            defaultTexture = mainRenderer.material.mainTexture;
            ResetThumbnail();
        }
        else {
            Debug.Log("Everyplay thumbnail pool not found or no material was defined!");
        }
    }
Exemple #4
0
    void Start()
    {
        thumbnailPool = (EveryplayThumbnailPool)FindObjectOfType(typeof(EveryplayThumbnailPool));

        if (thumbnailPool)
        {
            ResetThumbnail();
        }
        else
        {
            Debug.Log("Everyplay thumbnail pool not found or no material was defined!");
        }
    }
Exemple #5
0
    void Start()
    {
        thumbnailPool = Everyplay.SharedInstance.GetComponent <EveryplayThumbnailPool>();

        if (thumbnailPool)
        {
            ResetThumbnail();
        }
        else
        {
            Debug.Log("Everyplay thumbnail pool not found or no material was defined!");
        }
    }
    void Start()
    {
        thumbnailPool = (EveryplayThumbnailPool)FindObjectOfType(typeof(EveryplayThumbnailPool));

        if (thumbnailPool)
        {
            defaultTexture = mainRenderer.material.mainTexture;
            ResetThumbnail();
        }
        else
        {
            Debug.Log("Everyplay thumbnail pool not found or no material was defined!");
        }
    }
Exemple #7
0
    void Start()
    {
        thumbnailPool = Everyplay.SharedInstance.GetComponent <EveryplayThumbnailPool>();

        if (thumbnailPool)
        {
            defaultTexture = mainRenderer.material.mainTexture;
            ResetThumbnail();
        }
        else
        {
            Debug.Log("Everyplay thumbnail pool not found or no material was defined!");
        }
    }
Exemple #8
0
        protected virtual void OnEnable()
        {
            // Reacquire persistent component
            m_ThumbnailPool = EveryplayThumbnailPool.instance;

            m_FadeCounter = 1;
            m_HoldCounter = m_HoldTime;
            m_Index       = 0;

            m_Sprite1.sprite  = CreateSpriteForThumbnailTexture(m_ThumbnailPool.thumbnailTextures[0]);
            m_Sprite2.enabled = false;

            UpdateSprites();
        }
Exemple #9
0
    void Awake()
    {
        if (allowOneInstanceOnly && instance != null)
        {
            Destroy(gameObject);
        }
        else
        {
            if (dontDestroyOnLoad)
            {
                DontDestroyOnLoad(gameObject);
            }

            if (allowOneInstanceOnly)
            {
                instance = this;
            }

            Everyplay.ReadyForRecording += OnReadyForRecording;
        }
    }
        //Safe display of recording modal - only displays if the user is recording the session
        public void ShowIfRecording()
        {
            if (m_ThumbnailPool == null)
            {
                // Reacquire persistent component
                m_ThumbnailPool = EveryplayThumbnailPool.instance;
            }

            if (m_ThumbnailPool != null &&
                m_ThumbnailPool.availableThumbnailCount > 0)
            {
                if (PlayerDataManager.s_InstanceExists &&
                    PlayerDataManager.s_Instance.everyplayEnabled)
                {
                    Show();
                }
                else
                {
                    m_ThumbnailPool.Clear();
                }
            }
        }