// SPDX-FileCopyrightText: 2023 Unity Technologies and the KTX for Unity authors // SPDX-License-Identifier: Apache-2.0 using UnityEngine; namespace KtxUnity { /// /// TextureResult encapsulates result of texture loading. The texture itself and its orientation. /// public class TextureResult { /// /// The successfully imported . /// public Texture2D texture; /// /// The of the imported texture. /// public TextureOrientation orientation; /// /// The from the failed texture import. /// public ErrorCode errorCode = ErrorCode.Success; /// /// Creates an empty . /// public TextureResult() { } /// /// Creates an invalid with an . /// /// The from the failed texture import. public TextureResult(ErrorCode errorCode) { this.errorCode = errorCode; } /// /// Creates a successful with a /// and a . /// /// The successfully imported . /// The of the imported texture. public TextureResult(Texture2D texture, TextureOrientation orientation) { this.texture = texture; this.orientation = orientation; } } }