public override void SetLoaderObject(LoaderObject loader)
 {
     this.filePath = loader.GetFilePath();
     imageLoader = loader as ImageLoaderObject;
     if (imageLoader == null) {
     Debug.LogError("Loader for " + this.filePath + " is not an ImageLoaderObject");
     }
 }
 public override void SetLoaderObject(LoaderObject loader)
 {
     this.filePath = loader.GetFilePath();
     imageLoader   = loader as ImageLoaderObject;
     if (imageLoader == null)
     {
         Debug.LogError("Loader for " + this.filePath + " is not an ImageLoaderObject");
     }
 }
 protected override void DoUpdate()
 {
     if (imageLoader != null) {
     if (imageLoader.IsLoaded()) {
         this.SetTexture2D(imageLoader.GetTexture());
         imageLoader = null;
         LocalMediaReady();
     }
     }
 }
 protected override void DoUpdate()
 {
     if (imageLoader != null)
     {
         if (imageLoader.IsLoaded())
         {
             this.SetTexture2D(imageLoader.GetTexture());
             imageLoader = null;
             LocalMediaReady();
         }
     }
 }
Пример #5
0
        /// Give an existing GameObject an icImageMaterial with a given image file.
        public icImageMaterial CreateImageMaterial(string filePath, GameObject go)
        {
            icImageMaterial mat = go.GetComponent<icImageMaterial>();

            if (mat == null)
            mat = go.AddComponent<icImageMaterial>();

            ImageLoaderObject lo = new ImageLoaderObject(filePath, this.threadedLoader);
            mat.SetLoaderObject(lo);
            this.threadedLoader.AddLoaderInfo(lo);

            return mat;
        }
Пример #6
0
        /// Give an existing GameObject an icImageMaterial with a given image file.
        public icImageMaterial CreateImageMaterial(string filePath, GameObject go)
        {
            icImageMaterial mat = go.GetComponent <icImageMaterial>();

            if (mat == null)
            {
                mat = go.AddComponent <icImageMaterial>();
            }

            ImageLoaderObject lo = new ImageLoaderObject(filePath, this.threadedLoader);

            mat.SetLoaderObject(lo);
            this.threadedLoader.AddLoaderInfo(lo);

            return(mat);
        }