Skip to content

Commit

Permalink
Added Package Manager support
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirkula committed May 14, 2020
1 parent 2dbeda6 commit 1860aa4
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 4 deletions.
File renamed without changes
19 changes: 15 additions & 4 deletions README.md → .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,24 @@ This asset is an abstraction layer on top of `Texture2D.LoadImage` to create **T

- Generated Texture2Ds will be uncompressed and thus, at runtime, will consume more memory compared to compressed Texture2Ds. Hence, RuntimeTexture is mostly useful for replacing already uncompressed Textures (like images in drawing games)

**NOTE:** Requires *Unity 2017.2* or later.

**[Support the Developer ☕](https://yasirkula.itch.io/unity3d)**

## How To
## INSTALLATION

There are 4 ways to install this plugin:

- import [RuntimeTexture.unitypackage](https://github.com/yasirkula/UnityRuntimeTexture/releases) via *Assets-Import Package*
- clone/[download](https://github.com/yasirkula/UnityRuntimeTexture/archive/master.zip) this repository and move the *Plugins* folder to your Unity project's *Assets* folder
- *(via Package Manager)* add the following line to *Packages/manifest.json*:
- `"com.yasirkula.runtimetexture": "https://github.com/yasirkula/UnityRuntimeTexture.git",`
- *(via [OpenUPM](https://openupm.com))* after installing [openupm-cli](https://github.com/openupm/openupm-cli), run the following command:
- `openupm add com.yasirkula.runtimetexture`

**NOTE:** Requires *Unity 2017.2* or later.

## HOW TO

First, import [RuntimeTexture.unitypackage](https://github.com/yasirkula/UnityRuntimeTexture/releases) to your project. There are two ways to create **RuntimeTexture** assets:
There are two ways to create **RuntimeTexture** assets:

1. By default, RuntimeTexture assets use "*.img*" extension (can be changed from *RuntimeTextureImporter.cs*). You can simply save your PNG/JPEG images with *.img* extension
2. Right click a *Texture* asset in Project window and select "*Convert To Runtime Texture*" to create a RuntimeTexture asset from that Texture
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions LICENSE.txt.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Plugins.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions Plugins/RuntimeTexture/Editor/RuntimeTexture.Editor.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "RuntimeTexture.Editor",
"references": [
"RuntimeTexture.Runtime"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Plugins/RuntimeTexture/RuntimeTexture.Runtime.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name": "RuntimeTexture.Runtime"
}
7 changes: 7 additions & 0 deletions Plugins/RuntimeTexture/RuntimeTexture.Runtime.asmdef.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "com.yasirkula.runtimetexture",
"displayName": "Runtime Texture",
"version": "1.0.0",
"description": "This asset is an abstraction layer on top of Texture2D.LoadImage to create Texture2D objects at runtime from raw PNG/JPEG data. Image files' contents are stored in RuntimeTexture assets and are used to create Texture2Ds on demand. With this abstraction layer, you no longer need to store the image files in e.g. StreamingAssets directory, you can hold references to RuntimeTexture assets in your scripts and generate Texture2Ds using them."
}
7 changes: 7 additions & 0 deletions package.json.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1860aa4

Please sign in to comment.