Skip to content

unitycoder/TextureUpdater

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextureUpdater

Texture Updater uses CommandBuffer.IssuePluginCustomTextureUpdate to update the texture at runtime. In addition, the generated texture image is done in C# with the help of the job system and the burst compiler.

The Plasma effect example is ported from https://github.com/keijiro/TextureUpdateExample/

Why?

CommandBuffer.IssuePluginCustomTextureUpdate is designed to work with native code, but any change of the logic requires recompiling the plugins for each platform. This approach makes the texture updater plugin reusable, as the texture update logic is moved to C#.

known issues

  • Because the native thread is calling managed code (to generate the texture), it is causing the editor to hang on domain unload (the second time you press play). The example is currently using Texture2D.LoadRawTextureData in the editor to prevent this issue.

About

Update textures at runtime in Unity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 67.6%
  • C# 25.8%
  • C++ 6.6%