Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel
Like the UT and UT2003/4 versions the ScriptedTexture allows drawing onto a texture. It is only available starting with Beta 1 of UT3 Patch 2, thus maps and mods using a ScriptedTexture will not work with earlier versions of the game.
Unlike its predecessors, ScriptedTexture in UT3 actually exposes a "real" Canvas object, allowing the entire range of Canvas (UT3) features to be used.
The ScriptedTexture class has only two members, one bool type variable to signal whether an update is required and one delegate you can assign a function for updating the texture to. Additionally it inherits several properties from TextureRenderTarget2D, which control the size of the ScriptedTexture and its initial color.
- bool bNeedsUpdate (transient)
- Whether the texture needs to be redrawn. The Render(Canvas) delegate will be called at the end of the tick, just before all other rendering.
- Render(Canvas C)
- Called whenever bNeedsUpdate is true to update the texture. The texture is cleared to ClearColor prior to calling this function.
bNeedsUpdate is reset before calling this function, so you can set it to true here to get another update next tick.
Inherited Static Functions
- TextureRenderTarget2D Create(int InSizeX, int InSizeY, optional EPixelFormat InFormat, optional LinearColor InClearColor, optional bool bOnlyRenderOnce) [native, final]
- This function has built-in "native magic" and creates a new ScriptedTexture with the requested settings if called via the ScriptedTexture class. The return value is still of type TextureRenderTarget2D, so typecasting is required:
local ScriptedTexture ST;
ST = ScriptedTexture(class'ScriptedTexture'.static.Create(256, 256));