Contents

init(contentsOf:withName:options:)

Asynchronously creates a texture resource from a file URL with creation options.

Declaration

@MainActor @preconcurrency convenience init(contentsOf url: URL, withName resourceName: String? = nil, options: TextureResource.CreateOptions) async throws

Parameters

  • url:

    The path or address of the file to load into the texture resource.

  • resourceName:

    A unique name the method assigns to the resource it loads, for use in network synchronization.

  • options:

    The options to use when loading the resource.

See Also

Loading a texture