Exemple #1
0
 /// <summary>
 /// Texture.
 /// </summary>
 /// <param name="target"></param>
 /// <param name="imageBuilder"></param>
 /// <param name="parameters"></param>
 /// <param name="mipmapFiltering"></param>
 public Texture(
     TextureTarget target,
     ImageFiller imageBuilder,
     SamplerParameters parameters,
     MipmapFilter mipmapFiltering = MipmapFilter.LinearMipmapLinear)
     : this(target, imageBuilder, new FakeSampler(parameters, mipmapFiltering))
 {
 }
Exemple #2
0
        /// <summary>
        /// Texture.
        /// </summary>
        /// <param name="target"></param>
        /// <param name="imageBuilder"></param>
        /// <param name="samplerBuilder"></param>
        public Texture(
            TextureTarget target,
            ImageFiller imageBuilder,
            SamplerBase samplerBuilder)
        {
            if (imageBuilder == null || samplerBuilder == null) { throw new ArgumentNullException(); }

            this.Target = target;
            this.ImageFiller = imageBuilder;
            this.Sampler = samplerBuilder;
        }
 private void Awake()
 {
     image = GetComponent <Image>();
     if (Instance == null)
     {
         Instance = this;
         //DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }