JohnSundell / JohnSundell/ImagineEngine

Support easy loading of textures from an asset catalog

Open
#150 4 comments 1 reaction 0 assignees View on GitHub
help wanted improvement
Dominant language
Swift
Stars
1.8k
Forks
104
PR merge metrics
No merged PRs in 30d

Description

Since Imagine Engine doesn't rely on the default system image loading mechanism (using `UIImage(named:)` on iOS) loading textures from an asset catalog is not super easy. While *possible* it requires you to create `Animation` or `Texture` instances using `Image`, like this:

```swift
let image = Image(named: "player")!
actor.animation = Animation(image: image)
```

It would be nicer if Imagine Engine could automatically search the app's asset catalog for an image with a given name, so that you could simply use:

```swift
actor.animation = Animation(textureNamed: "player")
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.