I love the smell of UnrealEd crashing in the morning. – tarquin

UE3:Create a ScriptedTexture

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 10:12, 17 March 2010 by Wormbo (Talk | contribs) (created basic procedure)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A ScriptedTexture(RTNP, U1, UT, U2, U2XMP, UE2Runtime, UT2003, UT2004, UDK, UT3) is created with the following syntax:

local ScriptedTexture ST;
 
ST = ScriptedTexture(class'ScriptedTexture'.static.Create(SizeX, SizeY,, ClearColor));
ST.Render = RenderFunction;

This creates a new ScriptedTexture that is SizeX pixels wide and SizeY high that is cleared to ClearColor before redrawing. RenderFunction must be a function without return value that has only one parameter of type Canvas(RTNP, U1, UT, U2, U2XMP, UE2Runtime, UT2003, UT2004, UDK, UT3).

Usually you will want the ScriptedTexture to be specified as Material parameter.