public void BindToMaterial(Material mat)
 {
     if (mat == null)
     {
         throw new ArgumentNullException("mat");
     }
     ProceduralVirtualTexturing.BindToMaterial(handle, mat, name);
 }
 public void BindToMaterial(Material mat)
 {
     if (mat == null)
     {
         throw new ArgumentNullException("mat");
     }
     if (IsValid() == false)
     {
         throw new InvalidOperationException("Invalid ProceduralTextureStack");
     }
     ProceduralVirtualTexturing.BindToMaterial(handle, mat, name);
 }
        public void BindToMaterial(Material mat)
        {
            if (mat == null)
            {
                throw new ArgumentNullException("mat");
            }
            if (IsValid() == false)
            {
                throw new InvalidOperationException("Invalid ProceduralTextureStack {name}");
            }
            bool success = ProceduralVirtualTexturing.BindToMaterial(handle, mat, name);

            if (!success)
            {
                throw new InvalidOperationException($"ProceduralTextureStack {name} is not fully initialized on the render thread and cannot bind to a Material. Please try again next frame.");
            }
        }