public void Texture_OnReadyBeforeLoading()
        {
            DCLTexture dclTexture = TestHelpers.CreateDCLTexture(scene, DCL.Helpers.Utils.GetTestsAssetsPath() + "/Images/avatar.png");
            bool       isOnReady  = false;

            dclTexture.CallWhenReady((x) => { isOnReady = true; });

            Assert.IsTrue(isOnReady); //DCLTexture is ready on creation
        }
        public IEnumerator Texture_OnReadyWaitLoading()
        {
            DCLTexture dclTexture = TestHelpers.CreateDCLTexture(scene, DCL.Helpers.Utils.GetTestsAssetsPath() + "/Images/avatar.png");
            bool       isOnReady  = false;

            dclTexture.CallWhenReady((x) => { isOnReady = true; });
            yield return(dclTexture.routine);

            Assert.IsTrue(isOnReady);
        }
예제 #3
0
        public IEnumerator Texture_OnReadyAfterLoadingInstantlyCalled()
        {
            DCLTexture dclTexture = TestHelpers.CreateDCLTexture(scene, TestAssetsUtils.GetPath() + "/Images/avatar.png");

            yield return(dclTexture.routine);

            bool isOnReady = false;

            dclTexture.CallWhenReady((x) => { isOnReady = true; });
            Assert.IsTrue(isOnReady);
        }