Expose Texture2D.Resize, and (Custom)RenderTexture.Create
tracked
Synergiance
There is no way to resize a texture in Udon currently. We can release (custom) render textures and that's about it. This is quite limiting and can hamper performance by forcing people to use the largest resolution needed when they could have otherwise reduced it as needed. If the issue with allowing resizing ((custom) render) textures is the possibility that they can be used to run the client out of memory, it would be useful to intercept the calls and cap the maximum resolution to something reasonable like 4k or 8k. This should have minimal performance overhead since people should not be resizing and reallocating their textures every frame. If that's the concern, it can be rate limited and just return false to the udon behaviour.
Log In
This post was marked as
tracked
Fax
Merged in a post:
Expose Custom Render Texture create and Material create
Synergiance
We received the methods for creating textures, render textures, etc, but exempt from all that are CustomRenderTextures, and the requisite Material creation. Exposing these would allow certain prefabs to be placed in a world multiple times without conflict. It would also allow dynamic resizing for custom render textures.